LaTeX / Beamer, column environment. Horizontal alignment of overlays

I am trying to prepare a presentation using beamer

. I want to have two columns that go through some algebraic manipulation. Steps taken are explained on the left, results on the right.

\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}

      

And here are some LaTeX that do it (with junk words and equations). When this is compiled, the text and math are not aligned with each other. I would not expect them to be either, as LaTeX will position the text in each column separately without caring about the other frames.

Does anyone have any ideas on how to achieve the result that I have achieved. I am not tied to columns at all, but I am tied to equation numbers.

+2


source to share


2 answers


The preferred way to get numbered flattened equations is the amsmath package environment align

. See its documentation for reference. It's pretty simple, something like:

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

      

There are many options out there that try to cover the most imaginable equation alignment needs (again, check the documentation).

As for your two column format, I'm not sure about the best. A quick and dirty way is to add it as the second column in the environment, like so:

\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}

      



but this is not suitable for multi-line explanation and puts the numbering to the right of the text. I'll try to think of a way (which doesn't include a lot of custom environments as surely someone has done this before).

Edit: as a starting point, this [view] works:

You cannot align in the alignment environment (and confuse things) and there are some vertical alignment issues - the alignment environment overlays itself on top and bottom and the text in the right cell. Maybe he's heading in a good direction though!

\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}

      

+2


source


You usually use the align or align * amsmath environment, but unfortunately it doesn't work very well with ray (for fundamental reasons that no one wants to fix).



The Beamer User Guide has a section on this on page 106 that does exactly what you did. Obviously, a workaround is described in this document.

+1


source







All Articles