I've have a problem when I use animations in TikZ images:
I like draw a figure over another figure by
\path(fig) node[anchor = north, inner sep=0pt,outer sep=5pt] {
FIGURE1
}
\path(fig) node[anchor = north, inner sep=0pt,outer sep=5pt] {
FIGURE2 over FIGURE1
}
This works fine until I use an animation:
\path(fig) node[anchor = north, inner sep=0pt,outer sep=5pt] {
\begin{animateinline}[loop,autoplay]{2}
\multiframe{8}{ipic=1+1}{
FIGURE1_\ipic
}
\end{animateinline}
}
\path(fig) node[anchor = north, inner sep=0pt,outer sep=5pt] {
FIGURE2 over FIGURE1
}
The first FIGURE1 is now animated but FIGURE2 is beneath FIGURE1. Using pgfonlayer/background doesn't help. Does anyone have an idea?
Here is a simple example. In the second frame, the animated background appears, but it should remain beneath the blue block. The only solution I know is to put the "animateinline"-environment around the entire tikz picture, but this is not what I want.
\documentclass{beamer}
\usepackage{animate}
\usepackage{tikz}
\begin{document}
\begin{frame}
\centering
\begin{tikzpicture}
\path (0,0) node[anchor = north] {%
BACKGROUND
};
\path (0,0) node[anchor = north,fill=blue] {%
\color{red}HOLLA DIE WALDFEE OVERLAY
};
\end{tikzpicture}
\end{frame}
\begin{frame}
\centering
\begin{tikzpicture}
\path (0,0) node[anchor = north,fill=green] {%
\begin{animateinline}[loop,autoplay]{2}
\multiframe{8}{inum=1+1}{
\color{green}\bf BACKGROUND \inum
}
\end{animateinline}
};
\path (0,0) node[anchor = north,fill=blue] {%
\color{red}HOLLA DIE WALDFEE OVERLAY
};
\end{tikzpicture}
\end{frame}
\end{document}
{}
) or hit Ctrl+K.animate
-generated animations are implemented via PDF annotations (interactive regions). However, PDF annotations don't belong to the page content like normal text/graphics, but live in a separate layer above the page. Thus, they are always in the foreground. Everything you want to appear in front of animated content must itself be part of the animation.