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.

While I was trying to improve my latest document with respect to its \qed symbols at the end of amsthm's proof environment i came across an interesting point. Assume the proof ends with some formula, that is finally representing the form the lemma/theorem proposes.

Something like

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm,amstext,amsfonts,bm,amssymb}

\begin{document}
\begin{proof}
...
\begin{equation}
    \begin{split}
        A&= B \\
         &= C\\
         &= D&\qedhere
    \end{split}
\end{equation}
\end{proof}
\end{document}

While using \qedhere just in equation or align would put the symbol below any number (or at least to that side for euqation*), here the symbol is placed far to the left, even with using the additional column with &. Putting it after \end{split} would center it vertically with respect to the three columns, so my question is

How can I get the \qed symbol to the bottom right (text border) of an (equation-)split environment?

Where I would prefer a global solution for all splits where I mention \qedhere at the end.

share|improve this question
    
Interesting one, I think it might be an idea to contact Barbara Beeton and tell her about this one. –  daleif Mar 11 '13 at 13:01
1  
@daleif I believe that barbara follows the ams* tags here, so she'll spot it soon. –  tohecz Mar 11 '13 at 13:04
1  
@tohecz I'm sure your are right, I've also added the asmthm tag, just to be sure. –  daleif Mar 11 '13 at 13:14
    
@Ronny: amstext and amsfonts are not needed in your package list, they are automatically loaded by amsmath and amssymb. –  daleif Mar 11 '13 at 13:14
    
Yep. And bm is also not neccessary, i noticed already :) –  Ronny Mar 11 '13 at 13:15

4 Answers 4

up vote 5 down vote accepted

the best approach in this particular case is to use align*, as that behaves well with \qedhere since each line is treated separately. (any of the multi-line options that treats lines separately should work equally well.)

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm,amssymb}

\begin{document}
\begin{proof}
...
\begin{align*}
        A&= B \             &= C\             &= D \qedhere
\end{align*}
\end{proof}
\end{document}

this isn't always ideal -- cases, for example, will always force the tombstone to the center vertically -- but the request has been made often enough to place the tombstone on the last line, that it should be considered as a possible option. i am adding it to the formal list of requests.

as noted elsewhere, with flush left equations and equation numbers on the right, there is a built-in conflict. that is why ams document classes default to using equation numbers on the left.

share|improve this answer
    
Note that the OP also wants an equation number, which of course you don't get with align*. –  Hendrik Vogt Mar 11 '13 at 15:44
    
It was more on occasion, but yes, I want to refer to “the estimates from (1)”. My old approach was quick and dirty to use an \vspace{-\baselineskip} after the equation but that's of course really only quick and dirty. –  Ronny Mar 11 '13 at 15:49
    
@HendrikVogt -- actually, you can get an equation number if you use \tag{\theequation} on (say) line 2; you have to \stepcounter{equation} before the align* though to get the correct value. –  barbara beeton Mar 11 '13 at 21:38
    
I'll accept your answer as the correct way to do that, though semantically I mean something different, when i use split instead of align and it would be nice to have a way to split an equation and have it's \quedhere at the bottom right (and maybe also it's number, but okay). –  Ronny Mar 15 '13 at 10:33
1  
@Ronny -- the request for a method of moving the box to the bottom line of a multi-line subequation has been added to the list of requests for amsmath/amsthm. but it's unclear to me how an equation number on the right should best be presented along with the box. can you describe what you'd like to see in that situation? (no promises, but it's useful to have the information on the record.) –  barbara beeton Mar 15 '13 at 12:30

Here is what I'd do if I was using ntheorem instead of amsthm

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amssymb,bm}
\usepackage[ntheorem]{empheq}
\usepackage[amsmath,thmmarks]{ntheorem}
\theoremstyle{nonumberplain}
\theorembodyfont{\normalfont}
\theoremheaderfont{\itshape}
\theoremsymbol{\ensuremath\square}
\theoremseparator{.}
\newtheorem{proof}{Proof}
\begin{document}
\begin{proof}
...
\begin{empheq}{equation}
\begin{split}
A&= B \\
&= C\\
&= D
\end{split}
\end{empheq}
\end{proof}
\end{document}

latex output

share|improve this answer
    
Well without \qedhere the \square would be placed (in amsthm) after the end of the equation, which is at least \baselineskip (or something like that) below the placement ntheorem obtains here. And I might have text before the equation, so my proof is not just an equation which might be the reason for the placement here. –  Ronny Mar 11 '13 at 13:24
    
That it not the point here. The point is that ntheorem and empheq combined can place the square at the very bottom of the equation, try replacing D with something tall or deep, amsthm cannot do that AFAIR \qedhere will be placed in the same location as the equation number (if there is one), which may look strange. –  daleif Mar 11 '13 at 13:38
    
Oh, i overred some code lines, I'm sorry. Well then, I'm neither using empheq nor ntheorem and while your demonstration shows nicely, what I would like to have, I would also like to have that using amsmathand amsthm :) –  Ronny Mar 11 '13 at 13:56
    
Of course, [fleqn] and the \qed that i would like to have, will overlap, if split only consists of 2 lines (none of them exceeding the text line height). Then the default is - of course - preferable. –  Ronny Mar 11 '13 at 15:22

This is a nice question! I guess that \qedhere is not designed for the purpose you want to achieve. I can only offer a workaround, and it's only simple if you have an odd number of lines. (Since for two lines you won't want to use it anyway, the problem starts with four lines.) The idea: Use the align environment with \nonumber instead of equation and split.

output

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{proof}
...
\begin{align}
        A&= B \nonumber \\
         &= C \\
         &= D \nonumber \qedhere
\end{align}
\end{proof}
\end{document}
share|improve this answer
    
Nice, had the same idea a few minutes ago, but then noticed, the placement of the number gets even worse, if some of the lines, let's say the first two, are increased in height, due to an integral or stuff like that. So your idea works for an odd number of lines, where all lines are equal in height (or at least equal in height with symmetry to the mid line). –  Ronny Mar 11 '13 at 15:34
    
@Ronny: The question that I can't really answer is where the number should best be put. I guess you want to have it vertically centered, correct? For two lines this is nice, but I'm never sure if it's really appropriate for more lines. Nevertheless, your actual question remains unanswered! –  Hendrik Vogt Mar 11 '13 at 15:38
    
Well I like them vertically centered, that's right. Even for more than 2 lines I think, it clarifies the connection. But that's of course just an oppinion. Nevertheless, my actual question even remains unsolved for equation* using a split. –  Ronny Mar 11 '13 at 15:42

I noticed an interesting further point. If you are for example using the style provided by Springer svmult.cls, then the \qedhere is not available (haven't checked why though).

Then another approach would be (at least for numberings being at the right side of the page) to use

\tag*{\qeq}

both in split of an equation environment or an align/align* environment.

Nevertheless, compared to my original question, this of course implies, that the last line of the environment is not equipped with a number (or better: not needed to be equipped...)

share|improve this answer
    
i haven't checked the springer class, but the \qedhere i'm familiar with depends on coordination between amsthm and amsmath. for ams document classes, both of these packages are built in; i don't know of other document classes (or theorem packages) that provide this coordination. –  barbara beeton Jan 7 at 15:13
    
Thanks for the info, in fact svmult.cls does not load any math packages and I happened to only load amsmath but not amsthm, because the latter caused definition conflicts with svmult.cls. So the coordination is missing. –  Ronny Jan 7 at 15:42

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.