# LaTeX Beamer: How to uncover formulas/text at a location of an “un'uncovered” formula/text

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)

-

## migrated from stackoverflow.comApr 19 '13 at 21:05

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

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

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


You can just write \only<1> instead of <1-1> –  Boris Brodski Oct 4 at 4:45