[Tex/LaTex] Item displayed twice in beamer itemize

beameritemizelists

In a beamer presentation I'm trying to display two different images during the same item in itemize.
If I add a \pause between the items the images are not displayed.

So, how should I display the "Three, then four" item twice?

Probably this is a really stupid question but I couldn't find a solution searching on these pages or on the web.

\begin{frame}
\frametitle{Title}
\begin{columns}
\column{.4\textwidth}
  \begin{minipage}[c][.6\textheight][c]{\linewidth}
    \begin{itemize}[<+->]
        \item
            One
        \item
            Two
        \item
            Three, then four
        \item
            Five
    \end{itemize}
   \end{minipage}
\column{.6\textwidth}
\center
        \includegraphics<1>{fig_1}
        \includegraphics<2>{fig_2}
        \includegraphics<3>{fig_3}
        \includegraphics<4>{fig_4}
        \includegraphics<5>{fig_5}
\end{columns}
\end{frame}

Best Answer

The issue here is the fact that \pause has global scope within the frame. Putting a \pause somewhere on a slide says "Nothing after this appears on earlier slides.". This cannot be overridden. So all of your \includegraphics commands are wrapped in a "Don't show until after the slide with \pause is visible.". So you need to limit the scope of the \pause.

One way is to explicitly tell beamer which slide each item should appear on by writing something like \item<3->. Another is to exploit the behaviour of beamer when it encounters the <+-> syntax. The advantage of this second way is that it is robust under changing the order of the list, or inserting or removing items. The important thing to know is that when beamer sees a + sign in an overlay specification, such as <+->, then it increments its internal counter which keeps track of what slide stuff should appear on. So each \item<+-> says, "Display this from the next slide onwards." (note that the optional argument to the itemize environment is simply a shortcut way of saying \item<+-> each time). The trick, therefore, is to tell beamer to increment the counter at the time you want the extra pause. The item three, then four will be displayed from overlay 3 onwards, but the item five will wait an extra turn before it is displayed.

There are various ways of achieving this goal. The most direct is simply to write \stepcounter{beamerpauses}. The most indirect is to ensure that beamer sees an extra + somewhere. Indeed, this could be one for an obfuscation competition! Putting \onslide<+>{} or \alert<+>{} or \invisible<+>{}, or indeed any overlay-aware command somewhere on that line will do the trick. I think that my personal favourite would be to write

\visible<-+,+->{Three, then four}

(Note that as the two +s occur in the same overlay specification, the counter is only updated once.) But the \stepcounter is probably the clearest, and the easiest to remember why you put it there in six months' time.

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{Title}
\begin{columns}
\column{.4\textwidth}
  \begin{minipage}[c][.6\textheight][c]{\linewidth}
    \begin{itemize}[<+->]
        \item
            One
        \item
            Two
        \item
            Three, then four
            \stepcounter{beamerpauses}
        \item
            Five
    \end{itemize}
   \end{minipage}
\column{.6\textwidth}
\center
    \includegraphics<1>{fig_1}
    \includegraphics<2>{fig_2}
    \includegraphics<3>{fig_3}
    \includegraphics<4>{fig_4}
    \includegraphics<5>{fig_5}
\end{columns}
\end{frame}
\end{document}