0

Suppose I have a list where I want the item just before a sub-list to disappear somewhere during the uncovering of the sub-list. See example:

\documentclass{beamer}
\begin{document}
  \begin{frame}
    \begin{itemize}
        \item item 1.
        \item <2-> item 2
        \item <3->item 3
        \item <4-6> item 4
        \begin{itemize}
            \item <5-> item 5
            \item <6-> item 6
            \item <7-> item 7
        \end{itemize}
        \item <9-> item 9
        \item <10-> item 10     
    \end{itemize}
  \end{frame}
\end{document}

This particular example will have the sub-list's visibility linked to the item before it (item 4), but I'd like to control this separately (in this case, to match the visibility of its children). Do I need some tricks like wrapping it in a \onslide or something?

0

You can separate the sublist from item 4 by wrapping item 4 inside \uncover{}.

\documentclass{beamer}
\begin{document}
  \begin{frame}
    \begin{itemize}[<+->]
        \item item 1.
        \item item 2
        \item item 3
        \uncover<4-6>{\item item 4}
        \begin{itemize}
            \item item 5
            \item item 6
            \item item 7
        \end{itemize}
        \item item 9
        \item item 10     
    \end{itemize}
  \end{frame}
\end{document}

Or a more dynamic one, albeit not the prettiest one codewise. The (2) specifies, that item 4 should only be visible for the two first sub items.

\documentclass{beamer}
\begin{document}
  \begin{frame}
    \begin{itemize}[<+->]
        \item item 1.
        \item item 2
        \item item 3
        \item<.(1)-+(2)> item 4
        \item[]<.-> \begin{itemize}
            \item item 5
            \item item 6
            \item item 7
        \end{itemize}
        \item item 9
        \item item 10     
    \end{itemize}
  \end{frame}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.