LaTeX suppress page break

\nopagebreak[number]

The \nopagebreak command prevents LaTeX from breaking the current page at the position of the command. With the optional argument, number, you can convert the \nopagebreak command from a demand to a request. The number must be a number from 0 to 4. The higher the number, the more insistent the request is.

Or you can change your verse to a minipage... though if the list is longer than a page, latex will probably puke.


A very simple solution I've found is with \filbreak before each (see the FAQ).

enter image description here

\documentclass{article}
\begin{document}
\LARGE
{*}{*}to do\\
\begin{verse}
{*}today
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\filbreak
{*}testDay
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\filbreak
{*}testDay
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\filbreak
{*}testDay
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\filbreak
{*}testDay
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\end{verse}
\end{document}

Surround your testday and verse with a \begin{samepage} and \end{samepage}, i.e.:

\begin{samepage}
{*}testDay
\begin{verse}
testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo\\*testItemToDo
\end{verse}
\end{samepage}

This still allows the verse to break a page fine, provided you get rid of some \\*.

Tags:

Latex