这类问题有百万个,但我找到的答案都没有完全满足我的要求。基本上,我有一个很长的等式(两边都很长),我想在两边都换行,并且后面的每一行都从最后一行缩进。例如:
dkajd;fkasdjf;fd
+ lkdfj;asdkfjad
+ asdkl;fjas;dj;jk = adlkfj;djkdadf;
+ asdlfkjdkfja;dal;j
+ alkjf;alkdjfdklf;
我尝试使用 alignedat 命令,但是当我尝试在右侧进行后续缩进时,右侧的所有内容都会发生移动:
\begin{equation}
\begin{alignedat}{2}
&\epsilon_{npi} \partial_p \big(
\partial_j Q_{jm} \partial_m Q_{kl} \partial_i Q_{kl} {}& \\
&\hspace{2cm}+ Q_{jm} \partial_j \partial_m Q_{kl} \partial_i Q_{kl} {}& \\
&\hspace{3cm}+ Q_{jm} \partial_m Q_{kl} \partial_i \partial_j Q_{kl}
\big)
{}&= \epsilon_{npi} \partial_p \partial_j Q_{jm} \partial_m Q_{kl} \partial_i Q_{kl} \\
&{}&\hspace{1cm}+ \epsilon_{npi} \partial_j Q_{jm} \partial_p \partial_m Q_{kl} \partial_i Q_{kl} \\
&{}&\hspace{2cm}+ \epsilon_{npi} \partial_j Q_{jm} \partial_m Q_{kl} \partial_p \partial_i Q_{kl} \\
&{}&\hspace{3cm}+ \epsilon_{npi} \partial_p Q_{jm} \partial_j \partial_m Q_{kl} \partial_i Q_{kl} \\
&{}&\hspace{4cm}+ \epsilon_{npi} Q_{jm} \partial_p \partial_j \partial_m Q_{kl} \partial_i Q_{kl} \\
&{}&\hspace{5cm}+ \epsilon_{npi} Q_{jm} \partial_j \partial_m Q_{kl} \partial_p \partial_i Q_{kl}
\end{alignedat}
\end{equation}
答案1
这实际上使用了
left
centre
right = left
centre
right
而不是您建议的严格缩进形式,但使用更简单的标记。
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\begin{multlined}[b]
\epsilon_{npi} \partial_p \bigl(% not \big
\partial_j Q_{jm} \partial_m Q_{kl} \partial_i Q_{kl} {} \\
+ Q_{jm} \partial_j \partial_m Q_{kl} \partial_i Q_{kl} {} \\
+ Q_{jm} \partial_m Q_{kl} \partial_i \partial_j Q_{kl}
\bigr)
\end{multlined}
=
\begin{multlined}[t]
\epsilon_{npi} \partial_p \partial_j Q_{jm} \partial_m Q_{kl} \partial_i Q_{kl} \\
{}+ \epsilon_{npi} \partial_j Q_{jm} \partial_p \partial_m Q_{kl} \partial_i Q_{kl} \\
{}+ \epsilon_{npi} \partial_j Q_{jm} \partial_m Q_{kl} \partial_p \partial_i Q_{kl} \\
{}+ \epsilon_{npi} \partial_p Q_{jm} \partial_j \partial_m Q_{kl} \partial_i Q_{kl} \\
{}+ \epsilon_{npi} Q_{jm} \partial_p \partial_j \partial_m Q_{kl} \partial_i Q_{kl} \\
{}+ \epsilon_{npi} Q_{jm} \partial_j \partial_m Q_{kl} \partial_p \partial_i Q_{kl}
\end{multlined}
\end{equation}
\end{document}