I know there are several topics about this, but for any reason, no one answered my exact problem. So, I end a proof with a cases-environment and I want to set the QED-Square at the end of the last line. But it is either
- set right after the last symbol (but in the correct line) or
- in a new line (but at the correct position).
Here is my MWE which results in case 1. If I type
\qedhere
before the \end{cases} command, it results in case 2.
\documentclass{article}
\usepackage[german, linesnumbered, boxruled]{algorithm2e}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[T1]{fontenc}
\usepackage{empheq}
\usepackage{amsthm}
\begin{document}
There is
\begin{proof}
this proof for
[
\begin{cases}
a \
b.
\end{cases}
]
\end{proof}
\end{document}


casesis the last element of the proof-ending display with svmono class without amsthm and ntheorem – dexteritas Oct 16 '23 at 15:59amsthm, which cooperates withamsmathin placing the QED symbol. But you haven't loadedamsmath. If you do that, it should place the QED at the right margin of the baseline of the equation containing thecases, but there are known ways to adjust that. – barbara beeton Oct 16 '23 at 15:59