I use \colorbox
in my slides to highlight part of the text (as if it was highlighted with a marker). The command also accepts beamer overlay specifications (e.g. \colorbox<1>{yellow}{Text}
). However, strangely enough on the slides that does not match the overlay specification the text is replaced by a purely black rectangle. More specifically, colorbox<1>{yellow}{Text}
produces "Text" with yellow background on slide 1 and on the following slides produces a black rectangle (as if it was generated by \colorbox{black}{Text}
). Any ideas on why this is happening and how can be fixed?
Many thanks,
Here is a MWE:
\documentclass{beamer}
\begin{document}
\begin{frame}
\centering
\colorbox<1>{yellow}{Text}
\onslide<2->{Some other text}
\end{frame}
\end{document}
And here are the first and second slides resulted from the above example:
\documentclass
to\end{document
.