8

I'm using the fancyhdr for headers and footers in most of my document, however there are some pages, such as the title page, for which headers and footers aren't wanted, and for these pages I've set

\pagestyle{empty}

However LaTeX still sets aside space for the nonexistent header and nonexistent footer on these pages, meaning that I can't use that space for title page elements, or for example text on the imprint page that I want to be allowed to extend down closer to the bottom of the page.

How can I reduce the header and footer to zero, but only locally on selected pages (preferably a range of pages) where a header and footer aren't required, and without affecting the other pages where a header and footer are used?

lockstep
  • 250,273

2 Answers2

7

You should probably use \thispagestyle{empty} rather than \pagestyle. To overprint the header space you can use

\vspace*{-20pt}%
\enlargethispage{40pt}%

where the first line moves everything up overprinting the top, and the second line increases the page body. Choose lengths to suit your requirements.

David Carlisle
  • 757,742
  • 1
    I had resorted to \newgeometry and \restoregeometry over a range of pages, but it's a little bit 'absolute' and this looks like possibly a cleaner way of doing it. – Username Obfuscation Oct 17 '14 at 10:30
4

I ended up using the geometry package (which I had been using anyway to set up A5 margins in the preamble) to do it:

\newgeometry{noheadfoot=true,top=1.5cm,bottom=1.5cm}
% . . . stuff
\restoregeometry

It's not completely ideal as it requires the insertion of the right 'magic numbers', but it does the job.

I'm still not entirely sure of the purpose of noheadfoot - it seems to do nothing by itself, but it seemed a good idea to include it anyway.