1

Usually I like to draw a picture, and then on the next slide, add something to it. The problem is that the size of the picture is then changed, so the picture moves in the beamer presentation, which is really not very beautiful.

How could I easily say to beamer to take the max size of the image after all the addition?

Here is a MWE:

\documentclass[]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}     
\usepackage{tikz}
\usetikzlibrary{positioning}

\usetheme{Warsaw}

\begin{document}

\begin{frame}{Title}
  \centering
  \begin{tikzpicture}
    \node[draw,circle,fill=black] (a) {};
    \node<2->[draw,fill=black,above=of a] (b) {};
  \end{tikzpicture}
\end{frame}

\end{document}

and a picture of what I have:

enter image description here

and here is what I want:

enter image description here

Do you know how to do that automatically? (I always use positioning, so manually estimate the bounding box, and then use useasboundingbox is quite dirty).

Thank you!

2

Using \visible will reserve necessary the room:

\documentclass[]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}     
\usepackage{tikz}
\usetikzlibrary{positioning}

\usetheme{Warsaw}

\begin{document}

\begin{frame}{Title}
  \centering
  \begin{tikzpicture}
    \node[draw,circle,fill=black] (a) {};
    \visible<2->{\node[draw,fill=black,above=of a] (b) {};}
  \end{tikzpicture}
\end{frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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