Saturday, 24 August 2013

Glue at bottom of page

Glue at bottom of page

I'm writing a lengthy document which will have prompts typically between 2
and 5 lines long with a space after each prompt for notes. Ideally I want
a 2-inch space with a stretch of 1 in and a shrink of 0.2 in. The
'internal' prompts are easily handled with \vspace{2in plus 1in minus
0.2in}.
The problem is at the bottom of the page, since TeX absorbs glue at the
bottom of pages. I've tried variations of \vspace, \filbreak, and
\def\filbreak{\par\vfil\penalty-200\vfilneg}, adjusting both the \vfil and
\vfilneg. No success. Either the bottom prompt's space is the normal 2 in
and the rest are spaced evenly using the remaining space or the bottom
space is whatever's left on the page after the others are set to 2 in.
Is there any way to (automatically) evenly distribute the spaces?
\documentclass{article}
\usepackage[showframe,margin=1in]{geometry}
%\def\spacer{
% \par\vspace*{1.7in plus 0.5in minus 0.3in} \penalty-200 %
% \vfilneg}
\def\comment{The page total is \the\pagetotal. \spacer}
\def\spacer{\par\vspace{2.4in plus 1in minus 0.2in} \penalty-200}
\raggedbottom
\begin{document}
\comment
\comment
\comment
\comment
...
\comment
\end{document}

No comments:

Post a Comment