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.

Is it possible to make the coordinate system to be fixed on several slides in a beamer presentation? So that each point with the same coordinates in different tikzpicture environments on different slides is in exactly the same position in the resulting PDF?

Example:

\documentclass{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{frame}

\begin{frame}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\draw (2,2) circle (2cm);
\end{tikzpicture}
\end{frame}

\end{document}

How to modify this example, such that on both slides the circle at position (0,0) overlays?

share|improve this question
    
This is hard to answer without an example illustrating what you mean exactly. At any rate, you can always place your TikZ picture relative to anchors of the (current page) coordinate. –  Kevin C Dec 9 '13 at 19:48
1  
possible duplicate of How can I fix jumping TikZ pictures in beamer? –  Peter LeFanu Lumsdaine Dec 9 '13 at 19:53
1  
Peter LeFanu Lumsdaine: I don't think so, as I have different frame-ennvironments. So I cannot see how to make use of the answers of the denoted post. –  Thomas Witkowski Dec 9 '13 at 20:17
    
You need to make sure that the tikzpicture occupies the same space (at least) vertically. This is achieved either by putting it in a box, or adding phantom elements in your tikzpicture to match them (in this case, adding something to the first tikzpicture). –  Werner Dec 9 '13 at 20:23
add comment

1 Answer 1

up vote 10 down vote accepted

you can set the overlay and remember picture option to the tikzpicture:

\documentclass{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}
\begin{tikzpicture}[overlay,remember picture]
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{frame}

\begin{frame}
\begin{tikzpicture}[overlay,remember picture]
\draw (0,0) circle (1cm);
\draw (2,2) circle (2cm);
\end{tikzpicture}
\end{frame}

\end{document}

enter image description here

With these options you have also access to the current page anchor, which allows for cool stuff like:

\documentclass{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}
\begin{tikzpicture}[overlay,remember picture,every node/.style={draw,minimum size=2.5cm,circle}]
\node [anchor=east] at (current page.east){};
\node [anchor=west] at (current page.west){};
\node [anchor=north] at (current page.north){};
\node [anchor=south] at (current page.south){};
\end{tikzpicture}
\end{frame}

\begin{frame}
\begin{tikzpicture}[overlay,remember picture,every node/.style={draw,minimum size=2.5cm,circle}]
\node [anchor=east] at (current page.east){};
\node [anchor=west] at (current page.west){};
\node [anchor=north] at (current page.north){};
\node [anchor=south] at (current page.south){};
\node at (current page.center){};
\end{tikzpicture}
\end{frame}

enter image description here

share|improve this answer
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.