如何将两个并排的 align* 方程式在顶部对齐

如何将两个并排的 align* 方程式在顶部对齐

我该如何让这些方程组顶部对齐?代码如下:

\begin{align*}
    \begin{aligned}
    \bullet \sum_{j=0}^{n-1} \binom nj & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} \\
        & = \sum_{j=0}^{n} \binom nj 1^j 1^{n-j} - \binom nn \\
        & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} - 1 \\
        & = (1 + 1)^n - 1 \\
        & = 2^n - 1    
    \end{aligned}
&\hspace{3cm}
    \begin{aligned}
    \bullet \sum_{j=0}^{n} 2^{j+1} \binom nj & = 2 \sum_{j=0}^{n} 2^j \binom nj \\
        & = 2(3)^n    
    \end{aligned}
\end{align*}

但它看起来像这样(我希望它们顶部对齐,并排,并且它们之间有足够的间距): LaTeX 破译代码

答案1

以下是两种可能的解决方案:

\begin{aligned}[t]
\bullet \sum_{j=0}^{n-1} \binom nj & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} \\
    & = \sum_{j=0}^{n} \binom nj 1^j 1^{n-j} - \binom nn \\
    & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} - 1 \\
    & = (1 + 1)^n - 1 \\
    & = 2^n - 1 
\end{aligned}
\hspace{3cm}
\begin{aligned}[t]
\bullet \sum_{j=0}^{n} 2^{j+1} \binom nj & = 2 \sum_{j=0}^{n} 2^j \binom nj \\
    & = 2(3)^n  
\end{aligned}

\end{方程*}

答案2

&每行也可以有多个。&假设每个偶数分隔方程式。方程式将均匀分布在 上\textwidth

\documentclass{article}
\usepackage{mathtools}
\usepackage{showframe}

\begin{document}
\begin{align*}
    \bullet \sum_{j=0}^{n-1} \binom nj & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} &
    \bullet \sum_{j=0}^{n} 2^{j+1} \binom nj & = 2 \sum_{j=0}^{n} 2^j \binom nj \\
        & = \sum_{j=0}^{n} \binom nj 1^j 1^{n-j} - \binom nn &
        & = 2(3)^n \\
        & = \sum_{j=0}^{n-1} \binom nj 1^j 1^{n-j} - 1 \\
        & = (1 + 1)^n - 1 \\
        & = 2^n - 1 
\end{align*}
\end{document}

演示

相关内容