Sunday, March 6, 2011

一个Latex beamer中的公式转行问题

在latex中,正常的article环境中,输入下一段,可以得到想要的公式



\begin{eqnarray}
  && \rho_{j,k}=\frac{\xi_{j,k}}{\sum_{k=1}^K \xi_{j,k}} \nonumber \\
  &&
     \begin{split}
     \xi_{j,k} = & \rho_{0,k} \cdot \prod\limits_{t \in T_j}\left(\frac{x_t}{x_{t-k}e^{-y_{t-k}}}\right)^\gamma \cdot
     \left(\frac{1}{\Gamma(\gamma)}\right)^{e_j}
     \frac{\Gamma(e_j \gamma+a_{0,k})}{\Gamma(a_{0,k})}
     \frac{\Gamma(e_j+r_{0,k})}{\Gamma(r_{0,k})}
          \\
     & \cdot
     \frac{(b_{0,k})^{a_{0,k}}}{\left(\sum\limits_{t \in T_j}\frac{x_t}{x_{t-k}e^{-y_{t-k}}}+b_{0,k}\right)^{e_j \gamma+a_{0,k}}}
     \cdot
     \frac{(\lambda_{0,k})^{r_{0,k}}}{\left(\sum\limits_{t \in T_j}x_t y_t + \lambda_{0,k}\right)^{e_j+r_{0,k}}}
     \end{split}              \nonumber
\end{eqnarray}

但是,在beamer中却总是运行不过去。只好分成两个公式,用~~~~~在第一个公式后面留下空行,把它向前推

\begin{frame}
\frametitle{Posterior }
\begin{itemize}
\item  Here
{\footnotesize
\begin{eqnarray}
   \rho_{j,k}=\frac{\xi_{j,k}}{\sum_{k=1}^K \xi_{j,k}}  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  \nonumber
\end{eqnarray}
\begin{eqnarray}
     \xi_{j,k} = \!\! & \rho_{0,k} \cdot \prod\limits_{t \in T_j}\left(\frac{x_t}{x_{t-k}e^{-y_{t-k}}}\right)^\gamma \cdot
     \left(\frac{1}{\Gamma(\gamma)}\right)^{e_j}
     \frac{\Gamma(e_j \gamma+a_{0,k})}{\Gamma(a_{0,k})}
     \frac{\Gamma(e_j+r_{0,k})}{\Gamma(r_{0,k})}  \nonumber
          \\
     & \cdot
     \frac{(b_{0,k})^{a_{0,k}}}{\left(\sum\limits_{t \in T_j}\frac{x_t}{x_{t-k}e^{-y_{t-k}}}+b_{0,k}\right)^{e_j \gamma+a_{0,k}}}
     \cdot
     \frac{(\lambda_{0,k})^{r_{0,k}}}{\left(\sum\limits_{t \in T_j}x_t y_t + \lambda_{0,k}\right)^{e_j+r_{0,k}}}  \nonumber
\end{eqnarray}
}
\end{itemize}
\end{frame}

No comments:

Post a Comment