2

I am making some simple drawings with TikZ, and would like to spread the drawings over several slides (ie. on each slide something additional is drawn on the frame). I have succeeded doing it with \pause as I would normally do, and, when it doesn't work (when drawing on layers), I use the visible on= drawing option which serves the purpose. My only issue is that page numbering is only rendered in the very last page of a given frame, that is, when the drawing is fully complete, just before I pass to the next frame. The paging is actually correct (in the sense that if, the previous frame ended on, say, page 8, and the frame has four steps, then the last slide correctly shows page 12; it's just that, in between, nothing is shown at all).

To do the paging, I have \setbeamertempate{footline}[page number] at the top of my latex code.

Besides that, I also have this issue with footnotes, that is, if I have a \footnotetext{...} at the end of my frame, it will only show in the very last slide of my frame, no matter what I tried with things like \pause[...] or \onslide<...>{\footnotetext{...}}.

Here is a minimal reproducible example:

\documentclass{beamer}
\usepackage{tikz}

\setbeamertemplate{footline}[page number]

\begin{document}
\begin{frame}
  \begin{tikzpicture}
    \draw (0,0) rectangle (1,1);
    \pause
    \draw (2,0) rectangle (3,1);
  \end{tikzpicture}
\end{frame}
\end{document}

This will produce a pdf with two pages. The first page will have a single square, without any pagination. The second page will have two squares, with 2/2 written at the bottom right of the page.

7
  • Can you show us an example, when happen your problem? With an MWE, which reproduce your problem?
    – Zarko
    Jun 4, 2022 at 14:29
  • @Zarko edited accordingly.
    – jthulhu
    Jun 4, 2022 at 14:44
  • 1
    It seems that the problem is in used \pause. For example, \uncover doesn't cause such problem: \documentclass{beamer} \setbeamertemplate{footline}[page number] \usepackage{tikz} \begin{document} \begin{frame} \begin{tikzpicture} \draw (0,0) rectangle (1,1); \uncover<2->{ \draw (2,0) rectangle (3,1); } \end{tikzpicture} \end{frame} \end{document} works fine.
    – Zarko
    Jun 4, 2022 at 17:12
  • Here is another way to reveal step by step: (Mindmap) tikzpicture in beamer (reveal step by step)
    – Unknown
    Jun 4, 2022 at 19:41
  • 1
    There is a very useful hack here: tex.stackexchange.com/a/70051/263192. Put \onslide<1-> last in your tikzpicture and it works with \pause.
    – user263192
    Jun 5, 2022 at 6:51

0

Browse other questions tagged .