對齊多行方程

對齊多行方程

align我也嘗試過alignat,但我無法為我的方程組獲得正確的對齊。問題出在第二行,它是第一個方程式的第二部分。我希望它更向右,例如multline環境輸出。

\documentclass{article}
\usepackage{amsmath}  
\begin{document}  
\begin{align}
f_{X_{1},\ldots,X_{n}}(x_{1},\ldots,x_{n};\boldsymbol{\theta})&=f_{X_{n}|X_{n-1},\ldots, X_{1}}&&(x_{n}|x_{n-1},\ldots, x_{1},\boldsymbol{\theta}) \nonumber \\  
&&f_{X_{1},\ldots, X_{n-1}} (x_{1},\ldots, x_{n-1};\boldsymbol{\theta}) \nonumber \\
&=f_{X_{1}}(x_{1};\boldsymbol{\theta}) \prod_{t=2}^{n} f_{X_{t}|X_{t-1},\ldots,X_{1}}(x_{t}|x_{t-1},\ldots,x_{1};\boldsymbol{\theta}).
\end{align}
\end{document}

答案1

使用其中之一:

 \documentclass{article}
    \usepackage{mathtools}

    \begin{document}

    \begin{align}
    f_{X_{1},\ldots,X_{n}}(x_{1},\ldots,x_{n};\boldsymbol{\theta})&= \begin{multlined}[t]f_{X_{n}|X_{n-1},\ldots, X_{1}}(x_{n}|x_{n-1},\ldots, x_{1},\boldsymbol{\theta})\\
  \times f_{X_{1},\ldots, X_{n-1}} (x_{1},\ldots, x_{n-1};\boldsymbol{\theta})\end{multlined} \nonumber \\
    &=f_{X_{1}}(x_{1};\boldsymbol{\theta}) \prod_{t=2}^{n} f_{X_{t}|X_{t-1},\ldots,X_{1}}(x_{t}|x_{t-1},\ldots,x_{1};\boldsymbol{\theta}).
    \end{align}


    \begin{align}
    f_{X_{1},\ldots,X_{n}}(x_{1},\ldots,x_{n};\boldsymbol{\theta})&= \begin{aligned}[t]f_{X_{n}|X_{n-1},\ldots, X_{1}}(x_{n}|x_{n-1},\ldots, x_{1},\boldsymbol{\theta})\\
  \times f_{X_{1},\ldots, X_{n-1}} (x_{1},\ldots, x_{n-1};\boldsymbol{\theta})\end{aligned} \nonumber \\
    &=f_{X_{1}}(x_{1};\boldsymbol{\theta}) \prod_{t=2}^{n} f_{X_{t}|X_{t-1},\ldots,X_{1}}(x_{t}|x_{t-1},\ldots,x_{1};\boldsymbol{\theta}).
    \end{align}

    \end{document} 

在此輸入影像描述

相關內容