4

I'm about to write a presentation with beamer and want to show a complete sentence first. After that I'd like to highlight one or more words in that sentence to explain them.

My current approach is to use \onslide*. However this is quite some manual work and I'd like to know if there is some better solution for this. Could I reveal or highlight those words in another/better way?

\documentclass{beamer}
\begin{document}
\begin{frame}
  \frametitle{Title}
  \onslide*<1>{This is an example sentence.}
  \onslide*<2>{This is an \textcolor{red}{example} sentence.}
\end{frame}
\end{document}
1
  • 4
    Welcome to TeX.SE! This is an \textcolor<2>{red}{example} sentence. is enough. \textcolor, like many standard commands, is " overlay aware" in beamer.
    – campa
    Commented May 9, 2018 at 7:41

1 Answer 1

6

As an alternative to the \textcolor from campas comment, you could also use \alert to highlight things.

\documentclass{beamer}
\begin{document}
\begin{frame}
  \frametitle{Title}
  This is an \alert<+(1)>{example} sentence.
\end{frame}
\end{document}
5
  • +1: Is the \alert<+(1)> ((+x)) syntax a new syntax? Never used it before. Crazy, also \alert<+(1),+(3)> works! Commented May 9, 2018 at 21:50
  • @Dr.ManuelKuehner (x) can be used as an offset to the overlay. Commented May 9, 2018 at 21:52
  • I see that now :). I was curious if that was possible from the start of beamer or if this was introduced later. But it's not important - I am just angry at myself for not using it earlier. Commented May 9, 2018 at 21:53
  • @Dr.ManuelKuehner For more information, see 9.6.4 Incremental Specifications of the user guide Commented May 9, 2018 at 21:54
  • 1
    @Dr.ManuelKuehner :) Don't be angry, there are so many features, nobody can use them all Commented May 9, 2018 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .