Is there a way in LaTeX to disable (or heavily penalise) pagebreaking at a specified place?
Here's an example:
\documentclass[]{minimal}
\usepackage[a6paper]{geometry} % demonstration use only
\begin{document}
May break before this.
May break before this.
May break before this.
May break before this.
May break before this.
Don't break before this\\
or before this.
\end{document}
listingsand having content immediately after it? – Werner Sep 30 '13 at 17:55\end{lstlisting}adds a feasible break point and undo this effect requires going deep in the innards of the package. On the other hand, a break before "or before this" can be avoided with the standard\\*. – egreg Sep 30 '13 at 20:37