我有这个文件:
\documentclass[a4paper,11pt, twocolumn]{article}
\begin{document}
...
\begin{equation}
\begin{aligned}
f(\boldsymbol{y}|\boldsymbol{\alpha},\boldsymbol{\beta})&=\binom{m}{\boldsymbol{y}}\prod_{i=1}^{k-1}\frac{\Gamma(\alpha_i+y_i)}{\Gamma(\alpha_i)} \frac{\Gamma(\beta_i+\sum_{j=i}^ky_j)}{\Gamma(\beta_i)} \\
&\qquad{} \times \frac{\Gamma(\alpha_i+\beta_i)}{\Gamma(\alpha_i+\beta_i+\sum_{j=i}^ky_j)}
\end{aligned}
\end{equation}
\end{document}
事实是,即使我将这个等式分成两行,它仍然会进入右列......我该如何解决这个问题?
答案1
...或者使用简单的align
, 并将其替换|
为\mid
,
\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{amsmath,bm}
\begin{document}
\hrule % just to indicate width of column
\begin{align}
f(\bm{y}&\mid\bm{\alpha},\bm{\beta})= \notag\\
&\binom{m}{\bm{y}} \prod_{i=1}^{k-1}
\frac{\Gamma(\alpha_i+y_i)}{\Gamma(\alpha_i)}
\frac{\Gamma(\beta_i+\sum_{j=i}^ky_j)}{\Gamma(\beta_i)} \notag\\
&\qquad\qquad\times
\frac{\Gamma(\alpha_i+\beta_i)}{\Gamma(\alpha_i+\beta_i+\sum_{j=i}^ky_j)}
\end{align}
\end{document}
答案2
我建议改用multline
环境:
\documentclass[a4paper,11pt, twocolumn]{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
f(\boldsymbol{y}\mid\boldsymbol{\alpha},\boldsymbol{\beta}) = \\
\binom{m}{\boldsymbol{y}}\prod_{i=1}^{k-1}\frac{\Gamma(\alpha_i+y_i)}{\Gamma(\alpha_i)} \frac{\Gamma(\beta_i+\sum_{j=i}^ky_j)}{\Gamma(\beta_i)} \\
\times \frac{\Gamma(\alpha_i+\beta_i)}{\Gamma(\alpha_i+\beta_i+\sum_{j=i}^ky_j)}
\end{multline}
\end{document}