2010-10-23 18 views
10

que quiero hacer algo como lo siguiente en TeX:Hacer un bloque indisoluble en 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} 

es esto posible?

+1

Es posible que desee considerar preguntar en http://tex.stackexchange.com. –

+1

Enlace cruzado para mayor comodidad: http://tex.stackexchange.com/questions/4471/unbreakable-block –

Respuesta

19

Usted podría intentar

\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 impide látex del pagebreaking dentro de un párrafo, es decir, dentro de la samepage envirnment, saltos de página son sólo entre párrafos. Por lo tanto, también necesita nopagebreak, para evitar que LaTeX salte entre dos párrafos.

6

Una prueba rápida revela que minipage tiene este comportamiento, también.

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

\begin{minipage}{3in} 
Another contiguous chunk. 
\end{minipage} 
Cuestiones relacionadas