I would like to know which pages in my document have more available space left to insert additional content, without changing where the page breaks.

One idea for this would be to automatically insert \clearpage at the end of each page so that the page content is top-aligned and then draw a box over the remaining space on the page underneath the content, but this would also change figure placement.


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

\def\@textbottom{\begingroup \color{palelime}\leaders\hrule\vfill\endgroup}

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.

  • Thanks! This works exactly as I wanted and your explanation was really helpful as well. – danijar Jul 8 '20 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.