2

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}
  • 2
    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 May 9 '18 at 7:41
5

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}
  • +1: Is the \alert<+(1)> ((+x)) syntax a new syntax? Never used it before. Crazy, also \alert<+(1),+(3)> works! – Dr. Manuel Kuehner May 9 '18 at 21:50
  • @Dr.ManuelKuehner (x) can be used as an offset to the overlay. – samcarter_is_at_topanswers.xyz May 9 '18 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. – Dr. Manuel Kuehner May 9 '18 at 21:53
  • @Dr.ManuelKuehner For more information, see 9.6.4 Incremental Specifications of the user guide – samcarter_is_at_topanswers.xyz May 9 '18 at 21:54
  • 1
    @Dr.ManuelKuehner :) Don't be angry, there are so many features, nobody can use them all – samcarter_is_at_topanswers.xyz May 9 '18 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.