It seems that the align environment adds additional vertical space if it starts at the top of a page or minipage. Below are two pages, and two minipages (on Page 1), where the first page/minipage has text followed by an align* environment, and the second page/minipage starts with an align* environment, and note that the equations are still aligned.

enter image description here

Attempted Solution:

The closest related question I found was:

I attempted to use the solution by Gonzalo Medina at the above by adding \setlength\abovedisplayskip{0pt} (after the preamble as per Vertical space before and after align environment). Although, this did move the equations up vertically, they were still vertically aligned:

enter image description here

And since the problem occurs at top of a page as well, I don't think this is related to Understanding minipages - aligning at top


  1. How can I adjust the align environment to automagically not have additional space at the top of a page or minipage?
  2. Is there a reason for this behavior, and perhaps should not be changed?



Top of Page 1
\begin{align*}% Text above at top of page
 e &= m c^2

    Top of minipage 1
    \begin{align*}% Text above this minipage
     e &= m c^2
    \begin{align*}% No text above in this minipage
     e &= m c^2

\begin{align*}% No text above at top of page
 e &= m c^2

The alignment environments of amsmath are not designed to be at the start of a paragraph. While this can be acceptable in normal situations, this has bad effects when we use a minipage for typesetting an alignment at a reduced width.

The minipage problem can be solved by patching the \start@align command (and also \start@gather and \start@multline) with


This exploits the fact that at the start of a minipage the conditional \if@minipage is true, but upon starting a paragraph it becomes false, so subsequent align environments in the same minipage won't be affected.

There is a similar patch for "curing" the environments at start-of-paragraph, but I'm somewhat reluctant to show it, as I believe that a paragraph should never start with a displayed equation (with the above mentioned exception).

  • Your solution works perfectly for a minipage, as long as it is not at the top of a page (in which case it shifts the equation too far up). And while I agree that in a normal document one should not start a page with a displayed equation, most of the time I am producing a single page which is composed entirely of a \begin{align}...\end{align} with a few \shortintertext in-between so would like to eliminate that space. – Peter Grill Dec 3 '11 at 20:29

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.