Is it wrong to use \clearpage instead of \newpage?
Technically there is nothing wrong with using \clearpage
instead of \newpage
. However, the two commands have different semantics and the question is which of the semantics you are interested in.
First of all, as you already mentioned \clearpage
not only ends the page (or column in two column mode) but additionally it flushes out all floats that have been deferred. On the face of it that might be a good idea but consider the following situation: you have one float waiting which is just 1/3 of the page size. Now with \newpage
you start a new page and then the float algorithm (see description of this algorithm for details) would kick in and try to place waiting floats onto the next page (and most likely would assign the waiting float to the top area of the next page. In contrast \clearpage
would also output this float but on a page of its own.
So in situations like a chapter start it is advisable to end the previous chapter with a \clearpage
(or rather start the new one with it) to flush out all floats, but in other situations this might result fairly empty pages with only floats on them which may or may not be desired.
A second difference is \clearpage
actually always starts a new "page", while \newpage
really only ends the current column --- and that is a big difference in twocolumn mode. Just try the following to see the difference:
\documentclass[twocolumn]{article}
\begin{document}
A test
\newpage % ends first column but not page
A second test
\newpage
A clearpage test
\clearpage % ends page (which has one column)
A second clearpage test
\end{document}
In my opinion, you can use \clearpage
anywhere unless "there's a special reason for not doing so". This special reason for me is when you (for aestethic or whatever reason) really want to have:
- a really empty page, then you call for instance
\newpage\leavevmode\thispagestyle{empty}\newpage
- something placed on a specific page or whatever (
\clearpage
may add more than one pagebreak if there's a lot of queued floats, whereas\newpage
adds only one) - when you want to have two pages just next to each other (I like it when chapter title in on the left page with no text, and text starts on the right page -- then I use
\newpage
after typesetting the chapter title).
Surely all usage of any of these two commands should be conceptional, I mean, you shouldn't need to use them in a main text of your work, you use them in macro definitions (like my \chapter
mentioned above) or in preamble/...