分割环境不是垂直居中方程数

分割环境不是垂直居中方程数

我正在尝试编译以下代码:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\invexpsqrt}[1]{{#1}^{- \tfrac{1}{2}}}

\begin{document}
\begin{align}
\begin{split}
\rho_{out} &= \exp \left[ - \frac{1}{2} \left( x \cdot \gamma \cdot x + x' \cdot \gamma \cdot x' \right) + x \cdot \beta \cdot x' \right] \\
&= \exp \left[- \frac{1}{2} \left( V \gamma_D^{-\tfrac{1}{2}} y V^T \gamma_D V V^T \gamma_D^{- \tfrac{1}{2}} y + V \invexpsqrt{\gamma_D} y' V^T \gamma_D V V^T \invexpsqrt{\gamma_D} y' \right) \right. \\
&\qquad \qquad \left. + V \invexpsqrt{\gamma_D} y \beta V^T \invexpsqrt{\gamma_D} y' \right] \\
&= \exp \left[ - \frac{1}{2} \left( y \cdot y + y' \cdot y' \right) + y \cdot \left( \invexpsqrt{\gamma_D} V \beta V^T \invexpsqrt{\gamma_D} \right) \cdot y' \right] \\
&= \exp \left[ - \frac{1}{2} \left( y \cdot y + y' \cdot y' \right) + y \cdot \beta' \cdot y' \right]
\end{split}
\end{align}
\end{document}

得到一个垂直居中的方程编号。但是,我的输出结果如下: 方程数未对齐

我尝试用 equation 环境替换 align 环境,并在 \equation 中使用 \aligned。所有这些都会产生相同的结果。我的代码中是否有命令会弄乱对齐,还是这个问题是由我的编译器引起的?

编辑:我刚刚注意到,同一文件中的另一段类似代码不会产生相同的问题。可能是因为第二行方程太宽,因此“推低”了数字?

答案1

如果希望单个方程编号在对齐方程组中垂直居中,最好使用equation包含split环境的单个环境。

一些额外的建议:(1)\invexpsqrt{\gamma_D}一致地使用宏(第二行在 MWE 中不包含它们)。(2)不要使用自动调整大小的括号和方括号,因为它们对于手头的工作来说有点太大;请改用\Bigland \Bigr

经过这些调整后,就有足够的空间将方程编号放置在您想要的位置。

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}
\newcommand{\invexpsqrt}[1]{#1^{-\frac{1}{2}}}
\begin{document}
\begin{equation}
\begin{split}
\rho_{out} 
&= \exp \Bigl[ -\tfrac{1}{2} \Bigl( x \cdot \gamma \cdot x + x' \cdot \gamma \cdot x' \Bigr) + x \cdot \beta \cdot x' \Bigr] \\
&= \exp \Bigl[-\tfrac{1}{2} \Bigl( V \invexpsqrt{\gamma_D} y V^T \gamma_D V V^T \invexpsqrt{\gamma_D} y + V \invexpsqrt{\gamma_D} y' V^T \gamma_D V V^T \invexpsqrt{\gamma_D} y' \Bigr)  \\
&\qquad \qquad  + V \invexpsqrt{\gamma_D} y \beta V^T \invexpsqrt{\gamma_D} y' \Bigr] \\
&= \exp \Bigl[ -\tfrac{1}{2} \Bigl( y \cdot y + y' \cdot y' \Bigr) + y \cdot \Bigl( \invexpsqrt{\gamma_D} V \beta V^T \invexpsqrt{\gamma_D} \Bigr) \cdot y' \Bigr] \\
&= \exp \Bigl[ -\tfrac{1}{2} \Bigl( y \cdot y + y' \cdot y' \Bigr) + y \cdot \beta' \cdot y' \Bigr]
\end{split}
\end{equation}
\end{document}

相关内容