# Croping Tikz animation out of a beamer presentation (producing empty pages)

I've a beamer presentation and want to use the tikz pirctures inside rendered as svgs. So far no problem, but compiling the code via pdflatex the following (minimal) example results in four pages, every second page empty.

\documentclass[beamer,tikz,preview,multi]{standalone}

\begin{document}
\begin{standaloneframe}
\begin{tikzpicture}

\node[draw](t){AAA};
\node[above of=t]{ {\visible<2>{BBB}} };

\end{tikzpicture}
\end{standaloneframe}
\end{document}


Result:

• I need preview for cropping the tikzpicture - without preview it is working fine (but not cropped)
• Same result for latex and pdflatex - always double pages
• crop is not working either or seems to be the legacy solution

Is it a bug or am I doing something wrong? Nothing found in manual

• Welcome to TeX.SX! I can confirm this problem is due to the presence of the preview option... how to solve it... no idea! :-) – darthbith Apr 7 '15 at 12:00

Digging deep I found this 9 day old question on stackexchange.com . The problem is depending on pgf and the preview package (seems to be a bug). A working solution is to save \shipout before \begin{document} and restore it afterwards (thank you krlmlr!).

\documentclass[beamer,tikz,preview,multi]{standalone}

\let\myshipout\shipout
\begin{document}
\let\shipout\myshipout

\begin{standaloneframe}
\begin{tikzpicture}

\node[draw](t){AAA};
\node[above of=t]{ {\visible<2>{BBB}} };

\end{tikzpicture}
\end{standaloneframe}
\end{document}