Forget about manually using \clearpage
to collect the space; it is much easier to declare \raggedbottom
.
You can do better, though, in terms of visualization! Give this a try; put it in your document preamble
\usepackage{xcolor}
\definecolor{palelime}{rgb}{0.88,1.0,0.55}
\makeatletter
\def\@textbottom{\begingroup \color{palelime}\leaders\hrule\vfill\endgroup}
\makeatother
In case you don't know, "leaders" typically refers to the row of dots that lead the eye to the page number in a table of contents; they fill the space on the line with dots. TeX uses a \leaders
command more generally to occupy space with printed objects in a way that acts like glue. In this case, it fills vertical space (\vfill
) with a colored rectangle or "rule" (see the \rule
command also).
Note that the \vfill
is more aggressive with filling than what's done by \raggedbottom
so that weak filling on the page will be collapsed and be displayed instead as "available space" at the bottom of the page.