2009-09-29 37 views
2

我正在尝试使用beamer来准备演示文稿。我想要有两列可以演示一些代数操作。左边是所采取步骤的解释,右边是结果。LaTeX/Beamer,色谱柱环境。覆盖层的水平对齐

\documentclass{beamer} 
\begin{document} 

    \begin{frame}[t] 
    Not in a column 
    \begin{columns}[t] 
     \begin{column}{0.5\textwidth} 
      \only<2->{Some text} 

      \only<3->{ 
         Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
        } 
     \end{column} 
     \begin{column}{0.5\textwidth} 
     \only<2-> 
     { 
     \begin{equation} 
      E = mc^2 
     \end{equation} 
     } 

     \only<3-> 
     { 
     \begin{equation} 
      F = ma 
     \end{equation} 
     } 
     \end{column} 
    \end{columns} 
    \end{frame} 
\end{document} 

而这里有一些LaTeX是这样做的(与垃圾词和方程式)。编译时,文本和数学不相互对齐。我不会指望他们是因为LaTeX将单独放置在每列中的文本,而不关心其他框架。

有没有人有任何想法如何实现我后的结果。我根本没有致力于列,但我致力于方程式编号。

回答

2

使用编号得到对齐方程的首选方法是amsmath包的环境align环境。请参阅its documentation获取帮助。这是很简单的,是这样的:

\begin{align} 
    f(x) & = \cos^2 x \\ 
    g(x) & = \sin^2 x 
\end{align} 

有很多的变化试图覆盖最可能的方程对准需要的(再次,检查出的文档)。

至于你的双栏证明格式,我并不确定最好的方法。一个快速和肮脏的方法是将其添加为环境中的第二列,喜欢的东西:

\begin{align} 
    f(x) & = \cos^2 x & \text{this is the first function} \\ 
    g(x) & = \sin^2 x & \text{this is the second function} 
\end{align} 

但是这是没有良好的多行解释,并提出编号,以文字的权利。我会试着想一种方法(不涉及很多自定义环境,因为以前肯定有人这样做)。

编辑:作为一个起点,这个[排序]作品:

你不能做对齐环境中的任何调整(在&混淆的东西),还有一些垂直对齐的问题 - 对齐环境在上方和下方填充本身,并在右侧单元格中显示文本。虽然它可能朝着一个好的方向前进!

\begin{tabular}{p{3 in}|l} 
\begin{align} f(x) = \sin^2 x \end{align} & 
this is the first equation \\ 
\begin{align} g(x) = \cos^2 x \end{align} & 
this is the second equation 
\end{tabular} 
1

通常你会使用amsmath的对齐或对齐*环境,但遗憾的是它并没有很好地与投影仪(没有人愿意修为根本原因)玩。

Beamer user guide在第106页有关于此的章节,它完全符合您的所作所为。显然,该文档中也有一个解决方法。