[Tex/LaTex] Beamer: Highlight current item in list

animationsbeameritemize

I'm using beamer for a presentation. There's an itemize environment on a slide. For this (and possible more) itemize, I want the following behaviour:

  • highlight the item I'm talking about (e.g., bold)
  • gray out the items I talked about already (e.g., by {\color{gray} old item}
  • items I'm going to talk about later are not visible yet
  • no code duplication (e.g., writing sentences twice)

What I startet with was

\begin{itemize}
    \item<+> My first point
    \item<+> My second point
    \item<+> My third point
    \item<+> And my last point
\end{itemize}

I tried to get this done by user-defined commands like

\newcommand{\grayout}[1]{
    \item<+> #1
    \item<+-> {\color{gray} #1}
}
\begin{itemize}
    \grayout{My first item}
    ...
\end{itemize}

But this is not working well. How can I solve this issue?

Best Answer

  • highlight the item I'm talking about (e.g., bold)

can be done by using \item<alert@+> or automatically with \begin{itemize}[<alert@+>]

  • items I'm going to talk about later are not visible yet

\begin{itemize}[<+->]

  • gray out the items I talked about already (e.g., by {\color{gray} old item}

This is more tricky. Normally this would need something like https://tex.stackexchange.com/a/288050/36296, but as your items are not visible before they are highlighted, you could simply change the colour to gray.


\documentclass{beamer}

\begin{document}

\begin{frame}

{
    \setbeamercolor{itemize/enumerate body}{fg=gray}
    \begin{itemize}[<+-|alert@+>]
        \item My first point
        \item My second point
        \item My third point
        \item And my last point
    \end{itemize}
}
\end{frame} 

\end{document}