4

I am having some issues with the positioning of a page break with align.

My code is roughly the following.

\documentclass{article}
\usepackage{amsmath, amsthm}
\begin{document}
%Lots of text to force the page break.
Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. 

\begin{proof}
%Some more text to force the page break and get the "$a=b$." in the correct position.
Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some $a=b$.
\begin{align*}
%Something pretty long to force a new page whilst leaving a blank area.
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\\a&b\\a&b
\end{align*}
\end{proof}
\end{document}

Now, align takes a new page and leaves a large blank bit at the bottom of the previous page, which is fine. However, it also takes the last line of text with it, and the last line of text is simply $a=b$. Which is silly! So I want to utilise this large blank space by putting the $a=b$. there. Is there a proper way of doing this? (I got a "hackey" answer by putting a \newpage before the \align, but this is immoral!)

I believe the standard answer would be to use a \minipage. However, the \proof reacts oddly to this.

Note: I found this question, this one, and this one. All have close-but-no-cigar answers (the last one seems promising, but has the same issue as minipage does).

11
  • 1
    This is standard. LaTeX does not like to start a page with display math. And also by standard an align cannot be broken across pages. You can tell it is allowed to break the align (see the amsmath manual), or you can add some comments using \intertext{...} or \shortintertext from mathtools), with add break points.
    – daleif
    May 20, 2014 at 11:23
  • Yes, I understand what LaTeX is trying to do. I just want to not let it do it. Also, aren't your comments suggestions as rigid as the \newpage hack (although I am not sure I understand what you mean by them)?
    – user1729
    May 20, 2014 at 11:28
  • No, my solution would be to break the align instead of attempting to control what it brings along to the next page and leaving behind an unfinished page.
    – daleif
    May 20, 2014 at 11:35
  • You can add \pagebreak between two words in the last but two line before the display; or simply have ~ instead of a space before $a=b$. If you are keen to split the display, add \displaybreak before the \\ that ends one line.
    – egreg
    May 20, 2014 at 12:40
  • 1
    this suggestion violates all principles. however, leaving a blank line before the display (the align) will allow a page break there. but if you rewrite anything before that, and the display then fits, the vertical spacing will be all wrong. May 20, 2014 at 14:38

1 Answer 1

3

This is controlled by \predisplaypenalty which latex sets to the maximum 10000. Reducing this to say 9900 will allow a page break here:

Sample from page 1

\documentclass{article}
\usepackage{amsmath, amsthm}
\begin{document}
%Lots of text to force the page break.
Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. Lots of text. 

\begin{proof}\predisplaypenalty=9900
%Some more text to force the page break and get the "$a=b$." in the correct position.
Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some $a=b$.
\begin{align*}
%Something pretty long to force a new page whilst leaving a blank area.
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\\a&b\\a&b
\end{align*}
\end{proof}
\end{document}
2
  • Thanks, this is great! I am presuming that your code just changes the penalty in this proof environment?
    – user1729
    May 20, 2014 at 11:33
  • 1
    Yes, in the above code the change is limited to that environment. You can set the penalty in the preamble if you really want this value for the whole document. May 20, 2014 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .