31

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

\begin{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}

这可能吗?

4

2 回答 2

43

你可以试试:

\begin{samepage}
 This is the first paragraph. This is the first paragraph. 
 This is the first paragraph. This is the first paragraph. 

 \nopagebreak
 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 在两个段落之间分页。

于 2010-10-24T13:19:07.110 回答
15

快速测试表明它minipage也有这种行为。

\begin{minipage}{3in}
One contiguous chunk.
\end{minipage}

\begin{minipage}{3in}
Another contiguous chunk.
\end{minipage}
于 2010-10-24T13:37:26.557 回答