Re: Pagebreaks in an aligned environment.
David Carlisle <[email protected]>
| Newsgroups | gmane.comp.tex.texhax |
|---|---|
| Message-ID | <CAEW6iOhtKZpPS=cApe4GsKbfhCjqejebDcFW3czoQ1tdVvuT8A@mail.gmail.com> |
On Fri, 3 Jan 2025 at 05:07, Rolf Turner <[email protected]> wrote: > > In order to get the break > to come after the third displayed equation, I have to put the > \displaybreak command after the *second* equation. This makes no sense > to me. > > Can anyone explain to me what I am missing? Or do I just have to say > "Them's the breaks"? 🙂️ > your test file uses \pagebreak (which does not cause a break at all here) not \displaybreak Your described result presumably means you had \documentclass{article} \usepackage{amsmath} \allowdisplaybreaks \begin{document} \begin{align*} x &= 1 \\ y &= 2 \\ \displaybreak z &= 3 \\ a &= 4 \\ b &= 5 \\ c &= 6 \\ \end{align*} \end{document} \displaybreak sets the penalty at the next \\ to force a page break if that is possible (and warns if not.) This is similar to the behaviour of \pagebreak outside math, where if used in horizontal mode it causes a page break after the current line. This forces a page break after bbb not after aaa \documentclass{article} \begin{document} aaa\\ \pagebreak bbb\\ ccc \end{document} David