跨多个对齐对齐术语总和

跨多个对齐对齐术语总和

方括号内的术语对齐得很好,但我不知道如何将它们向左移动。LaTeX 代码和输出可以在下面找到。

\begin{alignat}{3}
    \sum_{k=m}^{\infty} p_\infty(k) &= m(m+1) \sum_{k=m}^{\infty} \left( \frac{1}{k} - \frac{2}{k+1} + \frac{1}{k+2} \right)   \\
                                    &= m(m+1) \: &[ \frac{1}{m} &- \frac{2}{m+1} + \frac{1}{m+2}             \\
                                    & \hspace{5pt} &+ \frac{1}{m+1} &- \frac{2}{m+2} + \frac{1}{m+3}                        \\
                                    & \hspace{5pt} &+ \frac{1}{m+2} &- \frac{2}{m+3} + \frac{1}{m+4}                    \\
                                    & \hspace{5pt} &+ \frac{1}{m+3} &- \frac{2}{m+4} + \frac{1}{m+5}                  \\
                                    & \hspace{5pt} + ...    ] 
\end{alignat}

在此处输入图片描述

我尝试使用双 &&,但效果不佳。我应该如何放置 & 符号,以便术语在多行中整齐对齐?

答案1

改变对齐点:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{alignedat}{2}
\sum_{k=m}^{\infty} p_\infty(k)
  &= m(m+1) &&\sum_{k=m}^{\infty} \left( \frac{1}{k} - \frac{2}{k+1} + \frac{1}{k+2} \right)   \\
  &= m(m+1) &&\biggl[ \frac{1}{m} - \frac{2}{m+1} + \frac{1}{m+2} \\
  &         &&\,+ \frac{1}{m+1} - \frac{2}{m+2} + \frac{1}{m+3}     \\
  &         &&\,+ \frac{1}{m+2} - \frac{2}{m+3} + \frac{1}{m+4}     \\
  &         &&\,+ \frac{1}{m+3} - \frac{2}{m+4} + \frac{1}{m+5}     \\
  &         &&\,+ \dotsb\biggr]
\end{alignedat}
\end{equation}

\end{document}

在此处输入图片描述

使用嵌套可能更简单aligned

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
\sum_{k=m}^{\infty} p_\infty(k)
  &= m(m+1) \sum_{k=m}^{\infty} \left( \frac{1}{k} - \frac{2}{k+1} + \frac{1}{k+2} \right)   \\
  &= m(m+1) \begin{aligned}[t]
            \biggl[ & \frac{1}{m} - \frac{2}{m+1} + \frac{1}{m+2} \\
                    &+ \frac{1}{m+1} - \frac{2}{m+2} + \frac{1}{m+3}     \\
                    &+ \frac{1}{m+2} - \frac{2}{m+3} + \frac{1}{m+4}     \\
                    &+ \frac{1}{m+3} - \frac{2}{m+4} + \frac{1}{m+5}     \\
                    &+ \dotsb\biggr]
            \end{aligned}
\end{aligned}
\end{equation}

\end{document}

相关内容