2009-09-29 36 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頁有關於此的章節,它完全符合您的所作所爲。顯然,該文檔中也有一個解決方法。