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 discovered that you can \pause within a tikzpicture, which works well until I switched the theme to one with a footline.

I've created a "test case" that illustrates the problem.

\documentclass{beamer}
\providecommand\thispdfpagelabel[1]{} % Not sure what this does but our installation requires it.
\usepackage{tikz}
\usetheme{Madrid} % Has a footline.

\begin{document}
  \begin{frame}
    \frametitle{test}
    \begin{tikzpicture}
      \node at (0, 1) {Hello};
      \pause
      \node at (0, 0) {World};
    \end{tikzpicture}
  \end{frame}
\end{document}

This creates two slides, but the footline is only drawn on the second (the headline/title appears on both). Is there anything I can do about this?

share|improve this question
1  
Ouch! A bit of testing shows that putting a \pause inside a tikzpicture really messes up the pausing. As an interim solution, you could use the \node<overlay specification> syntax or one of the other methods of hiding/revealing stuff in beamer. But a plain \pause really does seem to be specially weird. –  Andrew Stacey Jun 24 '11 at 9:47
    
I wouldn't use pause, but I've had no problem with \onslide and friends... –  Seamus Jun 24 '11 at 9:53
1  
Is this the same problem as in tex.stackexchange.com/questions/10871/…? –  Caramdir Jun 24 '11 at 10:06
    
Yes, it looks like the same problem. –  Bristol Jun 24 '11 at 10:40
add comment

2 Answers

up vote 11 down vote accepted

I think the problem is that \pause isn't smart enough. The footline appears in the following:

\documentclass{beamer}
\providecommand\thispdfpagelabel[1]{} % Not sure what this does but our installation requires it.
\usepackage{tikz}
\usetheme{Madrid} % Has a footline.

\begin{document}
  \begin{frame}
    \frametitle{test}
    \begin{tikzpicture}
      \node at (0, 1) {Hello};
\onslide<2->{\node at (0, 0) {World};}
    \end{tikzpicture}
  \end{frame}
\end{document}

That is, if you put your text to appear on the second slide in a \onslide<2->{} it will work. Or for a little more automation, use \onslide<+->{} which automatically increments things.

Not quite as intuitive as the pause command, but it does allow you more control...

share|improve this answer
1  
I'll use \onslide<+-> then, thanks. At least I don't have to number things manually that way. –  Bristol Jun 24 '11 at 10:43
add comment

I just stumbled over this issue and found another work-around that does not require nesting lots of paused elements in braces: Add \onslide<1-> at the end of the tikzpicture environment (strangely it does not work if you put it after the environment):

\documentclass{beamer}
\providecommand\thispdfpagelabel[1]{} % Not sure what this does but our installation requires it.
\usepackage{tikz}
\usetheme{Madrid} % Has a footline.

\begin{document}
  \begin{frame}
    \frametitle{test}
    \begin{tikzpicture}
      \node at (0, 1) {Hello};
      \pause
      \node at (0, 0) {World};
      \onslide<1->
    \end{tikzpicture}
  \end{frame}
\end{document}
share|improve this answer
    
Why does it work, and is this safe to use? –  Unapiedra Jun 10 '13 at 15:31
    
It seems that \pause affects „stuff after it“, where „stuff“ seems to range too far than intended. A \onslide<1-> delimits the effect of the previous pause, and as it selects all overlays, makes sure that the following stuff is executed always. I believe this is safe. –  Joachim Breitner Jun 10 '13 at 15:44
add comment

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.