I've got an underbrace (\underbrace{foo}_{bar}
) which I want to uncover (i.e. foo
should be there from the beginning, while the underbrace and the bar
should be uncovered on the next slide. I've tried the following, which (not surprisingly) doesn't work:
\documentclass{beamer}
\begin{document}
\begin{frame}
Without uncover (this is what it should look like on the second subframe):
\begin{displaymath}
\underbrace{foo}_{bar}
\end{displaymath}
With uncover (doesn't work):
\begin{displaymath}
\uncover<2>{\underbrace}{foo}\uncover<2>{_{bar}}
\end{displaymath}
\end{frame}
\end{document}
In the second displaymath
, the underbrace is displayed before foo
and the bar
as index to foo
, and moreover the underbrace is immediately visible.
Note that \only
wouldn't be a solution because on one hand in my actual document I use \setbeamercovered{transparent}
so the underbrace and the text below should be lightly visible from the beginning, and on the other hand \only
would also not keep the space for the underbrace.
So how can I achieve that?
Best Answer
One way to do that, is to use the definition of the transparency (15% Text foreground on the background and to avoid the “jumping” use as suggested here the
overprint
environment.Though you have to define your term that's
\underbrace
d twice and in my quick hack the transparency color is the one mentioned above, because i didn't find whether i can somehow get that by\usebeamercolor
And (thanks to @Andrew Stacey) the even shorter version just switching colors using
\only
(because\color
is sensitive to that) would be