我将尝试改进这个问题:正如您所看到的,第四列比显示的值长,而且我了解到,这不是 \vbox 的扩展,而是一个溢出。因此,TeX 不想丢失内容并打印出溢出。好的,但这不是我想要的。有人建议我使用 \vsplit,但我不知道在这种情况下如何使用它。我还不熟悉 \vsplit。现在我清楚了如何获取框的值,它们显示在左侧。现在改进了问题:是否可以捕获溢出,将其转移到一个新框,该框不会在没有被 \copy"x" 明确调用的情况下被打印出来。请给我一个例子,如何在 \setbox3= 中使用 \vsplit
\raggedright
\parindent=0pt
\newdimen\columnwidth%
\columnwidth=100pt%
\newdimen\columndepth
\columndepth=100pt
\newdimen\columnheight
\columnheight=180pt
\newwrite\valuesof
\immediate\openout\valuesof=\jobname.val
\def\text{This is the text that fills the boxes. This is the text that fills the boxes.\vskip\baselineskip }
\def\values[#1]{\immediate\write\valuesof{\vbox{\bf Box#1} \vskip0.2\baselineskip height \the\ht#1 \vskip0.2\baselineskip%
depth \the\dp#1 \vskip0.2\baselineskip%
width \the\wd#1 \vskip0.2\baselineskip}}%to show the values in the text
%endofdefinitions
{\bf Questions about vboxes and their dimensions. \vskip\baselineskip Why are the vboxes extended over a given limit?}\vskip\baselineskip
\vskip\baselineskip
\hbox{%
\setbox0=\vtop to \columnheight{\vskip-0.4pt\hsize\columnwidth\hrule width\hsize\vskip\baselineskip %
\text\text\text\vfill
\hrule width\hsize\vskip\baselineskip
} %
\setbox1=\vtop to \dp0 {\vskip-0.4pt\hsize\columnwidth\hrule width\hsize\vskip\baselineskip %
\text\text\text\vfill
\hrule width\hsize\vskip\baselineskip
} %
\setbox2=\vtop to \dp1{ \vskip-0.4pt\hsize\columnwidth\hrule width\hsize\vskip\baselineskip %
\text\text\text\vfill
\hrule width\hsize\vskip\baselineskip
} %
\setbox3=\vtop to \dp2{ \vskip-0.4pt\hsize\columnwidth\hrule width\hsize\vskip\baselineskip %
\text\text\text\text\vfill
\hrule width\hsize\vskip\baselineskip
} %
\values[0]
\copy0
\values[1]
\copy1%
\values[2]
\copy2%
\values[3]
\copy3%
}%
\vskip60pt
\immediate\closeout\valuesof
\input\jobname.val
\bye%
答案1
你输入了太多内容,tex 报告
Overfull \vbox (127.34444pt too high) detected at line 37
而且盒子太大了。
如果您希望它安静地溢出,请添加\vss
。将其放置在框的开头或结尾,或两者,具体取决于您希望内容如何溢出指定的大小。
这是普通 TeX 的垂直类似物\rlap
,\llap
不同之处仅在于\hss