对齐前后的行距*

对齐前后的行距*

只是关于行距的一个快速问题(这似乎至少解释了我一半的 LaTeX 问题)。我正在align*环境中编写证明,似乎无法消除前后的间距。我希望证明的第一行与“proof:”对齐,证明的最后一行与 qed/box 对齐。

这是我的代码:

\begin{res} (Bianchi Identity)
\[ \dd \Phi = \varphi \wedge \Phi - \Phi \wedge \varphi \]
\end{res}
\begin{proof}
\begin{align*}
        \dd \Phi &= \dd(\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \dd \varphi \wedge \varphi + \varphi \wedge \dd \varphi \\
                 &= - (\dd \varphi - \varphi \wedge \varphi) \wedge  \varphi + \varphi \wedge (\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \Phi \wedge \varphi + \varphi \wedge \Phi 
\end{align*}
\end{proof}

在此处输入图片描述

答案1

标签之间最好有一些文字证明和对齐。\qedhere在最后一行使用。请注意,归因应该是 的可选参数res

\documentclass{article}
\usepackage{amsmath,amsthm}

\newtheorem{res}{Result}[section]

\newcommand{\dd}{\mathop{}\!\mathrm{d}}

\begin{document}
\setcounter{section}{3}\setcounter{res}{10} % just to get 3.11

\begin{res}[Bianchi Identity]
\[ \dd \Phi = \varphi \wedge \Phi - \Phi \wedge \varphi \]
\end{res}
\begin{proof}
Just compute the differential as
\begin{align*}
        \dd \Phi &= \dd(\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \dd \varphi \wedge \varphi + \varphi \wedge \dd \varphi \\
                 &= - (\dd \varphi - \varphi \wedge \varphi) \wedge  \varphi + \varphi \wedge (\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \Phi \wedge \varphi + \varphi \wedge \Phi \qedhere
\end{align*}
\end{proof}

\end{document}

在此处输入图片描述

没有文字的替代方案可能是

\documentclass{article}
\usepackage{amsmath,amsthm}

\newtheorem{res}{Result}[section]

\newcommand{\dd}{\mathop{}\!\mathrm{d}}

\begin{document}
\setcounter{section}{3}\setcounter{res}{10} % just to get 3.11

\begin{res}[Bianchi Identity]
\[ \dd \Phi = \varphi \wedge \Phi - \Phi \wedge \varphi \]
\end{res}
\begin{proof}
\mbox{}\par\nopagebreak\vspace{-2\baselineskip}\vspace{-\abovedisplayskip}
\begin{align*}
        \dd \Phi &= \dd(\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \dd \varphi \wedge \varphi + \varphi \wedge \dd \varphi \\
                 &= - (\dd \varphi - \varphi \wedge \varphi) \wedge  \varphi + \varphi \wedge (\dd \varphi - \varphi \wedge \varphi) \\
                 &= - \Phi \wedge \varphi + \varphi \wedge \Phi \qedhere
\end{align*}
\end{proof}

\end{document}

在此处输入图片描述

相关内容