2

There is something very strange with letter format example in Appendix E of TeXbook.

On p.253 it is said that \voffset should be increased by two lines of text if headlines are used. This explains why this is done in Appendix E:

...
\voffset=24pt
\advance\vsize by-\voffset
...
\nopagenumbers
\headline={\ifnum\pageno>1
...

The interesting thing is that we can set \voffset to any value, and the output will not change. The question is why the output does not change and why to set the \voffset if it serves no purpose?

NOTE: \voffset is used as the argument to \vglue


Following are test.tex and letterformat.tex.

Here is the letterformat.tex:

\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\raggedbottom
\interlinepenalty=1000
\hsize=6.25truein
\voffset=24pt
\advance\vsize-\voffset
\parindent=0pt
\parskip=0pt
\nopagenumbers
\headline={\ifnum\pageno>1
  \tenrm To \addressee\hfil\today\hfil Page \folio
  \else\hfil\fi}
\def\beginlinemode{\endmode
  \begingroup\obeylines\def\endmode{\par\endgroup}}
\def\beginparmode{\endmode
  \begingroup\parskip=\medskipamount \def\endmode{\par\endgroup}}
\let\endmode=\par
\def\endletter{\endmode\vfill\supereject}
\newdimen\longindentation \longindentation=4truein
\newbox\theaddress
\def\address{\beginlinemode\getaddress}
{\obeylines\gdef\getaddress #1
  #2
  {#1\gdef\addressee{#2}%
    \global\setbox\theaddress=\vbox\bgroup\raggedright%
    \hsize=\longindentation \everypar{\hangindent2em}#2
    \def\endmode{\egroup\endgroup \copy\theaddress \bigskip}}}
\def\body{\beginparmode}
\def\closing{\beginlinemode\getclosing}
{\obeylines\gdef\getclosing #1
  #2
  {#1\nobreak\bigskip \leftskip=\longindentation #2
    \nobreak\bigskip\bigskip\bigskip % space for signature
    \def
    {\endgraf\nobreak}}}
\def\annotations{\beginlinemode\def\par{\endgraf\nobreak}\obeylines\par}
\def\ps{\beginparmode\nobreak
  \interlinepenalty5000\def\par{\endgraf\penalty5000}}
\def\up#1{\leavevmode \raise.16ex\hbox{#1}}
\font\smallheadfont=cmr8 at 8truept
\font\largeheadfont=cmdunh10 at 14.4truept
\font\logofont=manfnt at 14.4truept
\def\rjdletterhead{
  \def\sendingaddress{R. J. DROFNATS, F.T.U.G.\par
    PROFESSOR OF FARM ECOLOGY\par
    TEX.RJD @ SU-SCORE.ARPA\par
    \up[415\up]\thinspace 497-4975\par}
  \def\returnaddress{R. J. Drofnats, Dept.~of Farm Ecology\par
    The University of St.~Anford\par
    P. O. Box 1009, Haga Alto, CA 94321 USA}
    \letterhead}
\def\letterhead{\pageno=1 \def\addressee{} \univletterhead
  {\leftskip=\longindentation
  {\baselineskip9truept\smallheadfont\sendingaddress}
  \bigskip\bigskip\rm\today\bigskip}}
\def\univletterhead{\vglue-\voffset
  \hbox{\hbox to\longindentation{\raise4truemm\hbox{\logofont
  \kern2truept X\kern-1.667truept
  \lower2truept\hbox{X}\kern-1.667truept X}\hfil
  \largeheadfont The University of St.~Anford\hfil}%
  \kern-\longindentation
  \vbox{\smallheadfont\baselineskip9truept
  \leftskip=\longindentation BOX 1009\par HAGA ALTO, CA 94321}}
  \vskip2truept\hrule\vskip4truept }
\def\makelabel{\endletter\hbox{\vrule
  \vbox{\hrule \kern6truept
  \hbox{\kern6truept\vbox to 2truein{\hsize=\longindentation
  \smallheadfont\baselineskip9truept\returnaddress
  \vfill\moveright 2truein\copy\theaddress\vfill}%
  \kern6truept}\kern6truept\hrule}\vrule}
  \pageno=0\vfill\eject}

Here is test.tex:

\magnification=\magstep1
\input letterformat

\rjdletterhead

\address
Prof.~Brian~K. Reid
Department of Electrical Engineering
Stanford University
Stanford, CA 94305

\body
Dear Prof.~Reid:

I understand that you are having difficulties with
Alka-Seltzer tablets. Since there are 25~pills
per bottle, while the manufacturer's directions
recommend ``plop,~plop, fizz,~fizz,'' my colleagues
tell me that you have accumulated a substantial
number of bottles in which there is one tablet
left. % (See the 1978 SCRIBE User Manual, page 90.)

At present I am engaged in research on the potential
applications of isolated analgesics. If you would
be so kind as to donate your Alka-Seltzer collection
to our project, I would be more than happy to send
you preprints of any progress reports that we may
publish concerning this critical problem.

\closing
Sincerely,
R. J. Drofnats
Professor

\annotations
RJD/dek
cc: {\sl The \TeX book}

\ps
P. S. \ If you like, I will check into the
possibility that your donation and the meals that
you have been eating might be tax-deductible, in
connection with our research.
\endletter
%\makelabel
\end

1 Answer 1

1

The setting is for pages after the first.

If I set \voffset=0truept after adding paragraphs to the letter so as to fill more pages, I get

enter image description here

With \voffset=24truept, I get

enter image description here

2
  • What's the point in decreasing \vsize? Should not the excess size take the place of the former footline? Besides, is it consistent that \vsize is decreased for all pages, including first, while \voffset takes effect only starting from second? Aug 11, 2020 at 7:56
  • 1
    @IgorLiferenko The pages' bottoms are aligned (if there are more pages). That's what is wanted.
    – egreg
    Aug 11, 2020 at 8:09

You must log in to answer this question.

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