How to fill the rest of the page with horizontal rules?

This was a posting in the texhax mailing list of TeX Users Group. Among all, Phil Taylor s solution seemed to be the best. I have extended to fill arbitrary vertical remaining space in a page in the following manner:

\newdimen\spaceleft
 \def\pagespace{%
  \ifdim\pagetotal=0pt
     \spaceleft=\vsize
   \else
     \spaceleft=\pagegoal
     \advance\spaceleft by-\pagetotal
  \fi}
 \def\fillWithLines{\null{}\pagespace\vbox to \spaceleft
       {\xleaders \vbox to 1 pc
        {\vfil \hrule width \hsize \vfil} \vfil}}

Since this is a plain TeX macro, it should work with all flavours.

0 Responses to “How to fill the rest of the page with horizontal rules?”


  • No Comments

Leave a Reply