0

I'm using a list with \itemize as follows:

\begin{itemize}
  \item SuperTopic 1      
    \begin{itemize}
      \only<2->{\item SubTopic 1}
      \only<3->{\item SubTopic 2}
    \end{itemize}
  \item SuperTopic 2                
\end{itemize}

This produces an error saying that I do have an empty list (the 2nd level itemize), although visually works fine.

I'm not using \item<2-> because I don't want to occupy that space in the first slide.

Is there a way to prevent the error?

4
  • 1
    Welcome to TeX.SX! How about \item<2-> Subtopic 1 instead of \only<2->{\item SubTopic 1}?
    – gusbrs
    Dec 2, 2018 at 23:21
  • Thanks! Because I don't want to visually put a blank line if there is not item yet, the \item<2-> puts a blank line in the first slide and fills it in the second. The \only command do what I want.
    – Migdress
    Dec 2, 2018 at 23:25
  • Well, but that will result in an empty itemize in the first slide, as the error message says.
    – gusbrs
    Dec 2, 2018 at 23:27
  • Yes, that's the question. So do you think there is not a way to accomplish what I want?
    – Migdress
    Dec 2, 2018 at 23:28

1 Answer 1

2

Well, given you'd like to not have the whole sublevel of itemize as the overlays unfold, you could use overlays also on the environment call.

\documentclass{beamer}

\begin{document}

\begin{frame}
  \frametitle{Title}

  \begin{itemize}
  \item SuperTopic 1
    \only<2->{\begin{itemize}}
      \only<2->{\item SubTopic 1}
      \only<3->{\item SubTopic 2}
    \only<2->{\end{itemize}}
  \item SuperTopic 2
  \end{itemize}

\end{frame}

\end{document}

But this is a somewhat fragile construction, you can easily end up with an inconsistent structure, if you get your overlays wrong.

enter image description here

4
  • @marmot Yes, that is usually in the key "If you really want this, you can have it, but I wouldn't do this myself..." :)
    – gusbrs
    Dec 2, 2018 at 23:36
  • @marmot By the way, I'm trying to convert this to an animated gif as you taught me earlier, but no success. The document must be prepared for it, or a convert on any pdf should work?
    – gusbrs
    Dec 2, 2018 at 23:37
  • 1
    The trick is convert -density 300 -delay 96 -loop 0 -alpha remove multipage.pdf animated.gif from tex.stackexchange.com/a/136919/121799
    – user121799
    Dec 2, 2018 at 23:45
  • @marmot Yeah, that's what I was trying, to get convert-im6.q16: not authorized multipage.pdf' @ error/constitute.c/ReadImage/412. But never mind, I'll sort this out eventually.
    – gusbrs
    Dec 2, 2018 at 23:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .