我有以下一组子方程(amsmath):
\begin{subequations}
\begin{alignat}{3}
&\frac{\partial^2 \, (r \, \Pi_{1 \perp}^e)}{\partial r^2}+k^2 \, r \, \Pi_{1 \perp}^e &= E \, \varepsilon \, \sin{\vartheta} \, \sin{\varphi} \cdot e^{i \, k \, R + i \, \omega t}\\
\shortintertext{}
&\frac{1}{r} \, \frac{\partial^2 (r \, \Pi_{1 \perp}^e)}{\partial r \partial \vartheta}-i \, k \, \sqrt{\frac{\varepsilon}{\mu}} \, \frac{1}{\sin{\vartheta}} \, \frac{\partial \Pi_{2 \perp}^e}{\partial \varphi} &= E \, \varepsilon \, \cos{\theta} \, \sin{\varphi} \cdot e^{i \, k \, R + i \, \omega \, t}\\
\shortintertext{}
&\frac{1}{r \, \sin{\vartheta}} \, \frac{\partial^2 (r \, \Pi_{1 \perp}^e)}{\partial r \partial \varphi}+i \, k \, \sqrt{\frac{\varepsilon}{\mu}} \, \frac{\partial \Pi_{2 \perp}^e}{\partial \vartheta} &= E \, \cos{\varphi} \cdot e^{i \, k \, R+i \, \omega \, t}
\end{alignat}
\end{subequations}
(试着忽略数学)我试图将它们在开头和等号处对齐,因此它看起来像这样:
(我正在翻译的原始德语文档,作者是 J. Meixner)。我的文档如下:
如您所见,它在开头正确对齐,但在等号处却对齐了。我该如何让它对齐?
答案1
你一直用alingat
错了。你必须&
在第二个点放两个符号,因为每个对齐标记在左对齐和右对齐之间交替。
我不会使用所有这些空格,因为它会导致太多的空白,从而导致印刷错误。
如果要增加行之间的垂直距离,只需使用\\[1cm]
或类似命令即可。请不要为此滥用\shortintertext
,因为这在语法上会造成混淆。
% arara: pdflatex
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\setcounter{equation}{38} % remove this
\begin{subequations}
\begin{alignat}{3}
&\frac{\partial^2 (r\Pi_{1 \perp}^e)}{\partial r^2}+k^2 r \Pi_{1 \perp}^e &&= \varepsilon E \sin\vartheta \sin\varphi \cdot e^{i k R + i \omega t}\\[\jot] % or any other measure
&\frac{1}{r}\,\frac{\partial^2 (r \Pi_{1 \perp}^e)}{\partial r \partial \vartheta}-i k \sqrt{\frac{\varepsilon}{\mu}}\,\frac{1}{\sin\vartheta}\,\frac{\partial \Pi_{2 \perp}^e}{\partial \varphi} &&= \varepsilon E \cos\theta \sin{\varphi} \cdot e^{i k R + i \omega t}\\[\jot]
&\frac{1}{r \sin{\vartheta}}\,\frac{\partial^2 (r \Pi_{1 \perp}^e)}{\partial r \partial \varphi}+i k \sqrt{\frac{\varepsilon}{\mu}}\,\frac{\partial \Pi_{2 \perp}^e}{\partial \vartheta} &&= E \cos\varphi \cdot e^{i k R+i \omega t}
\end{alignat}
\end{subequations}
\setcounter{equation}{38} % remove that
\begin{subequations}
\begin{align}
\frac{\partial^2 (r\Pi_{1 \perp}^e)}{\partial r^2}+k^2 r \Pi_{1 \perp}^e &= \varepsilon E \sin\vartheta \sin\varphi \cdot e^{i k R + i \omega t}\\[\jot] % or any other measure
\frac{1}{r}\,\frac{\partial^2 (r \Pi_{1 \perp}^e)}{\partial r \partial \vartheta}-i k \sqrt{\frac{\varepsilon}{\mu}}\,\frac{1}{\sin\vartheta}\,\frac{\partial \Pi_{2 \perp}^e}{\partial \varphi} &= \varepsilon E \cos\theta \sin{\varphi} \cdot e^{i k R + i \omega t}\\[\jot]
\frac{1}{r \sin{\vartheta}}\,\frac{\partial^2 (r \Pi_{1 \perp}^e)}{\partial r \partial \varphi}+i k \sqrt{\frac{\varepsilon}{\mu}}\,\frac{\partial \Pi_{2 \perp}^e}{\partial \vartheta} &= E \cos\varphi \cdot e^{i k R+i \omega t}
\end{align}
\end{subequations}
\end{document}
因为我不喜欢这些行的格式,所以我添加了另一种仅使用一种对齐方式的方法。在我看来,这样更容易阅读。