Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a beamer presentation in latex where I want a formula to change its coloring schema over a couple of steps (The idea is to mark the "active" part of the formula at the given moment).

When I try to acomplish that like this,

    \begin{frame}{Title}

    \uncover<1-1>{
    \begin{align*}
       e=mc^3
    \end{align*}
    }

    \uncover<2-2>{
    \begin{align*}
       e=mc^{\color{red}3}
    \end{align*}
    }

    \uncover<3-3>{
    \begin{align*}
       e=mc^{\color{green}2}
    \end{align*}
    }

    \end{frame}

then, of course, the formula moves downward in the slide. Here is the question: how can I "update" a formula i.e. uncover a new version of the formula at exactly the location of its old version?

It seems that the problem is that after slide m is reached, the formula encapsulated in \uncover<3-3>{...} is hidden but it is still there..(it still occupies space)

share|improve this question

migrated from stackoverflow.com Apr 19 '13 at 21:05

This question came from our site for professional and enthusiast programmers.

1  
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Apr 19 '13 at 21:16

1 Answer 1

up vote 10 down vote accepted

The simplest way would be to use the \only command instead of \uncover. You could also put the formulas into the same \align block, making the code more compact.

\begin{align*}
    \only<1-1>{E=mc^1}
    \only<2-2>{E=mc^2}
    \only<3-3>{E=mc^3}
\end{align*}

For more information, and advanced techniques, see section 9.5 of the Beamer User Guide.

share|improve this answer
    
Thanks, that's what I was looking for. –  olodnad Apr 19 '13 at 10:03
    
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Apr 19 '13 at 21:17
    
You can just write \only<1> instead of <1-1> –  Boris Brodski Oct 4 at 4:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.