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}

samepageLaTeXが1つの段落内でページブレイクするのを防ぎます。つまり、samepage環境内では、ページブレイクは段落間のみになります。nopagebreakしたがって、 LaTeXが2つの段落間でページを壊さないようにする必要もあります。

于 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 に答える