# Different vsize for first page

Is it possible to alter the vsize for the first page?

I tried this:

\vsize=20cm
\def\pagebody{%
\ifnum\pageno=1%
\vskip13cm\vbox to \vsize{\boxmaxdepth=\maxdepth \pagecontents}%
\else
\vskip5cm\vbox to \vsize{\boxmaxdepth=\maxdepth \pagecontents}%
\fi}%


But it does not seem to work.

Since \vsize, \maxdepth, and \topskip are parameters, you can change them at any time; what happens if you do? Well, TeX salts away the values of \vsize and \maxdepth when it prints the “%% line,” i.e., when the first box or insertion occurs on the current page; subsequent changes to those two parameters have no effect until the next current page is started.

So, if you want a \vsize change to affect the current page, it has to occur before the first box or insertion has been added. In your case, you are trying to change it in the \output routine (since this is where \pagebody is used), which is way too late: the page body has already been fully boxed when the \output routine is called—it is in \box255, so it is clearly too late to hope changing its \vsize.

What you can do is initialize \vsize to 12cm at the beginning of the document (before the first box or insertion has been added) and change its value for subsequent pages from within the \output routine. This has to be done using \global since the \output routine is executed inside a group.

\vsize=12cm

\def\pagebody{%
\ifnum\pageno=1
\vskip 13cm\vbox to \vsize{\boxmaxdepth=\maxdepth \pagecontents}%
\else
\vskip 5cm\vbox to \vsize{\boxmaxdepth=\maxdepth \pagecontents}%
\fi}%

\newcount\mycount

\def\repeattext#1#2{%
\mycount=#1
\loop
\ifnum \mycount >0