0

I tried to write a letter with a different value for \topskip on the first page because of the the address field. This works fine:

\tracingoutput=1%
\pdfpagewidth=210mm%
\pdfpageheight=297mm%
\hsize=\pdfpagewidth \advance\hsize by -50mm%
\vsize=\pdfpageheight \advance\vsize by -50mm%
\advance\hoffset by -1in \advance\hoffset by 25mm%
\advance\voffset by -1in%
\parindent=0pt%
%
\topskip=130mm%
Page 1
\vfill\eject
\topskip=50mm%
Page 2
\bye

Now I tried to move the definition into \makeheadline, but it does not work at all.

\def\makeheadline{
  \ifnum\pageno=1
    \topskip=130mm
  \else
    \topskip=50mm
  \fi
  \nointerlineskip}

I would have understood, if it does not work on the first page. But it has no effect at all, neither on the first nor on the second page.

What is the right way to modify \topskip?

2
  • 1
    no need to change topskip just use \vglue 80mm on the first page Commented Nov 18, 2020 at 19:00
  • Never add % after a constant or an explicit length. The resulting space generated by the endline is ignored anyway, and in some cases it might be necessary.
    – egreg
    Commented Nov 19, 2020 at 16:46

1 Answer 1

3

Plain TeX's \makeheadline macro is used to add the page head to the final shipped out page after the page breaking as been done:

\def\plainoutput{\shipout\vbox{\makeheadline\pagebody\makefootline}%
  \advancepageno
...

As such \topskip is set at the wrong time to have any effect on the spacing. \topskip is consulted when the first (typically line) box is added to each page, it needs to have an affect before page breaking so that if you have a large topskip the lines start lower down the page and less content will fit.

To arrange a larger space on the first page, simply set \topskip for your standard later pages and then insert

\vglue 80mm

on the first page, either explicitly or by adding this to the definition of whatever title or opening command your document has. \vglue is a macro wrapping the vskip primitive but inserting a rule so the space is not dropped at the start of the page.

You must log in to answer this question.

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