[Tex/LaTex] Nested itemize in beamer while only first layer bullet-points appear one-by-one

beameritemize

I have two nested lists in a beamer presentation,i.e

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}[<+->]
\item a
\begin{itemize}
\item 1
\item 2
\end{itemize}
\item b
\end{itemize}
\end{frame}
\end{document}

Now, in both layers, the different items appear one-by-one, whereas I only want the items of the first layer(letters) to appear one-by one and the ones in the second itemize(numbers) all together. How could I do this?

Best Answer

Supplying <+-> sets the stepping environment until the end of the itemize.

To easily let two items show themselves together do:

\begin{itemize}[<+->]
  \item a
  \item<.->
\end{itemize}

The . tells the item, to not increment the slide counter.

This works fine for single items, however, if you use nested levels like this:

\begin{itemize}[<+->]
  \item a
  \begin{itemize}[<.->]
    \item 1
    ...
    \item 10
   \end{itemize}
\end{itemize}

you will find that a and 1 -- 10 are shown together. This is probably not what you want. For tweaking there is an optional argument to the counter argument .(#) where # is a number. If you specify <.(1)-> it will be equivalent to adding 1 to the slide where it will be shown. Hence the trick is to step the counter and force it to not increment:

\begin{itemize}[<+->]
  \item a
  \begin{itemize}[<.(1)->]
    \item 1
    ...
    \item 10
  \end{itemize}
  \pause
  \item z
\end{itemize}

The second pause is a local step counter. One would think you can use it instead of the (1) notation, however the nested list complicates things and the above method is more lenient.