I have a bunch of graphics and text on pages that I would like to automatically center vertically. In some cases there is extra whitespace due to page breaks that leave a large amount of footer space that makes the page look top heavy. I do not want to manually add vertical space since the organization of graphics and text may change forcing me to update all the vfill's or vspace.

Is there a way to have tex this for me behind the scenes?


1 Answer 1


Yes, there is. You need to define \@texttop and \@textbottom. These are used in the LaTeX kernel output routine and can contain skip lengths.

\def\@texttop{\ifnum\c@page>0\vskip \z@ plus 3fil\relax\fi}
\def\@textbottom{\ifnum\c@page>0\vskip \z@ plus 2fil\relax\fi}}
This can be a poem
     to see how it will

See Use of \@texttop and \@textbottom for vertical positioning for a more technical explanation.

  • how do I reset to the original though? May 24, 2012 at 17:27
  • @AbstractDissonance Maybe write another macro \resetopandbottom which sets the values to the original LateX skips \vskip 0pt plus .00006fil. May 24, 2012 at 18:16

You must log in to answer this question.

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