我无法对齐下面示例中的第二个块......
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{alignat}{2}\nonumber
\frac{\partial U^\varepsilon_{p,q}}{\partial x_3} &= \frac{i\omega\Gamma_1(\kappa_1) m(x_3/\varepsilon^2)}{\varepsilon}\bigg(pU^\varepsilon_{p,q} - qU^\varepsilon_{p,q}\bigg) \\ \nonumber
&+\frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}e^{2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}&&\bigg(pU^\varepsilon_{p+1,q}e^{ih\bar\zeta(\kappa_1)x_3 - i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))} \\ \nonumber
&\phantom{+} &&-qU^\varepsilon_{p,q-1}e^{-ih\bar\zeta(\kappa_1)x_3 + i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\bigg) \\ \nonumber
&+\frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}e^{-2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}&&\bigg(pU^\varepsilon_{p-1,q}e^{-ih\bar{\zeta}x_3 + i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))} \\
&\phantom{+} &&-qU^\varepsilon_{p,q+1}e^{ih\bar{\zeta}(\kappa_1)x_3 - i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\bigg)
\end{alignat}
\end{document}
出现 \bigg(p 的第二行与其前面的指数之间不应该有太大间隙,有人可以给我一些建议吗?谢谢。
答案1
您可以在第一行添加一个负空间,让 TeX 认为它更短。
由于指数中的负号,仍然会存在小的差距,但我觉得对齐更为重要。
\documentclass{article}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{alignat}{2}
\frac{\partial U^\varepsilon_{p,q}}{\partial x_3}
&= \frac{i\omega\Gamma_1(\kappa_1) m(x_3/\varepsilon^2)}{\varepsilon}
\bigl(pU^\varepsilon_{p,q} - qU^\varepsilon_{p,q}\bigr) \hspace{-5em}
\nonumber \\
&+ \frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}
e^{2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}
&&\Bigl(pU^\varepsilon_{p+1,q}e^{ih\bar\zeta(\kappa_1)x_3 -
i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}
\nonumber \\
& &&-qU^\varepsilon_{p,q-1}e^{-ih\bar\zeta(\kappa_1)x_3 +
i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\Bigr)
\nonumber \\
&+ \frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}
e^{-2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}
&&\Bigl(pU^\varepsilon_{p-1,q}e^{-ih\bar{\zeta}x_3 +
i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}
\nonumber \\
& &&-qU^\varepsilon_{p,q+1}e^{ih\bar{\zeta}(\kappa_1)x_3 -
i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\Bigr)
\end{alignat}
\end{document}
\Bigl
请注意and的用法,\Bigr
原因有二:
\bigg
太大;- 应该将分隔符设置为打开和关闭原子。
在第一行\bigl
似乎\bigr
已经足够了。
我之所以使用geometry
,是因为根据您的图片,您的文本宽度比默认值大。
答案2
我建议这种基于\multlined
嵌套的布局aligned
,使用更小的括号和geometry
包,以获得更合适的边距:
\documentclass{article}
\usepackage{geometry}
\usepackage{mathtools}
\usepackage{amssymb}
\begin{document}
\begin{equation}
\begin{aligned}[b]
\frac{\partial U^\varepsilon_{p,q}}{\partial x_3} &=\frac{i\omega\Gamma_1(\kappa_1) m(x_3/\varepsilon^2)}{\varepsilon}\mathrlap{\Bigl(pU^\varepsilon_{p,q} - qU^\varepsilon_{p,q}\Bigr)} \\
&\begin{multlined} + \frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}e^{2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}\Bigl(pU^\varepsilon_{p+1,q}e^{ih\bar\zeta(\kappa_1)x_3 - i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))} \\[-1.5ex]
-qU^\varepsilon_{p,q-1}e^{-ih\bar\zeta(\kappa_1)x_3 + i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\Bigr)
\end{multlined}\\
&\begin{multlined}[b] + \frac{i\omega\Gamma_2(\kappa_1) m(x_3/\varepsilon^2)}{2\varepsilon}e^{-2i\omega\bar\zeta(\kappa_1)x_3/\varepsilon}\Bigl(pU^\varepsilon_{p-1,q}e^{-ih\bar{\zeta}x_3 + i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))} \\[-1.5ex]
-qU^\varepsilon_{p,q+1}e^{ih\bar{\zeta}(\kappa_1)x_3 - i\omega\bar{c}_{66}\kappa_1\lambda x_3/(\bar{c}_{44}\bar{\zeta}(\kappa_1))}\Bigr)
\end{multlined}
\end{aligned}
\end{equation}
\end{document}