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 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?

share|improve this question
3  
The align environment without an & is useless; there's gather for centering equations. –  egreg Oct 19 '11 at 16:07
1  
@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  
show 1 more comment

1 Answer

up vote 2 down vote accepted

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}
share|improve this answer
    
Thanks. But in the case that I only have one line of math, shouldn't I use the displaymath environment (r, equivalently (I think), \[...\]) instead of gather? –  Quinn Culver Nov 2 '11 at 18:45
    
Sure you can, but I thought the question was about using the \qed symbol with align. –  Peter Grill Nov 2 '11 at 18:52
    
Yes, it was. I'm just wondering if the gather recommendation was appropriate in this case. Is gather* with one line of math equivalent to displaymath? –  Quinn Culver Nov 2 '11 at 19:02
1  
You should post a separate question, so that if others have the same question in the future they will be able to find it. –  Peter Grill Nov 2 '11 at 19:05
1  
Good idea. Done. Thanks. –  Quinn Culver Nov 2 '11 at 19:12
show 1 more 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.