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.

Often floats may land quite a bit later in the document than the point they are created, sometimes after a section break.

Is there a way to force a new section to start on a new page, after any unplaced floats?

share|improve this question
1  
See also the very related question How to avoid splitting tables between sections for more possible solutions. –  Martin Scharrer Jun 13 '11 at 11:34
add comment

2 Answers

up vote 56 down vote accepted

Use the placeins package.

It gives you a \FloatBarrier command that you can use to prevent floats to appear beyond some point in your document. Use it as

% ... some floats here ...

\FloatBarrier
\section{My new section} % will not include floats from previous sections
share|improve this answer
13  
Instead of putting manually \FloatBarrier before each new section you can just use section option of placeins package. –  przemoc Jul 4 '11 at 11:14
3  
@przemoc namely \usepackage[section]{placeins} –  Jodi Schneider Aug 4 '13 at 0:12
    
@przemoc Note, however, that this doesn't seem to work for subsections. –  Filipe Correia Jan 9 at 13:10
add comment

The command \clearpage will not only start a new page, but will also force any unset floats to be set before the page break. For documents with a left and a right page, \cleardoublepage does the same, but also ensures that the next non-blank page is a right hand page.

This is all independent of the section break, save that if you are using a class that does not put a page break before section breaks, this method will force them. But, from your question, this doesn't seem to be a problem in your case.

share|improve this answer
    
This has been driving me nuts for 3 months. THANK YOU! –  PengOne Aug 29 '11 at 3:07
add comment

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.