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}