Document ClassesDoublesided document - blank pages

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
Bettina
Posts: 8
Joined: Sun Sep 16, 2007 12:28 pm

Doublesided document - blank pages

Post by Bettina »

Hi,

I am using \documentclass[12pt,a4paper]{book} with fancyheader.

Now I have exactly the problem mentioned in the documentation of fancyheader, namely that the final (empty) pages of a chapter contain the header - which I don't want. I thought I did what the documentation says, i.e. add \clearpage{\pagestyle{empty}\cleardoublepage},
but that didnt help.

My fancyheader specification now looks as follows and shows what happens:

\documentclass[12pt,a4paper]{book}
\usepackage[paper=a4paper,left=35mm,right=25mm,top=25mm,bottom=25mm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\small \bfseries \thechapter.\ #1}{}}
\fancyhead[RE, LO]{\leftmark}
\fancyhead[LE, RO]{\small \thepage}
\clearpage{\pagestyle{empty}\cleardoublepage}
\fancyfoot{}
\renewcommand{\headrulewidth}{0.8pt}
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfoot[C]{\small \thepage}
\renewcommand{\headrulewidth}{0pt}}
\newcommand{\setof}[1]{\ensuremath{\left \{ #1 \right \}}}
\makeatletter
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \reset@font
{\huge \bfseries \thechapter\ \ \huge \bfseries #1\par\nobreak}
\vskip 20\p@ }}
\begin{document}
\def\chaptername{}
\chapter{Test first chapter}
\section{Text}
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext
\chapter{Test second chapter}
\end{document}


Can anybody help me there?
Thanks!
Bettina

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Doublesided document - blank pages

Post by Stefan Kottwitz »

Hi Bettina,

\clearpage{\pagestyle{empty}\cleardoublepage} hast to be written directly before calling the next \chapter, not inside the preamble:

Code: Select all

\section{Text}
texttexttexttexttexttexttexttexttexttexttexttexttexttexttext
\clearpage{\pagestyle{empty}\cleardoublepage}
\chapter{Test second chapter}
Stefan
LaTeX.org admin
Bettina
Posts: 8
Joined: Sun Sep 16, 2007 12:28 pm

Re: Doublesided document - blank pages

Post by Bettina »

Great, thanks a lot! Got it all covered now.
nejck
Posts: 2
Joined: Mon Jun 09, 2008 6:17 pm

Re: Doublesided document - blank pages

Post by nejck »

Hello, I have kind a same problem, but I'd like to remove those pages... meaning the next chapter can start allso on left side...

any suggestions?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Doublesided document - blank pages

Post by Stefan Kottwitz »

Hi nejck,

welcome to the LaTeX Community Forum! Feel free to open new threads for questions.
You could use the openany Option for your documentclass, for example:

Code: Select all

\documentclass[a4paper,10pt,openany]{book}
Stefan
LaTeX.org admin
nejck
Posts: 2
Joined: Mon Jun 09, 2008 6:17 pm

Re: Doublesided document - blank pages

Post by nejck »

thanks for the quick answer... I'll try.
Post Reply