3

Possible Duplicate:
How to remove head- and footlines for pages between chapters?

With the code below you can clear the footer of blank pages.

\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother

Is there any package or other commands that decrease this code?

Regis Santos
  • 14,463
  • Is this a duplicate of http://tex.stackexchange.com/q/1681/627 . Does \usepackage{emptypage} not do what you want? – Lev Bishop Oct 07 '11 at 20:54

3 Answers3

5

There are some unnecessary spacing and boxing in the definition of \cleardoublepage. This is a tad shorter:

\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  \null\thispagestyle{empty}\newpage\fi\fi}
\makeatother

However, if you know the setup of your document, you can remove many of the conditional statements, since they add a majority of the code. The reason for this is because the command is made to accommodate general document setup rather than be specific to one instance. To that end, if you're typesetting a book that uses the twoside option, you could just as well use

\makeatletter
\def\cleardoublepage{\clearpage\ifodd\c@page\else
  \null\thispagestyle{empty}\newpage\fi}
\makeatother

And, if you don't enjoy the @ symbol (which brings with it \makeatletter and \makeatother), you could also use

\def\cleardoublepage{\clearpage\ifodd\value{page}\else
  \null\thispagestyle{empty}\newpage\fi}
Werner
  • 603,163
  • 1
    All answers were good, but the smallest of them turned out to be Lev Bishop \usepackage{emptypage}. Thank you all for your help. – Regis Santos Oct 08 '11 at 02:08
2

this code, from the ams document classes, works perfectly well there to overwrite a substandard version from an old version of latex:

\let\cleardouble@page\cleardoublepage
\AtBeginDocument{%
  \ifx\cleardouble@page\cleardoublepage
    \def\cleardoublepage{\clearpage{\pagestyle{empty}\cleardouble@page}}
  \fi
}

of course, in a document preamble you'd need \makeatletter .... \makeatother.

0

I'm using:

\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{\clearpage{\pagestyle{empty}\origdoublepage}}
\let\cleardoublepage\clearemptydoublepage

arguably less involved than the \AtBeginDocument approach, but yet careful enough so as to save the previous definition :)

mpr
  • 3,646