分割环境末尾的 \qed 或 \qedhere

分割环境末尾的 \qed 或 \qedhere

当我尝试改进我的最新文档,使其与环境末尾的符号相关时,\qed我发现了一个有趣的观点。假设证明以某个公式结束,该公式最终代表了引理/定理提出的形式。amsthmproof

就像是

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm,amstext,amsfonts,bm,amssymb}

\begin{document}
\begin{proof}
...
\begin{equation}
    \begin{split}
        A&= B \\
         &= C\\
         &= D&\qedhere
    \end{split}
\end{equation}
\end{proof}
\end{document}

虽然\qedhere只使用equationalign会将符号放在任何数字下方(或至少放在 的那一侧euqation*),但此处符号被放置在最左侧,即使使用 的附加列也是如此&。将其放在后面\end{split}会使其相对于三列垂直居中,所以我的问题是

如何将\qed符号放在(方程式)分割环境的右下角(文本边框)?

我希望为最后split提到的所有内容提供一个全球性的解决方案。\qedhere

答案1

在这种特殊情况下,最好的方法是使用align*,因为这样可以很好地处理\qedhere每一行。(任何单独处理行的多行选项都应该同样有效。)

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm,amssymb}

\begin{document}
\begin{proof}
...
\begin{align*}
        A&= B \\
         &= C\\
         &= D \qedhere
\end{align*}
\end{proof}
\end{document}

这并不总是理想的——cases例如,总是会强制墓碑垂直置于中心——但将墓碑放在最后一行的请求已经足够频繁,所以它应该被视为一种可能的选择。我正在将它添加到正式的请求列表中。

如其他地方所述,当方程式左侧对齐且方程式编号在右侧时,存在内在冲突。这就是为什么 ams 文档类默认使用左侧的方程式编号。

答案2

如果我ntheorem使用amsthm

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amssymb,bm}
\usepackage[ntheorem]{empheq}
\usepackage[amsmath,thmmarks]{ntheorem}
\theoremstyle{nonumberplain}
\theorembodyfont{\normalfont}
\theoremheaderfont{\itshape}
\theoremsymbol{\ensuremath\square}
\theoremseparator{.}
\newtheorem{proof}{Proof}
\begin{document}
\begin{proof}
...
\begin{empheq}{equation}
\begin{split}
A&= B \\
&= C\\
&= D
\end{split}
\end{empheq}
\end{proof}
\end{document}

乳胶输出

答案3

我注意到一个有趣的进一步观点。例如,如果你使用 Springer 提供的样式svmult.cls,那么将\qedhere不可用(虽然还没有检查原因)。

然后另一种方法是(至少对于页面右侧的数字)使用

\tag*{\qeq}

无论是在split环境equation还是align/align*环境中。

不过,与我最初的问题相比,这当然意味着环境的最后一行没有配备数字(或者更好:不需要配备......)

答案4

这个问题问得好!我猜这\qedhere不是为你想要实现的目的而设计的。我只能提供一个解决方法,而且如果你有奇怪的行数。(由于对于两行你无论如何都不想使用它,所以问题从四行开始。)想法:使用环境alignwith\nonumber而不是equationand split

输出

\documentclass{scrartcl}
\usepackage[fleqn]{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{proof}
...
\begin{align}
        A&= B \nonumber \\
         &= C \\
         &= D \nonumber \qedhere
\end{align}
\end{proof}
\end{document}

相关内容