将 qed-symbol 与 enumerate/align 环境对齐

将 qed-symbol 与 enumerate/align 环境对齐

当我的证明以枚举或公式结尾时,qed 符号会放在新行中。但我希望它位于枚举或公式的最后一行。

它看起来是这样的:在此处输入图片描述

这是我的代码:

\documentclass[ngerman, fontsize=11pt, DIV=15, ,BCOR = 10mm, parskip=half-, twoside]{scrbook}

\usepackage{amsmath, amsthm}
\usepackage{cleveref}

\begin{document}

    \begin{proof}
        We want to prove
    \begin{enumerate}
        \item that this is true
        \item and that the QED-symbol is not on this line. But it is not, and that makes me sad.
    \end{enumerate}
    \end{proof}
%
    \begin{proof}
    We want to prove that
    \begin{align*}
        1+2 = 4
    \end{align*}
\end{proof}
\end{document}

答案1

你用\qedhere

\documentclass{article}

\usepackage{amsmath, amsthm}

\begin{document}

\begin{proof}
We want to prove
\begin{enumerate}
  \item that this is true
  \item and that the QED-symbol is not on this line.
        But it is not, and that makes me sad.\qedhere
\end{enumerate}
\end{proof}

\begin{proof}
We want to prove that
\begin{equation*}
  1+2 = 4 \qedhere
\end{equation*}
\end{proof}

\begin{proof}
We want to prove that
\begin{align*}
  1+2 &= 3+5 \\
      &= 4 \qedhere
\end{align*}
\end{proof}

\end{document}

注意对于单个方程align应该不是使用。

在此处输入图片描述

相关内容