My question is pretty much the same as Custom pagebreak in align equation with the difference, that I want the best of \allowpagebreaks
and \displaybreak
. Former will produce pagebreaks rather randomly, while latter will force it wherever it is. I would like to be able to specify where a pagebreak may be done, but only if necessary. I'll call that command \allowdisplaybreak
for now to illustrate my point; MNWE(=Minimal Not Working Example):
\begin{align*}
\text{first line of formula 1} \\
\text{second line of formula 1} \allowdisplaybreak \\
\text{first line of formula 2} \\
\text{second line of formula 2} \allowdisplaybreak \\
\text{first line of formula 3} \\
\text{second line of formula 3}
\end{align*}
If this is at the end of the page, it should either break between formula one and two or two and three, but not within the formula and not at both locations (unless that is for very weird reasons advantageous).