TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
how do I reset to the original though? – AbstractDissonance May 24 '12 at 17:27
@AbstractDissonance Maybe write another macro \resetopandbottom which sets the values to the original LateX skips \vskip 0pt plus .00006fil. – Yiannis Lazarides May 24 '12 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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