# Highlight parts of a text piecewise in beamer

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}

• 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

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}

• +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
• @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