[Tex/LaTex] Showing a text after an itemize[<+->] with \pause creates double slide

beameroverlayspause

I've come across some strange interaction between overlay specification and \pause. Basically I have an itemize and after some text(or block). I want to step through the itemize and after that show the text/block.

I've tried to put a simple \pause between the itemize and the text, but in this way two slides are created, both with the full itemize and no text.

If I don't put the \pause the text is visible from the start(which I don't want).

I've already found a simple work-around: instead of using itemize[<+->] I can specify the slides on the items(e.g item<1->, ...item<2->,... \pause), but I don't like this solution for some reasons:

  • I have to type more than before
  • I have to hard-code the slide numbers
  • This is solution is not robust. Modification on the item order, removal or addition of new items would break it.
  • I think there has to be some better solution.

So, how should I do?

By the way, a minimal example:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage{default}

\begin{document}

\begin{frame}
    \begin{itemize}[<+->]
        \item A
        \item B
        \item C
    \end{itemize}

    \pause  % double pause here

    Some text.
\end{frame}

\end{document}

Best Answer

It's a sync problem; if you add \thebeamerpauses in some places (to get the value of the beamerpauses counter), you can see what's going on:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}

\begin{document}

\begin{frame}
\begin{itemize}[<+->]
\item A\thebeamerpauses
\item B\thebeamerpauses
\item C\thebeamerpauses
\end{itemize}\thebeamerpauses
\pause
Some text.\thebeamerpauses 
\end{frame}

\end{document}

At the end of the itemize environment the counter has a value of four, and \pause steps it to 5, so the text will appear on the fifth slide.

To obtained the expected result you can use the optional argument of \pause and the value of the beamerpauses counter:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}

\begin{document}

\begin{frame}
\begin{itemize}[<+->]
\item A
\item B
\item C
\end{itemize}
\pause[\thebeamerpauses]
Some text.
\end{frame}

\end{document}

Another option is to use \onslide<+-> instead of \pause:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{default}

\begin{document}

\begin{frame}
\begin{itemize}[<+->]
\item A
\item B
\item C
\end{itemize}
\onslide<+->{Some text.}
\end{frame}

\end{document}
Related Question