# How to get a big table on a page with pagestyle empty?

In my document I have a table that is quite big. I would like to have this table on a page with no header and no page number. How can I get this table on a \thispagestyle{empty}? Using it withing the table or tabular environment makes the page were the float is defined go empty and leaves the headers on the table.

For if it matters, I am using fancyhdr.

-
–  barbara beeton May 18 at 12:45

fancyhdr provides the \iffloatpage macro that can be used to customize header and footer for pages which contain only floats.

\documentclass{book}

\usepackage{fancyhdr}
\fancyfoot{}
\fancyfoot[C]{\iffloatpage{}{\thepage}}
\pagestyle{fancy}

\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}

\blinddocument

\begin{table}[p]
\centering
(Table contents)
\caption{A table on a separate page}
\end{table}

\end{document}


EDIT: For those that want to use the \iffloatpage macro with KOMA-script's scrpage2 package instead of with fancyhdr, add the following to your preamble (thanks to Stefan Kottwitz for the tip):

\makeatletter
\makeatother


(The blindtext package is only used to add some dummy text to the example.)

-
Thanks, that works great! –  Peter Smit May 30 '11 at 20:24
@Peter: By default, the table should be vertically centered. Tweaking the positioning paramaters still won't "reclaim" the header space, unless the table is too large for a normal page to begin with. There may be hacks to achieve what you want, but that's over my head. –  lockstep May 30 '11 at 20:27
Thanks for that. I realized this immediately after I posted my comment, so therefore I removed it :) –  Peter Smit May 31 '11 at 4:14

You can simply put the table on a page of its own without putting it inside a table environment. Then you can make use \thispagestyle{empty} before the table. To add the caption properly, use the \captionof command from the caption package.

-

Because there is no really satisfying answer to the question yet, I want to add an alternative to Alan's approach.

\clearpage
\thispagestyle{empty}
\begin{figure}
...
\end{figure}
\clearpage


This lets you keep the "float" as such, it just doesn't float anymore. That kinda sucks but this at least gives you another poison to choose from.

-