![为什么这个使用 align* 的等式没有居中?](https://linux22.com/image/474424/%E4%B8%BA%E4%BB%80%E4%B9%88%E8%BF%99%E4%B8%AA%E4%BD%BF%E7%94%A8%20align*%20%E7%9A%84%E7%AD%89%E5%BC%8F%E6%B2%A1%E6%9C%89%E5%B1%85%E4%B8%AD%EF%BC%9F.png)
\begin{align*}
&\textit{One can see that:}\\
&\langle n,x_i\rangle=0\\
\implies &\partial_k\langle n, x_i\rangle=\langle n_k,x_i\rangle+\langle n,x_{i,k}\rangle=0\\
\implies &\langle -n_k,x_i\rangle=\langle n_k,x_{i,k}\rangle\\
\implies &\langle -n_k,x_i\rangle g^{i,j}x_j=\langle n_k,x_{i,k}\rangle g^{i,j}x_j\\
\textit{Looking at the left expression, one can use:}\\
&n_k=\alpha^l x_l\implies \langle x_i,n_k\rangle=\alpha^l \langle x_i,x_l\rangle=\alpha^l g_{i,l}\\
\implies &\alpha^l=\langle x_i,n_k\rangle g^{i,l}\\
\textit{Plugging this into the left expression and adapting the indices:}\\
\implies -n_k=...
\end{align*}
答案1
断断续续的短语使对齐变得混乱。用于\intertext
添加解释。
或者,为了获得更紧凑的间距,请使用\shortintertext
@egreg 在评论中指出的方式(需要\usepackage{mathtools}
而不是\usepackage{amsmath}
)。
\intertext(包amsmath
):
\documentclass{article}
\usepackage{amsmath}
\usepackage{lipsum} % only for demo
\begin{document}
\lipsum[1]
One can see that:
\begin{align*}
&\langle n,x_i\rangle=0\\
\implies &\partial_k\langle n, x_i\rangle=\langle n_k,x_i\rangle+\langle n,x_{i,k}\rangle=0\\
\implies &\langle -n_k,x_i\rangle=\langle n_k,x_{i,k}\rangle\\
\implies &\langle -n_k,x_i\rangle g^{i,j}x_j=\langle n_k,x_{i,k}\rangle g^{i,j}x_j\\
\intertext{Looking at the left expression, one can use:}
&n_k=\alpha^l x_l\implies \langle x_i,n_k\rangle=\alpha^l \langle x_i,x_l\rangle=\alpha^l g_{i,l}\\
\implies &\alpha^l=\langle x_i,n_k\rangle g^{i,l}\\
\intertext{Plugging this into the left expression and adapting the indices:}
\implies & -n_k=...
\end{align*}
\lipsum[2]
\end{document}
\shortintertext(包mathtools
):
\documentclass{article}
\usepackage{mathtools}
\usepackage{lipsum} % only for demo
\begin{document}
\lipsum[1]
One can see that:
\begin{align*}
&\langle n,x_i\rangle=0\\
\implies &\partial_k\langle n, x_i\rangle=\langle n_k,x_i\rangle+\langle n,x_{i,k}\rangle=0\\
\implies &\langle -n_k,x_i\rangle=\langle n_k,x_{i,k}\rangle\\
\implies &\langle -n_k,x_i\rangle g^{i,j}x_j=\langle n_k,x_{i,k}\rangle g^{i,j}x_j\\
\shortintertext{Looking at the left expression, one can use:}
&n_k=\alpha^l x_l\implies \langle x_i,n_k\rangle=\alpha^l \langle x_i,x_l\rangle=\alpha^l g_{i,l}\\
\implies &\alpha^l=\langle x_i,n_k\rangle g^{i,l}\\
\shortintertext{Plugging this into the left expression and adapting the indices:}
\implies & -n_k=...
\end{align*}
\lipsum[2]
\end{document}
答案2
除了用于\intertext
两个解释性段落之外,我还会将&
对齐点从左对齐移至符号对齐=
。事实上,您可能希望简单地删除所有\implies
指令,因为它们似乎是隐含的 [双关语]。
\documentclass{article}
\usepackage{mathtools} % for '\DeclarePairedDelimiter' macro
\DeclarePairedDelimiter\iprod\langle\rangle % "inner product"
\begin{document}
One can see that:
\begin{align*}
\iprod{n,x_i} &=0\\
\implies \partial_k\iprod{n, x_i}
&=\iprod{n_k,x_i}+\iprod{n,x_{i,k}}=0\\
\implies \iprod{-n_k,x_i}
&=\iprod{n_k,x_{i,k}}\\
\implies \iprod{-n_k,x_i} g^{i,j}x_j
&=\iprod{n_k,x_{i,k}} g^{i,j}x_j\\
\intertext{Looking at the LHS expression, one can use:}
n_k&=\alpha^l x_l \\
\implies \iprod{x_i,n_k}
&=\alpha^l \iprod{x_i,x_l}=\alpha^l g_{i,l}\\
\implies \alpha^l
&=\iprod{x_i,n_k} g^{i,l}\\
\intertext{Plugging this into the LHS expression and adapting the indices:}
\implies -n_k &=\dots
\end{align*}
\end{document}