2

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.

1 Answer 1

4

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .