在 TeX 中制作一个牢不可破的块 [英] Make an unbreakable block in TeX

查看:22
本文介绍了在 TeX 中制作一个牢不可破的块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 TeX 中执行以下操作:

I want to do something like the following in TeX:

egin{nobreak}  

Text here will not split over pages, it will remain
as one continuous chunk. If there isn't enough room
for it on the current page a pagebreak will happen
before it and the whole chunk will start on the next
page.  

end{nobreak}

这可能吗?

推荐答案

你可以试试:

egin{samepage}
 This is the first paragraph. This is the first paragraph. 
 This is the first paragraph. This is the first paragraph. 

 
opagebreak
 This the second. This the second. This the second. 
 This the second. This the second. This the second. 
 This the second. This the second. 
end{samepage}

samepage 防止 LaTeX 在一个段落内分页,即在 samepage 环境中,分页仅在段落之间.因此,您还需要 nopagebreak 来防止 LaTeX 在两个段落之间分页.

samepage prevents LaTeX from pagebreaking within one paragraph, i.e. within the samepage environment, pagebreaks are only between paragraphs. Thus, you need nopagebreak as well, to prevent LaTeX from pagebreaking between two paragraphs.

这篇关于在 TeX 中制作一个牢不可破的块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