在两个对页上制作给定文本的 Latex 排版
我如何鼓励/让 Latex 排版文本的某些部分,以便它全部出现在连续的偶数页、奇数页对页面上?
经过反复试验,可以诱使 \nopagebreak
这样做,但是有没有一种有效的策略呢?像 samepage
这样的环境是理想的,但是这样的环境:
- 如果需要获取对页上的所有文本,将在奇数页上强制分页;
- 允许在环境主体中的任何位置最多分页,如果不能确保这一点,则会失败。
How do I encourage/make Latex typeset some portion of text so that it will all appear on a consecutive even-page, odd-page pair of pages?
With trial and error, \nopagebreak
can be coaxed into doing this, but is there a strategy that Just Works? Something like a samepage
environment would be ideal, but one that:
- Will force a pagebreak on odd pages if that is needed to get all the text on facing pages;
- Allows up to one page break anywhere in the environment body, and fails noisily if that can't be ensured.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以组合一个环境,例如
如果您想要更吵闹的故障,请将
\PackageWarning
更改为\PackageError
,\unvbox
es 应允许注释/浮动才能正常工作 - 如果您不需要它,您可以考虑将它们全部更改为\box
es (尽管我对\vsplit 的行为有点生疏
关于框深度和跳过,因此这可能会产生有趣的行为,但它可以保证您只需要两页,即从第二页底部流出任何额外的内容)。You could put together an environment such as
If you want a noisier failure, change
\PackageWarning
into\PackageError
, The\unvbox
es should allow for notes/floats to work properly - if you don't need that, you might consider changing them all to\box
es instead (although I'm a bit rusty on the behavior of\vsplit
with respect to box depths and skips, so that might produce funny behavior, but it would guarantee that you only took two pages by flowing anything extra off the bottom of the second page).\clearpage
和之间存在区别\cleardoublepage
。通过在左侧您想要的内容之前使用\cleardoublepage
,在右侧您想要的内容之前使用\clearpage
,您可以强制使用您想要的布局寻找。当然,
twoside
选项是必须的。There is a distinction between
\clearpage
and\cleardoublepage
. By using\cleardoublepage
just before the stuff you want on the left hand side and\clearpage
before the stuff you want on the right hand side you can force the layout you're looking for.Of course, the
twoside
option is must.