![在对齐方程一侧的 QED](https://linux22.com/image/440738/%E5%9C%A8%E5%AF%B9%E9%BD%90%E6%96%B9%E7%A8%8B%E4%B8%80%E4%BE%A7%E7%9A%84%20QED.png)
我怎样才能将方程的 QED 符号aligned
放在右边的证明中,而不是放在新行中?
梅威瑟:
\documentclass{article}
\usepackage{amsmath} %in the following MWE
\usepackage{amsthm}
\begin{document}
\begin{proof}
Here's an equation:
\begin{equation}
\begin{aligned}
\mbox{minimize}\enspace &f(x),\\
\text{subject to} \enspace & Ax \geq a,\\
& Bx \geq b,\\
& Cx \geq c.
\end{aligned}
\end{equation}
\end{proof}
\end{document}
答案1
\documentclass{report}
\usepackage{amssymb,amsmath,amsthm}
\begin{document}
\begin{proof}
Proof includes a long, multi-line equation.
\begin{align}
Here's an equation:
\mbox{minimize}\enspace &f(x),\nonumber\\
\text{subject to} \enspace & Ax \geq a,\\
& Bx \geq b,\nonumber\\
& Cx \geq c.\qedhere
\end{align}
\end{proof}
\end{document}
答案2
这会将其置于tombstone
最后一行的末尾。
\documentclass{article}
\usepackage{amsmath} %in the following MWE
\usepackage{amsthm}
\newcommand{\QED}{ \par \vspace{-1.7\baselineskip}\qedhere}% added <<<<<<<<<<<<
\begin{document}
\begin{proof}
Here's an equation:
\begin{equation}
\begin{aligned}
\mbox{minimize}\enspace &f(x),\\
\text{subject to} \enspace & Ax \geq a,\\
& Bx \geq b,\\
& Cx \geq c.
\end{aligned}
\end{equation}
\QED % <<<<<<<<<<<<<<<
\end{proof}
\end{document}
答案3
最简单的方法是不是以显示结束证明。
您可以这样做:您需要插入适量的负空间来取消新行和显示下方的跳过。
\documentclass{article}
\usepackage{amsmath} %in the following MWE
\usepackage{amsthm}
\begin{document}
\begin{proof}
Here's an equation:
\begin{equation}
\begin{aligned}
\mbox{minimize}\enspace &f(x),\\
\text{subject to} \enspace & Ax \geq a,\\
& Bx \geq b,\\
& Cx \geq c.
\end{aligned}
\end{equation}
\vadjust pre {\nobreak\vskip-\glueexpr\baselineskip+\belowdisplayskip}
\end{proof}
Some text follows
\end{document}