Breaking a LaTeX environment across pages - the smart way

TeX can insert page break before any glue, for example \vskip 1em.

Make some changes:

1) You write \vskip 1em\hrule\vskip 1em Replace it with

\vskip 1em\hrule \nobreak \vskip 1em

2) You write \vskip .5em\hrule\vskip 1em Replace it with

\nobreak\vskip .5em\hrule\vskip 1em

You also can insert \goodbreak to show good point to break the page. This good point can be inserted before and after your excersise.

1) \goodbreak\vskip 1em\hrule \nobreak \vskip 1em

2) \nobreak\vskip .5em\hrule \goodbreak \vskip 1em

Tags:

Latex