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.

Is there a sensible way to get the QED box produced by \qedhere aligned with the last line of the cases environment in a situation as in the examples below?

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{proof}
This is a proof ending in a displayed \verb|cases| envirnoment, and without
the \verb|\qedhere|.
  \[
  \begin{cases}
  1, & \text{in the first case;} \\
  2, & \text{in the second case;} \\
  3, & \text{in the third case,} 
  \end{cases}
  \]
\end{proof}

\begin{proof}
This is a proof ending in a displayed \verb|cases| envirnoment, and with
the \verb|\qedhere| at the very end.
  \[
  \begin{cases}
  1, & \text{in the first case;} \\
  2, & \text{in the second case;} \\
  3, & \text{in the third case,} 
  \end{cases} 
  \qedhere
  \]
\end{proof}

\begin{proof}
This is a proof ending in a displayed \verb|cases| envirnoment, and with
the \verb|\qedhere| in the last line of that.
  \[
  \begin{cases}
  1, & \text{in the first case;} \\
  2, & \text{in the second case;} \\
  3, & \text{in the third case,} \qedhere
  \end{cases} 
  \]
\end{proof}
\end{document}

The same thing will happen in a proof ending in a displayed gathered environment, or any of the -ed variants.

share|improve this question
    
(I know one can always rephrase to avoid ending the proof in a display, and thereby dissolve the issue—but I'd like to know if one can do this sensibly anyways!) –  Mariano Suárez-Alvarez Jul 2 '12 at 5:14
1  
I'd say it's by design: a cases environment is vertically centered with respect to the formula axis. If the cases are not equally important, they shouldn't be in a cases environment, I think. –  egreg Jul 2 '12 at 9:05
add comment

1 Answer

up vote 3 down vote accepted

this can be done, but it's not straightforward.

retrieve this file. it illustrates a number of situations in which a marker is wanted at the end of something, including non-proofs, and \qedhere doesn't do what is wanted. one of the examples shows how to "move" the qed box to the last line when cases is the last element of the proof-ending display.

there have been enough requests for this (and the other situations illustrated by this file) that the situation will be considered when amsmath is next overhauled. however, that won't happen until at least 2013, and possibly even later.

share|improve this answer
    
Thank you! ${}$ –  Mariano Suárez-Alvarez Jul 2 '12 at 16:56
    
@MarianoSuárez-Alvarez -- i'd be less than thorough if i didn't tell you that a different approach was presented in the answer to this question: problem-with-qedhere. i had a quibble with the exact vertical location of the box (i think it's a bit too low), but that could be fixed. however, i haven't investigated how to do it. –  barbara beeton Jul 2 '12 at 17:31
    
For some reason, if I have to choose, I prefer the box to be aligned with the center of the cases than with the end of the brace :) –  Mariano Suárez-Alvarez Jul 2 '12 at 17:58
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.