Blog

Beamer TikZ overlays in LaTeX: reveal a figure without pause

\pause is a convenient way to reveal a Beamer list item by item, but it is a poor fit inside a TikZ picture. The pause counter and the picture do not cooperate, so later material can appear too early and then vanish. This post works through the LaTeX example from a TeX Stack Exchange question asked on 29 November 2026, and the accepted fix with TikZ overlays.

The source is ordinary LaTeX: it compiles with a standard TeX distribution, and it is compatible with Overleaf.

What \pause does inside the picture

The minimal example is a talk slide with two small graphs and three remarks. The first graph, with values ({0,0,2,2}), should appear alone. The second graph, in which a red edge has been added, should follow. Only then should the three items appear.

A \pause is placed in the middle of the tikzpicture, and further \pause commands follow the picture and each item. The document compiles, but the five slides come out in the wrong order. On the first slide the first graph is already accompanied by all three bullets. On the second slide the second graph appears and the bullets disappear. The bullets then return, one per slide, from the third slide onwards. The Result tab shows one slide at a time: Next page steps through all five.

Result

A five-slide Beamer deck titled Examples, produced with pause inside a TikZ picture. Slide 1 shows only the first graph, two short black edges labelled {0,0,2,2}, and already all three square bullets about adding an edge and where the variation occurs. Slide 2 shows both graphs, the second with a red middle edge and the label {0, 2−√2, 2, 2+√2}, and no bullets. Slides 3 to 5 keep both graphs and bring the three bullets back one at a time.
Page 1 of 5
A Beamer TikZ figure revealed with pause, in the wrong order: page 2 of 5 (the description of page 1 covers every page).
Page 2 of 5
A Beamer TikZ figure revealed with pause, in the wrong order: page 3 of 5 (the description of page 1 covers every page).
Page 3 of 5
A Beamer TikZ figure revealed with pause, in the wrong order: page 4 of 5 (the description of page 1 covers every page).
Page 4 of 5
A Beamer TikZ figure revealed with pause, in the wrong order: page 5 of 5 (the description of page 1 covers every page).
Page 5 of 5
Page 1 of 5

LaTeX source

\documentclass{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}{Examples}
  \begin{center}
    \tikzset{
      vertex/.style={circle, draw=black, fill=white, inner sep=0pt, minimum size=4pt, thick}
    }
    \begin{tikzpicture}[baseline=(c.base), thick, scale=0.7]
      \node[vertex] (a) at (0,0) {};
      \node[vertex] (b) at (1.2,0) {};
      \node[vertex] (c) at (0,1.2) {};
      \node[vertex] (d) at (1.2,1.2) {};
      \draw (a)--(b);
      \draw (c)--(d);
      \node[draw=none] at (0.6,-0.8) {\small $\{ 0,0,2,2\}$};
\pause
      \node[vertex] (p) at (4.5,0.5) {};
      \node[vertex] (q) at (5.7,0.5) {};
      \node[vertex] (r) at (6.9,0.5) {};
      \node[vertex] (m) at (8.1,0.5) {};
      \draw (p)--(q);
      \draw (m)--(r);
      \draw[red] (q)--(r);
      \node[draw=none] at (6.3,-0.7) {\small $\{ 0,2-\sqrt{2},2,2+\sqrt{2}\}$};
    \end{tikzpicture}
  \end{center} \pause
  \begin{itemize}
    \item[$\blacksquare$] adding an edge may result into integral variation or may not \pause
    \item[$\blacksquare$] sometimes the variation occurs in one place \pause
    \item[$\blacksquare$] sometimes the variation occurs in two places
  \end{itemize}
\end{frame}
\end{document}

Open in Lilia

This example is a complete document. Open it in Lilia to change it and compile it yourself, or download the PDF it produces: no account is needed for that.

Overlays on the picture, not \pause inside it

samcarter's accepted answer leaves \pause out of the picture. The overlay-beamer-styles TikZ library adds a visible on key, which you can apply to a node, a path, or a whole scope:

\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\begin{scope}[visible on=<2->]
  % second graph
\end{scope}

The first graph has no overlay, so it is present from slide 1. The second graph is drawn only from slide 2. The picture is built as one graphic on every slide; parts of it are hidden, rather than being interrupted by \pause.

The accepted answer stops at the figure. To bring the remarks in after the second graph, as the question asked, give the items their own overlays:

\begin{itemize}
  \item<3->[$\blacksquare$] adding an edge may result into integral variation or may not
  \item<4->[$\blacksquare$] sometimes the variation occurs in one place
  \item<5->[$\blacksquare$] sometimes the variation occurs in two places
