This is easily possible by providing an overlay specification to the frame command or environment:
\frame< ov-spec >{%
... many animation steps ...
}
will restrict the slides of the frame to those steps of your animation that match ov-spec. To just show the last slide, insert the number of the last step – or, if you don't know it, a ridiculously large number:
\frame<4711>{%
... many animation steps ...
}
Complete MWE:
% http://tex.stackexchange.com/questions/139260
\documentclass{beamer}
\usepackage{tikz}
% Keys to support piece-wise uncovering of elements in TikZ pictures:
% \node[visible on=<2->](foo){Foo}
%
% see: http://tex.stackexchange.com/questions/55806
%
% Internally works by setting opacity=0 when invisible, which has the
% adavantage (compared to \node<2->(foo){Foo} that the node is always there, hence
% always consumes space and (foo) is always available for coordinate calculations.
%
% The actual command that implements the invisibility can be overriden
% by altering the style invisible. For instance \tikzsset{invisible/.style={opacity=0.2}}
% would dim the "invisible" parts. Alternatively, the color might be set to white, if the
% output driver does not support transparencies (e.g., PS)
%
\tikzset{
invisible/.style={opacity=0},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}
},
visible on/.style={alt=#1{}{invisible}},
}
\begin{document}
% constrained to last slide of frame
\begin{frame}<3>{Only last step}
\begin{tikzpicture}[every node/.style={fill=red!30, draw=red}]
\node{Foo}
child[visible on=<2->]{node {Bar}}
child[visible on=<3->]{node {Baz}}
;
\end{tikzpicture}
\end{frame}
% show every slide of frame
\begin{frame}{Uncovering piecewise}
\begin{tikzpicture}[every node/.style={fill=red!30, draw=red}]
\node{Foo}
child[visible on=<2->]{node {Bar}}
child[visible on=<3->]{node {Baz}}
;
\end{tikzpicture}
\end{frame}
\end{document}
standaloneclass to produce your TikZ animation you can include any of its slides in your new presentation with\includegraphics[page=...]{...}. – Ignasi Oct 17 '13 at 09:40\begin{tikzpicture}...\end{tikzpicture}and use\input{myfigure}in any of my latex files. And then include some command like\beamerdisableoverlays(note this is just the command I'm looking for, I don't know whether it exists) if I don't want the animation to be enabled. – Didac Busquets Oct 17 '13 at 10:02\begin{frame}<overlay spec>will restrict the complete frame to the slides given in the overlay spec. Just enter the last step of your TikZ image and you are done. – Daniel Oct 17 '13 at 10:16