Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question

1 Answer 1

up vote 7 down vote accepted

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}
share|improve this answer
    
I've still got two questions: what If I have a \begin{block} .. \end{block} instead of the simple text? Would you mind explaining a bit, if possible, why a simple \pause wont give the desired output? –  Bakuriu Sep 11 '12 at 18:00
    
@Bakuriu same idea: \onslide<+->{\begin{block}{title}Some text.\end{block}}. \pause can be used for basic overlay specifications; much finer control is obtained using \only, \onslide, \uncover. –  Gonzalo Medina Sep 11 '12 at 18:04
    
@Bakuriu I updated my answer with another option. –  Gonzalo Medina Sep 11 '12 at 18:10
    
Okay, thank you. But still I think that what I'm doing is not advanced. I wonder why something simple like this screws up \pause. I'd really like to understand why what I wrote does not work as intended. –  Bakuriu Sep 11 '12 at 18:19
    
@Bakuriu I just added an explanation of the unexpected result. –  Gonzalo Medina Sep 11 '12 at 18:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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