4

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.

2
  • (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!) Commented Jul 2, 2012 at 5:14
  • 2
    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. Commented Jul 2, 2012 at 9:05

1 Answer 1

4

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

retrieve this .tex file and its output. 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.

2
  • @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. Commented Jul 2, 2012 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 :) Commented Jul 2, 2012 at 17:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.