关于TeXbook附录E的问题

关于TeXbook附录E的问题

附录 E 中的信件格式示例有些奇怪电子书

在第 253 页上,如果使用标题,则 \voffset 应该增加两行文本。这解释了为什么在附录 E 中这样做:

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

有趣的是,我们可以将 \voffset 设置为任何值,输出也不会改变。问题是,为什么输出不会改变,\voffset如果它没有任何用处,为什么要设置?

注:\voffset用作\vglue


以下是test.texletterformat.tex

这里是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}

这是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

该设置针对页面第一个之后

如果我设置\voffset=0truept添加段落到信中以填充更多页面,我会得到

在此处输入图片描述

有了\voffset=24truept,我得到

在此处输入图片描述

相关内容