0

I have an environment >>Satz<< (German for >>theorem<<), which ends with a \diamond. But if the theorem ends with cases, the diamond is not set correctly. It is either in a new line (but at least at the right edge), or it is right behind the last character in the cases (but at least in the correct line).

Here is what it looks like: enter image description here

Here is my MWE:

\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage{etoolbox}
\usepackage{cases}

\theoremstyle{definition}

\newtheorem{satz}{Satz}
\AtBeginEnvironment{satz}{%
  \pushQED{\qed}\renewcommand{\qedsymbol}{$\diamond$}%
}
\AtEndEnvironment{satz}{\popQED\endsatz}

\begin{document}

\begin{satz}
This works.
\end{satz}

\begin{satz}
This works.
\begin{align*}
f(x) &= \bigl( g(x) \bigr) \\
h(x) &= \bigl( r(x) \bigr).\qedhere
\end{align*}
\end{satz}

\begin{satz}
This
\[
\begin{cases}
    \text{does} \\ 
    \text{not}.
\end{cases}
\]
\end{satz}

\begin{satz}
And this
\[
\begin{cases}
    \text{doesn't} \\ 
    \text{either}. \qedhere
\end{cases}
\]
\end{satz}
\end{document}
3
  • 1
    Don't. Add some words to finish the proof. But you can look at tex.stackexchange.com/a/282772/4427
    – egreg
    Commented May 25, 2023 at 12:37
  • @egreg Will be hard to find further words here. But I checked the link you gave me. Thank you dear Sir! Again ;) Commented May 25, 2023 at 14:12
  • In the last example, if \qedhere is placed instead after \end{cases}, the symbol will be placed flush right on the baseline of the equation. Still not exactly what's wanted here, but shows that placing it *inside* cases` isn't the correct approach. Commented Jun 24, 2023 at 15:25

1 Answer 1

0

I agree in general with what egreg says, but if you must, you can get this effect using empheq, by putting a brace to the left of an align*. (I also removed the \usepackage{cases} since pretty much anything you want to do with that package, you can also do with empheq.)

\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage{empheq}
\usepackage{etoolbox}

\theoremstyle{definition}

\newtheorem{satz}{Satz}
\AtBeginEnvironment{satz}{%
  \pushQED{\qed}\renewcommand{\qedsymbol}{$\diamond$}%
}
\AtEndEnvironment{satz}{\popQED\endsatz}

\begin{document}
\begin{satz}
This
\begin{empheq}[left=\empheqlbrace]{align*}
    & \text{does,} \\ 
    & \text{YAY}. \qedhere
\end{empheq}
\end{satz}

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .