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.

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.

share|improve this question

4 Answers 4

up vote 7 down vote accepted

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
share|improve this answer
2  
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
    
Where should I put this code? I've tried putting the first block of code you've given as an example within the figure, right before the figure, and right before the chapter starts which is a few pages before where the image is currently placed. Nothing of them worked — the image is still not on a separate page. –  StrawberryFieldsForever Aug 2 '13 at 6:02
    
@StrawberryFieldsForever Try as I wrote in my previous comment. –  Stefan Kottwitz Aug 2 '13 at 7:06

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.

share|improve this answer

Short answer:

\renewcommand{\floatpagefraction}{0.1}

Long answer:

You can control in some extent page floats by means of \floatpagefraction that is the minimum part of a page that has to be occupied by floating objects before a ‘float page’ is produced, or in two columns documents also with \dblfloatpagefraction, that indicates the minimum part of a page that has to be occupied by two column wide floating objects (figure*) before a float page.

Disclaimer: With this approach, if the next float is enough small and have also the [p] option, obviously still it could be included in the same float page. Unfortunately, another easy options as \setcounter{totalnumber}{1} and set \floatsep seem to work only for normal text pages. If this is a problem, it must be enough put text between both page floats (to fill at least one page) or be sure that the next float have not the [p] option, or forget this approach and set \@fpsep as perfectly explained by Stefan (or \@dblfpsep for texts in two columns).

A MWE:

\documentclass{article}
\usepackage{lipsum}
\usepackage[demo]{graphicx}
\renewcommand{\floatpagefraction}{0.1}

\begin{document}

\lipsum[1]

\begin{figure}[hbt]
\centering
\includegraphics[width=8cm]{A}
\caption{A normal float}
\end{figure}

\begin{figure}[p]
\centering
\includegraphics[width=8cm]{B}
\caption{A page float}
\end{figure}

\begin{figure}[hbt]
\centering
\includegraphics[width=8cm]{C}
\caption{Another normal float}
\end{figure}

\lipsum[2-10]

\end{document}
share|improve this answer

\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.

share|improve this answer
    
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

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.