# Forcing a figure strictly on a separate page

How can a figure be forced to appear alone on a separate page? \begin{figure}[p!] forces it to a separate page, but it does not guarantee that some other small figures (which I'd like to be included inline in the text) will not accidentally end up on the same figure page.

-

Setting the interfloat space \@fpsep to at least \textheight guarantees that figures on float pages will appear alone on a page:

\makeatletter
\@fpsep\textheight
\makeatother


Also here, the figure remains vertically centered, this is not affected. You can change \@fpsep also mid-document. Using \afterpage (requiring loading the afterpage package) for changes could be handy, such as:

\makeatletter
\afterpage{\global\setlength\@fpsep{8\p@ \@plus 2fil}}
\makeatother

-
Nice. Can this be done for only one specific float? – Martin Scharrer Jul 3 '11 at 8:54
Can \@fpsep be changed mid-documnet? – lockstep Jul 3 '11 at 8:54
@lockstep: yes! @Martin: yes: we could modify \@floatsep again but let a \clearpage before the next figure(s). Or we do it by \afterpage{\global\setlength\@fpsep{...}} I added it to the answer. – Stefan Kottwitz Jul 3 '11 at 9:26

I think your best shot is to use the \afterpage command from the afterpage package, which will put your actions as soon as the current page is over. This avoids that you ends with half pages blank. So I suggest you do the following:

\afterpage{%
\begin{figure}
...
\end{figure}
\clearpage
}


The problem of the other pictures is not completely solved if you have floats which are not placed before the \afterpage command, but it should ensure that no floats after this command are placed on the same page of the picture you want alone.

-

\clearpage

The \clearpage command ends the current page and causes all figures and tables that have so far appeared in the input to be printed.

-
 If I place the \clearpage right after the figure block, it'll break the text (cause half an empty page). I don't want to break the flow of the text, just insert a separate page, reserved only for one figure. The p! option of figure will give me that separate figure page, but it won't guarantee that no other figures will end up on the same figure page. – Szabolcs Jul 3 '11 at 7:40