3

If a page contains multiple \vfills, the space space is distributed equally between them. That means if you want one-third of the available space above some text and two-thirds below it, you can put \vfill above and \vfill\vfill below.

However at the moment our typesetting system (a heavily hacked up version of Pandoc) is hard-coding a single \vfill below the text. (This isn't being generated by a macro which could be altered with \patchcmd – it appears literally in the TeX source.) Is there anything I can do to insert a half \vfill above the text? \vfill is nearly equivalent to \vspace{\fill}, so I hoped I might be able to do \vspace{0.5\fill} (possibly with \includepackage{calc}), but this seems not to work. Is there a way of achieving this?

MWE for illustration:

\documentclass[a4paper]{article}
\begin{document}
Top of page
\vfill  % Needs changing to be a 0.5\vfill

% The code from here on cannot be altered This should be one-third of the way down the page \vfill\clearpage \end{document}

(I know I could redefine \vfill to be \vfill\vfill, but I was hoping for a better solution.)

In case it's relevant, I'm using XeLaTeX.

richard
  • 720

1 Answers1

6
\documentclass[a4paper]{article}
\begin{document}
Top of page

\vspace{0pt plus 0.5fill} 

This should be one-third of the way down the page

\vfill

\clearpage
\end{document}

enter image description here

Ulrike Fischer
  • 327,261