将 QED 符号移到左边,即移到句子的末尾

将 QED 符号移到左边,即移到句子的末尾

我想让证明末尾的 qed 符号出现在最后一句的末尾,而不是在同一行的最右边。

希望以最简单的方式做到这一点。

我在网上找到的都是人们用来\qedhere修复错误行上的符号的方法。

答案1

您可以将其重新定义为简单的(感谢@egreg指出需要\unskip\nobreak

\renewcommand{\qed}{\unskip\nobreak\quad\qedsymbol}%

这是一个(不是那么最小的)MWE:

\documentclass{article}
\usepackage{amsmath,amsthm}
\renewcommand{\qed}{\unskip\nobreak\quad\qedsymbol}% As suggested by egreg

\begin{document}

\begin{proof} A Simple Proof
Here is my proof
\end{proof}

\begin{proof} A Long Proof
Here is my very long proof that involves a lot of computation and stretches quite far to the margin.
\end{proof}

\begin{proof} A Proof with Equations (\verb!equation! environment)
Here is my proof:

\begin{equation}
  x = a_0 + \cfrac{1}{a_1
          + \cfrac{1}{a_2
          + \cfrac{1}{a_3 + a_4}}}
\end{equation}
\end{proof}


\begin{proof} A Proof with Equations (\verb!equation! environment) and \verb!\qedhere!
Here is my proof:

\begin{equation}
  x = a_0 + \cfrac{1}{a_1
          + \cfrac{1}{a_2
          + \cfrac{1}{a_3 + a_4}}}
  \qedhere
\end{equation}
\end{proof}

\begin{proof} A Proof with aligned equations (\verb!align! environment)
\begin{align}
\intertext{If}
   A &= \sigma_1+\sigma_2\\
   B &= \rho_1+\rho_2\\
\intertext{then}
C(x) &= e^{Ax^2+\pi}+B
\end{align}
\end{proof}

\begin{proof} A Proof with aligned equations (\verb!align! environment) and \verb!\qedhere!
\begin{align}
\intertext{If}
   A &= \sigma_1+\sigma_2\\
   B &= \rho_1+\rho_2\\
\intertext{then}
C(x) &= e^{Ax^2+\pi}+B\qedhere
\end{align}
\end{proof}

\end{document}

QED 符号替换示例

问题

如果您的证明有方程式,您应该使用它来避免符号进入下一行(正如@egreg 建议的那样,添加到所有方程式环境中\qedhere并不是一个好主意 )\qedhere

相关内容