Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've read through answers to similar question but I still have the same problem. Essentially, I have some large equations and they are in the form

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}

\begin{align}

long equation

\end{align}

\end{equation}
\end{document}

These large equations result in inconsistent spacing between the text and equations in the previous page. The problem seems to be that Latex won't break the long equation into two pages.

In the preamble, I have \allowdisplaybreaks and \displaybreak but to no avail. How can I fix this? I am using the amsmath package.

share|improve this question
1  
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  egreg Mar 30 '13 at 12:02
    
You shouldn't write align inside equation. They both are “at the same level”. You have to choose one (equation = one line, align = multiple lines). –  Manuel Mar 30 '13 at 12:23
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. I have converted your code snippet into a minimal working example (MWE). I hope that is fine with you. –  hpesoj626 Mar 30 '13 at 13:02
    
You should also not surround display-math environments (such as align and equation) by blank lines; in LaTeX, blank lines have the same effect as \par, which, in this particular case, introduces unwanted vertical space. –  Jubobs Mar 30 '13 at 13:36
add comment

1 Answer

up vote 4 down vote accepted

the equation environment is meant for a "single" equation, which may be either one line or a "subsidiary" multi=line group such as aligned. it will not break, even with an explicit \displaybreak.

furthermore, nesting align within equation will produce an error message:

! Package amsmath Error: Erroneous nesting of equation structures;
(amsmath)                trying to recover with `aligned'.

trying to use \displaybreak in this situation will produce another error:

! Package amsmath Error: \displaybreak cannot be applied here.

error messages should be heeded.

if you remove the equation environment and simply use align, in the presence of the global \allowdisplaybreaks command, the multi-line display will break at the end of a page at the normal page length. even without \allowdisplaybreaks, an explicit \displaybreak will force a break after the line on which the command appears.

if no numbers are wanted on any line, the environment align* can be used. and if only a single tag is wanted for the group, with align* it is possible to insert a manual label using the \tag{...} command on the desired line. the value will have to be handled manually. to do that, just before the display, issue the command

\stepcounter{equation}

and for the explicit label, use \tag{\theequation}.

share|improve this answer
    
Thank you for the replies. I tried that and it worked. However, every line of my equation is now numbered. But I wanted only one number for the entire multiline equation. Using aligned produces the same problem of not being able to break up the equation. –  Nav Mar 30 '13 at 15:23
    
@Nav -- please see edited answer for a manual workaround. –  barbara beeton Mar 30 '13 at 15:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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