Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sometimes, a float is just a tiny bit too large for one page and one would like to remove the page number and hope that nobody notices.

\documentclass{article}
\usepackage{mwe}
\begin{document}
\blindtext
\begin{figure}
\thispagestyle{empty}
\includegraphics[width=\linewidth,height=1.02\textheight]{example-image-a}
\caption{This float is too large for one page.}
\end{figure}
\blindtext
\end{document}

(Why, of course this is an artificial example and I could just make the image smaller. This is a more common problem for tables where using a \resizebox looks even worse.) this float is too large

Unfortunately, no matter where I put the \thispagestyle{empty}, there is no way to guarantee that it really affects the page the float ends up on. I tried both before and after the \includegraphics and also in the caption itself. There is a way to change the pagestyle for all float pages (How to remove header on the page with big picture? and floatpag) but that's not what I want here.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

floatpag also provides \thisfloatpagestyle to adjust the page styles only for the page of floats it is used in:

enter image description here

\documentclass{article}
\usepackage{floatpag,mwe}
\begin{document}
\blindtext
\begin{figure}
  \thisfloatpagestyle{empty}% empty page style _only_ for this page
  \includegraphics[width=\linewidth,height=1.02\textheight]{example-image-a}
  \caption{This float is too large for one page.}
\end{figure}
\blindtext
\end{document}
share|improve this answer
    
I totally missed that the package can already do that, too. Thanks for pointing it out! –  Christian Apr 6 at 14:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.