Page Layout ⇒ Unwanted Automatic Page Break in Align
Unwanted Automatic Page Break in Align
While I was working on my math paper, I noticed something very odd after I compiled my document. I saw that Latex automatically page break my equations that I aligned. In other words, Latex wrote the following:
\being{align*}
TEXT TEXT TEXT
TEXT TEXT TEXT
TEXT TEXT TEXT
TEXT TEXT TEXT
TEXT TEXT TEXT
TEXT TEXT TEXT
\end{align*}
onto the page after the page I intended the equations to be on. I figured that the reason or this is that my equations in my align box is so much (around 8 - 9 lines) and so Latex page broke for me to make it look nice. However, I do not want that. I want to leave the equations on the same page that I wrote it in and let it continue onto the next page. I tried to use the command \nopagebreak and it still does not work. Anyone got any advice? Thanks. P.S. The 8-9 lines is necessary because the algebra is extremely tedious and long.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Unwanted Automatic Page Break in Align
the amsmath package implements two useful commands: \displaybreak to allow page breaks inside particular math environments and \allowdisplaybreaks (to be used in the preamble) to allow page breaks inside math environments globally. An example:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{lipsum} % just to generate filler text for the example
\begin{document}
\lipsum[1-2]
\begin{align*}
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
a &=b \displaybreak\\
a &=b \\
a &=b \\
a &=b \\
a &=b \\
\end{align*}
\end{document}