I have an item list in a tcolorbox here in the beamer.
\begin{tcolorbox}[title=item list 1]
\begin{itemize}[<+->]
\item 1a
\item 1b
\item 1c
\end{itemize}
\end{tcolorbox}
The items 1a, 1b, 1c in item list 1 is shown one by one.
Suppose I want another item list on the same frame in a tcolorbox replacing the previous one after uncovering all the items in list 1. The second list is also uncovered one item by one item.
\begin{tcolorbox}[title=item list 2]
\begin{itemize}[<+->]
\item 2a
\item 2b
\item 2c
\end{itemize}
\end{tcolorbox}
I know I can use environment like \only<n>
to control the sequence, but that means I have to manually label every item in list 1 and 2 with \item<n>
. This becomes really time-consuming when the two lists are long (and for my case, the list contains nesting). Is there any way to treat the item list as a whole when specifying the number in \only<n>
. For example,
\begin{frame}{Two lists}
\only<1>{
% first list, expecting the items display one by one
% second list doesn't appear before the first list completely shown
\begin{tcolorbox}[title=item list 2]
\begin{itemize}[<+->]
\item 2a
\item 2b
\item 2c
\end{itemize}
\end{tcolorbox}
}
\only<2>{
% second list, expecting the items display one by one
\begin{tcolorbox}[title=item list 2]
\begin{itemize}[<+->]
\item 2a
\item 2b
\item 2c
\end{itemize}
\end{tcolorbox}
}
\end{frame}
Currently, when I use this the code above, beamer would only show the first item in list 1 and the first 2 item in list 2. I understand that it treats the 1 and 2 in \only<n>
as the number of items in both item lists.
Any idea to implement this without manually counting each item and labelling it?