1

I'm trying to get a qed symbol at the right end of the last line of a cases environment, but when I try e.g.

\hfill$\displaystyle\begin{cases}a&b\\c&d\\e&f\end{cases}$ \qed

the symbol is centered. How do I get it still on the right side of the page but aligned with the last line?

2 Answers2

2

First, use a proper displayed equation if it is supposed to take the whole line!

Next, I'd use the {numcases} environment (cases.sty) along with \notag and \tag*.

But that makes me discover \tag* is not supported in {numcases}. Oops, sorry.

So from the beginning: Wait a few days for the updated cases.sty to propagate on CTAN, and download it or let it automatically update. Then, in your document head declare

\usepackage{amsmath,amssymb}
\usepackage{cases}

and in the body, use

\begin{numcases}{x =}
a& b \notag \\
c& d \notag \\
e& f \tag*{\Box}
\end{numcases}
  • I do some of my editing on an android phone with verbtex. I'm worried the app won't pull the updated package. – Matt Samuel Mar 11 '20 at 20:02
  • If your TeX installation is hard to update, you can download the file from CTAN using a browser, and save it in the directory with your document. – Donald Arseneau Mar 11 '20 at 21:59
  • Thanks, this worked. It's a little confusing though that the numcases has to not be in displaymath, the left side is in math mode, and the right side is not. – Matt Samuel Mar 12 '20 at 13:11
  • Because it includes equation numbering, it has to be the whole display-math environment, like {eqnarray} or {align}, but distinct from {cases} or {aligned}. The far right "explanations" are in text mode following the original \cases from plain TeX (cases.sty predates amsmath), and the amsmath documentation recommends putting the entries inside \text{ }, but the difference/incompatability is indeed a problem. – Donald Arseneau Mar 14 '20 at 01:17
0

You can do that with witharrows:

\documentclass{article}
\usepackage{witharrows}
\usepackage{amsmath}
\usepackage{amssymb}


\begin{document}

\begin{DispWithArrows*}<x =>
a& b  \\
c& d  \\
e& f \tag*{$\Box$}
\end{DispWithArrows*}

\end{document}
F. Pantigny
  • 40,250