In beamer, I would like to use alert in a nested list so that each line is red (i.e., the default alert color) stepwise, one line at a time. This code produces the output I would like:
\documentclass[pdf]{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item\alert<+>{Parent 1}
\item\alert<+>{Parent 2}
\begin{itemize}
\item\alert<+>{child 1}
\item\alert<+>{child 2}
\end{itemize}
\item\alert<+>{Parent 3}
\end{itemize}
\end{frame}
\end{document}
However, the code above requires using \alert<+>{...}
with every \item
. I would like to generate this output using a specification for the entire list with the \begin{itemize}
. Without the nested list, the following works:
\documentclass[pdf]{beamer}
\begin{document}
\begin{frame}
\begin{itemize}[<alert@+>]
\item Parent 1
\item Parent 2
\begin{itemize}[<alert@+>]
\item child 1
\item child 2
\end{itemize}
\item Parent 3
\end{itemize}
\end{frame}
\end{document}
This makes 5 slides, as does my first example. The first slide is the same, with "Parent 1" in red. The second slide, however, has "Parent 2", as well as "child 1" and "child 2", all in red. This is the part I would like to behave differently. I would like the second slide to have only "Parent 2" in red, but not "child 1" or "child 2". Then slides 3, 4, and 5 would have "child 1", "child 2", and "Parent 3", respectively, in red, just as occurs in both examples.
I've looked through similar questions (e.g., this doesn't highlight all children, but still highlights the first child with the parent and requires manually specifying slide numbers which I'd like to avoid).
I tried putting the [<alert@+>]
with the inner \begin{itemize}
as well as the outer \begin{itemize}
and various combinations of .
and ,
with the +
, etc. It seems like there must be a way to get it to make each line red one at a time using a default alert specification with the \begin{itemize}
, but nothing I've tried has worked. I would be ok with defining a new list environment (e.g., a "nestedStepwiseAlert" environment) but haven't had luck getting that to work either.