131

The report I'm writting features a lot of long, multiple lines equations. To reduce visual polution I've been using an aligned environment nested inside equation. This way (unlike just using an align environment) I get only a single label for all the lines.

The problem is that so many long equations often need to be broken into two pages, otherwise I get lots of blank vertical space in the document. However the aligned environment does not allow the \displaybreak command.

Is there an alternative way to achieve a pagebreak inside an aligned equation?

Here's a sample ofthe equations I'm using

\begin{equation}
    \begin{aligned}
    ...\\
    ...\\  %I need to pagebreak here
    ...\\
\end{aligned}\end{equation}    
  • 1
    What about the split environment? – Stephan Lehmke Apr 12 '12 at 18:05
  • 3
    About \begin{equation}\begin{aligned}: Would \begin{align}...\notag \\ \label{where you want it} \\ \end{align} (or the split environment as mentioned by Stephan Lehmke) be a possible alternative for you? – Stephen Apr 12 '12 at 18:09
  • @Stephen I'll try it now, but according to AucTeX split can't be broken either. align+\notag seems like a good idea. I wasn't using it because that would involve managing dozens of \notags. But I suppose I could use it only on the problematic equations. – Malabarba Apr 12 '12 at 21:15
  • 4
    if you only want one number you can use the starred form of the environment and use \tag once rather than the unstarred form and use \notag on all but one line – David Carlisle Apr 12 '12 at 22:22
143

In relation to the comments I want to answer this question.

First of all to allow page breaks inside equations you have to set the command \allowdisplaybreaks. Without setting this one no page break occurs.

Using a simple align-environment. Of course as @DavidCarlisle suggested you can use the star variant to suppress the numbering and set a specific tag by \tag.

The environment split can't handle page breaks.

\documentclass{article}
\usepackage{amsmath}
\usepackage{kantlipsum}
\usepackage{showframe}
\allowdisplaybreaks

\begin{document}
\kant[1-3]
\begin{align*}
    a\\
    b\\
    c\\
    d\\
    e\tag{\stepcounter{equation}\theequation}\\
    f\\
    g\\
    h\\
    i
\end{align*}
\end{document}
  • The tag thing is not working for me. I found this \stepcounter{equation}\tag{\theequation}\label{myeq1} working. – Sibbs Gambling Dec 28 '14 at 9:12
  • 1
    It somehow solves my problem of a mildly underfull split equation...it didn't break, but fudge the spaces a little bit...why...? – Troy Woo Feb 9 '15 at 15:42
  • 15
    What's the correct way to set \allowdisplaybreaks locally? Just directly saying it inside a group surrounding the align*? Or inside the align*? – Evgeni Sergeev Jul 29 '17 at 10:57
  • @EvgeniSergeev see this answer - yes, using a group works – craymichael Jul 23 at 23:23
30

Additionally to the above answers, as asked in comments, the command \allowdisplaybreaks from amsmath can be used locally do a display break by using the \begingroup and \endgroup commands:

\begingroup
\allowdisplaybreaks
\begin{align}
    ....
\end{align}
\endgroup
13

Just add the \allowdisplaybreaks command from the amsmath package to the preamble of your document. Works only with the math environments provided by this package. So you can use align.

  • 6
    Isn't this all covered in the other answer? – Johannes_B Nov 5 '17 at 9:13
  • 3
    @Johannes_B To be fair, the other answer doesn't clarify that this only works with the environments from amsmath, so that the solution doesn't work with, for example, a custom math environment. This answer does clarify that. – Chill2Macht Sep 18 '18 at 16:41
-2

I am posting my version because it took me some time to figure that out and i hope it will help others also.

\allowdisplaybreaks goes before \begin{document} and it is used only once. Then a very general code example for an equation is the following

\begin{align} 
\sum{...a very large expression...} &= \sum{...another large expression...} \nonumber \\ 
&= \sum{...a result which is also large but needs to be aligned under first "="...} \nonumber \\
{...again a large expression...} &= {...still a large expression...}  \\
&= {... a final large expression...}
\end{align} 

If \nonumber is not used, latex will assign numbers to every line break which for the majority of cases is useless. That worked for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.