The commands \newpage
and \clearpage
both force a page break. In addition, the latter command also "flushes" all pending floats from the stack, i.e., forces them to be typeset starting on the page that follows the page break.
My question is: Is it ever a mistake to use \clearpage
rather than \newpage
, other than in cases where one might not want any pending floats to be flushed? From a casual inspection of the definitions of the two commands (see below), I can't tell if there's any trouble lurking in always using \clearpage
.
For ease of reference, here's the definition of \newpage
(from latex.ltx
):
\def \newpage {%
\if@noskipsec
\ifx \@nodocument\relax
\leavevmode
\global \@noskipsecfalse
\fi
\fi
\if@inlabel
\leavevmode
\global \@inlabelfalse
\fi
\if@nobreak \@nobreakfalse \everypar{}\fi
\par
\vfil
\penalty -\@M}
and here's the definition of \clearpage
-- note that it invokes \newpage
:
\def\clearpage{%
\ifvmode
\ifnum \@dbltopnum =\m@ne
\ifdim \pagetotal <\topskip
\hbox{}%
\fi
\fi
\fi
\newpage
\write\m@ne{}%
\vbox{}%
\penalty -\@Mi
}