\vbox 到 0pt 创建较小的垂直空间

\vbox 到 0pt 创建较小的垂直空间

我有以下纯 TeX 文件:

\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%
\topskip=0mm%
\parindent=0pt%
%\def\makeheadline{}%               1.) No vertical space at the top
%\def\makeheadline{\vbox to 0pt{}}% 2.) A small vertical space at the top
\rm%
X begin

X end
\bye

当我包含第一个标题定义时,文本直接从开头开始。但是当我包含第二个标题定义时,文本和页面之间有一个小空间,尽管标题只包含一个 0pt 的 vbox。

这个空间从何而来以及如何避免它?

答案1

\def\makeheadline{}

Completed box being shipped out [1]
\vbox(166.26378+0.0)x142.26378
.\vbox(142.26378+0.0)x142.26378, glue set 123.31934fill
..\glue(\topskip) 0.0
..\hbox(6.94444+1.94444)x142.26378, glue set 107.81926fil
...\hbox(0.0+0.0)x0.0
...\tenrm X
...\glue 3.33333 plus 1.66498 minus 1.11221
...\tenrm b
...\kern0.27779
...etc.
..\glue(\parskip) 0.0 plus 1.0
..\glue(\baselineskip) 3.11111
..\hbox(6.94444+0.0)x142.26378, glue set 115.87485fil
...\hbox(0.0+0.0)x0.0
...\tenrm X
...\glue 3.33333 plus 1.66498 minus 1.11221
...\tenrm e
...\tenrm n
...etc.
..etc.
.\glue(\baselineskip) 17.55556
.\hbox(6.44444+0.0)x142.26378, glue set 68.63188fil
..\glue 0.0 plus 1.0fil minus 1.0fil
..\tenrm 1
..\glue 0.0 plus 1.0fil minus 1.0fil

\def\makeheadline{\vbox to0pt{}}

Completed box being shipped out [1]
\vbox(167.26378+0.0)x142.26378
.\vbox(0.0+0.0)x0.0
.\glue(\lineskip) 1.0
.\vbox(142.26378+0.0)x142.26378, glue set 123.31934fill
..\glue(\topskip) 0.0
..\hbox(6.94444+1.94444)x142.26378, glue set 107.81926fil
...\hbox(0.0+0.0)x0.0
...\tenrm X
...\glue 3.33333 plus 1.66498 minus 1.11221
...\tenrm b
...\kern0.27779
...etc.
..\glue(\parskip) 0.0 plus 1.0
..\glue(\baselineskip) 3.11111
..\hbox(6.94444+0.0)x142.26378, glue set 115.87485fil
...\hbox(0.0+0.0)x0.0
...\tenrm X
...\glue 3.33333 plus 1.66498 minus 1.11221
...\tenrm e
...\tenrm n
...etc.
..etc.
.\glue(\baselineskip) 17.55556
.\hbox(6.44444+0.0)x142.26378, glue set 68.63188fil
..\glue 0.0 plus 1.0fil minus 1.0fil
..\tenrm 1
..\glue 0.0 plus 1.0fil minus 1.0fil

diff

2c2,4
< \vbox(166.26378+0.0)x142.26378
---
> \vbox(167.26378+0.0)x142.26378
> .\vbox(0.0+0.0)x0.0
> .\glue(\lineskip) 1.0

\makeheadline如果你看一下的标准定义plain.tex,你会看到

\def\makeheadline{\vbox to\z@{\vskip-22.5\p@
  \line{\vbox to8.5\p@{}\the\headline}\vss}\nointerlineskip}

并且\nointerlineskip产生了差异。

相关内容