0

I have some documents (book, memoir, and article classes) with full-page graphics on their own pages. When putting in \includegraphics{foobar.png}, the graphic will always appear in that position in the text, often leaving lots of whitespace before the end of the page before the graphic. How do I tell LaTeX to fill the rest of this page with text, stop at the end of the section/subsection/chapter if text runs out, and then put the graphic on the next page?

Frotz
  • 378
  • 2
  • 12
  • 4
    Easiest is to use the figure environment with the [p] option. – John Kormylo Apr 14 '19 at 01:46
  • 4
    \begin{figure}[tp]\includegraphics{foo}\end{figure} (see John's comment) will move the image to the top of a page, or place the image on a page of its own if needed. – Johannes_B Apr 14 '19 at 05:06

1 Answers1

1

@John-kormylo and @Johannes-b pointed me in the right direction. This led me to wonder how to remove the page number on those pages with a full-page graphic. That answer was here: How to set the pagestyle on the page a particular float ends up on?

This is what I ended up using:

\begin{figure}[tp]
\thisfloatpagestyle{empty}
\begin{center}
\includegraphics[height=\textheight]{foobar}
\end{center}
\end{figure}

It works exactly as I need it.

Frotz
  • 378
  • 2
  • 12