[Tex/LaTex] When do I need invoke \clearpage manually


I am not sure whether invoking \clearpage is necessary or redundant at many places in my input .tex files.

Here I will ask you, in what condition is invoking \clearpage necessary?

I hope I get a list of all possible condition that might be also useful for others.

In my daily work, I do as follows:

  1. If I need a new page for the next stuff, I put \clearpage right before the stuff.
  2. If I need to change the header/footer style for the next stuff, I put \clearpage followed by \pagestyle right before the stuff.
  3. If I get a "too many floots" error, I put \clearpage at the end of every 5 consecutive floats.

Best Answer

In general, you do not need any \clearpage because page breaking should be done automatically by the TeX engine. However, in some cases, eg having lots of images or equations, one has to insert a manually pagebreak.

  • \newpage ends the page immediately at the current position and starts a new page without any stretching of the page
  • \pagebreak[value] ends the page after the current line and stretches the vertical page to end up on the lower page border, if there is any material with glue
  • \clearpage outputs all active floats and ends the page like \newpage
  • \cleardoublepage same for double sided documents

With the package nextpage one can also use the macros \cleartoevenpage and \cleartooddpage

Related Question