\end{itemize}

The complete example below uses both steps. The five slides now follow the intended order: first graph; both graphs; then each bullet in turn.

Result

A five-slide Beamer deck titled Examples, using visible on for the second graph and item overlays for the bullets. Slide 1 shows only the first graph, two short black edges labelled {0,0,2,2}, and no bullets. Slide 2 adds the second graph, with a red middle edge and the label {0, 2−√2, 2, 2+√2}, still without bullets. Slides 3 to 5 keep both graphs and add the three square bullets one at a time, ending with all three remarks visible.
Page 1 of 5
The same figure, with visible on and item overlays: page 2 of 5 (the description of page 1 covers every page).
Page 2 of 5
The same figure, with visible on and item overlays: page 3 of 5 (the description of page 1 covers every page).
Page 3 of 5
The same figure, with visible on and item overlays: page 4 of 5 (the description of page 1 covers every page).
Page 4 of 5
The same figure, with visible on and item overlays: page 5 of 5 (the description of page 1 covers every page).
Page 5 of 5
Page 1 of 5

LaTeX source

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}

\begin{document}

\begin{frame}
  \frametitle{Examples}
  \begin{center}
    \tikzset{
      vertex/.style={circle, draw=black, fill=white, inner sep=0pt, minimum size=4pt, thick}
    }

    \begin{tikzpicture}[baseline=(c.base), thick, scale=0.7]

      \node[vertex] (a) at (0,0) {};
      \node[vertex] (b) at (1.2,0) {};
      \node[vertex] (c) at (0,1.2) {};
      \node[vertex] (d) at (1.2,1.2) {};
      \draw (a)--(b);
      \draw (c)--(d);
      \node[draw=none,font=\small] at (0.6,-0.8) {$\{ 0,0,2,2\}$};

      \begin{scope}[visible on=<2->]
        \node[vertex] (p) at (4.5,0.5) {};
        \node[vertex] (q) at (5.7,0.5) {};
        \node[vertex] (r) at (6.9,0.5) {};
        \node[vertex] (m) at (8.1,0.5) {};
        \draw (p)--(q);
        \draw (m)--(r);
        \draw[red] (q)--(r);
        \node[draw=none,font=\small] at (6.3,-0.7) {$\{ 0,2-\sqrt{2},2,2+\sqrt{2}\}$};
      \end{scope}

    \end{tikzpicture}
  \end{center}
  \begin{itemize}
    \item<3->[$\blacksquare$] adding an edge may result into integral variation or may not
    \item<4->[$\blacksquare$] sometimes the variation occurs in one place
    \item<5->[$\blacksquare$] sometimes the variation occurs in two places
  \end{itemize}
\end{frame}
\end{document}

Open in Lilia

This example is a complete document. Open it in Lilia to change it and compile it yourself, or download the PDF it produces: no account is needed for that.

The original question used the moloch theme. The examples here use Beamer's default theme, because the overlay fix does not depend on the theme.

Doing it in Lilia

Lilia is a browser editor where a paper is a sequence of blocks with LaTeX underneath. The examples above are complete documents.

Open the example. Use Open and edit in Lilia on the example's tab. You can change the visible on ranges or the item overlays and compile the PDF there. The same source can also be pasted with Paste LaTeX from the command palette (the ? button in the top bar), or imported as a .tex file or an Overleaf zip from Import / Export.

Check that it compiles. Click the shield in the left rail (Validate), then Validate now. Lilia compiles the document with a real TeX engine. In the PDF, your copy opens with a title slide; the five slides of the example follow in the same order as in the Result tab.

Hand it on. Export → LaTeX gives a single .tex or a project .zip (flat or Overleaf-style). The overlay commands go with you as ordinary LaTeX, so a co-author can compile them on Overleaf or in a local TeX distribution.

Credit

This post follows the question \pause is not working as I want in beamer, asked by Rup_Cantor on TeX Stack Exchange on 29 November 2026. The visible on fix is from samcarter's accepted answer. The item overlays that reveal the bullets after the second graph are added here so the slide order matches the question. The question and the accepted answer are used under CC BY-SA.

Summary

  • \pause inside a tikzpicture can scramble later overlays: here the bullets appear on slide 1 and disappear on slide 2.
  • Load overlay-beamer-styles and mark the second part of the figure visible on=<2->.
  • Overlay the list separately, for example with \item<3->, \item<4-> and \item<5->, so the text starts after the figure has been revealed.

If you'd like to try this without installing anything, Lilia's Free plan includes 3 documents, every export format and the compile check: liliaeditor.com.