5

I noticed some strange behavior in the align* (or just align) environment. The code

\begin{proof}
  \begin{align*}
    C=1 \qedhere
  \end{align*}
\end{proof}`

puts overlaps the tombstone with the equation, whereas

\begin{proof}
  \begin{align*}
    C &=1 \qedhere
  \end{align*}
\end{proof}`

properly puts the tombstone to the right.

What is causing this strange behavior? What exactly is the ampersand doing here?

  • 3
    The align environment without an & is useless; there's gather for centering equations. – egreg Oct 19 '11 at 16:07
  • 2
    @egreg I've always used align* without an & and only one equation as if it were equivalent to the displaymath environment. (This is how I noticed the strange behavior I'm asking about.) Is it somehow or incorrect or bad to use align* as displaymath? – Quinn Culver Oct 19 '11 at 16:10
  • They aren't equivalent. For one equation there's equation*, for more non aligned equations there's gather*; align* is for aligned equations (say at a relation symbol). Yes, it's bad to use align* as displaymath. – egreg Oct 19 '11 at 16:13
  • 1
    @egreg I still don't see why they're not equivalent (and hence why it's bad to use align* as displaymath). Is there a technical difference? – Quinn Culver Oct 19 '11 at 16:26
  • 1
    For example, align* without & doesn't work with \qedhere. :) – egreg Oct 19 '11 at 19:42
  • 1
    http://tex.stackexchange.com/questions/321/align-vs-equation – Bruno Le Floch Oct 19 '11 at 20:56

1 Answers1

5

The comments explain why you should use the align environment only when you needs things to be aligned. Otherwise you should use the gather environment.

Not that I am recommending this but, if you insist on using the align environment without really aligning anything, you could just add the & before the \qedhere:

\begin{proof}
  \begin{align*}
    C=1 &\qedhere
  \end{align*}
\end{proof}

or after the end of the align environment. Of course this results in the \qed symbol on the following line

\begin{proof}
  \begin{align*}
    C=1
  \end{align*}\qedhere
\end{proof}

If you do not like the \qed symbol on the subsequent line, you can adjust \belowdisplayskip as follows:

\begin{proof}\belowdisplayskip=-12pt
  \begin{align*}
    C=1
  \end{align*}\qedhere
\end{proof}
Peter Grill
  • 223,288