TeX:在垂直盒子中嵌套水平盒子没有按预期显示
使用以下简单的 TeX:
\hbox to \hsize {
\vbox to 2 true in {
aaa aaaaa aaaaa aaa aaaaa aaaa aaa aaaa aaa. aaa aaaaa aaaaa aaa aaaaa aaaa aaa
aaaa aaa aaa aaaaa aaaaa aaa aaaaa aaaa aaa aaaa aaa. aaa aaaaa aaaaa aaa aaaaa
aaaa aaa aaaa aaa. }
\vbox to 2 true in {
bbb bbbbb bbbbb bbb bbbbb bbbb bbb bbbb bbb. bbb bbbbb bbbbb bbb bbbbb bbbb bbb
bbbb bbb bbb bbbbb bbbbb bbb bbbbb bbbb bbb bbbb bbb. bbb bbbbb bbbbb bbb bbbbb
bbbb bbb bbbb bbb. }
}
目标是看到两个盒子侧面包含一段左右的文本。除了 TeXed 时,第一个 vbox 拉伸到 \hsize 的完整大小,将第二个 vbox 挤出页面。
为什么这不能按预期工作?可能有更好的方法来实现并排段落,但我仍然对这里的问题感兴趣。
With the following plain TeX:
\hbox to \hsize {
\vbox to 2 true in {
aaa aaaaa aaaaa aaa aaaaa aaaa aaa aaaa aaa. aaa aaaaa aaaaa aaa aaaaa aaaa aaa
aaaa aaa aaa aaaaa aaaaa aaa aaaaa aaaa aaa aaaa aaa. aaa aaaaa aaaaa aaa aaaaa
aaaa aaa aaaa aaa. }
\vbox to 2 true in {
bbb bbbbb bbbbb bbb bbbbb bbbb bbb bbbb bbb. bbb bbbbb bbbbb bbb bbbbb bbbb bbb
bbbb bbb bbb bbbbb bbbbb bbb bbbbb bbbb bbb bbbb bbb. bbb bbbbb bbbbb bbb bbbbb
bbbb bbb bbbb bbb. }
}
the goal is to see two boxes side containing a paragraph or so of text. Except that when TeXed, the first vbox stretches to the full size of \hsize, squeezing the second vbox off the page.
Why doesn't this work as expected? There might be a better way to implement side-by-side paragraphs, but I'm still interested in what's wrong here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
段落中的一行文本将始终延伸到 \hsize (该段落末尾的 \hsize 的值)。因此,例如使用:
A line of text in a paragraph will always stretch to \hsize (the value of \hsize at the end of that paragraph). Thus, use for example: