I am trying to get an animation running in beamer with the following setup:
\documentclass[]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usepackage{blindtext}
\usepackage{calligra}
\usepackage[]{animate}
\usetikzlibrary{arrows,positioning,trees,decorations.pathmorphing,shapes,backgrounds,calc,shadows,decorations.pathreplacing}
\usetikzlibrary{fadings}
\usetikzlibrary[shadings]
\mode<presentation>
{
\usetheme{default}
\useoutertheme{default}
\usecolortheme{default}
}
\setbeamersize{text margin left=3pt,text margin right=3pt}
\DeclareGraphicsExtensions{.eps,.jpg,.png}
\graphicspath{ {./Pictures/} }
\begin{document}
\begin{frame}
\begin{columns}
\column{0.5\textwidth}
\centering
\animategraphics[width=0.9\textwidth,keepaspectratio,autopause,autoresume,autoplay,loop]{0.5}{pp_}{1}{54}
\column{0.5\textwidth}
\begin{columns}
\column{0.9\textwidth}
\begin{tikzpicture}[remember picture,overlay]
\node at (2.5,-0.6) [rectangle,draw=white,fill=black,fill opacity=0.7,
rounded corners, text width=0.9\textwidth, text height=0.9\paperheight] (aa) {};
\node at (aa) [rectangle,text width=0.8\textwidth, text=white] () {
\only<1>{\calligra \blindtext}
\only<2>{\calligra \blindtext}
\only<3-4>{\calligra \blindtext}
};
\end{tikzpicture}
\end{columns}
\end{columns}
\end{frame}
\end{document}
The idea is to have an ongoing slide(picture) show in the left column while going through some text in the right column. Since the text is rather big it must be shown consequtive blocks. This is achieved via the "only" command. Now "only" causes beamer to generate, in this example, four slides. The problem is that when one proceeds to the next slide the animation in the left column restarts at frame 0. It occurs that every frame is runnig its own animation. But what I want is a single ongoing animation in the left column invariably of the beamer slide I am currently are.
Any ideas are much appreciated.
Best Answer
Beamer
frames with overlays andanimate
generated animations are problematic. (See ↗Bugs section in theanimate
documentation.)As correctly observed by the OP,
Beamer
produces multiple PDF pages with independent animations in the case of slides with overlays. The current frame number and the playing state, direction and speed would have to be transferred from one animation to the next upon page change, in order to give the illusion of a single animation running.This can be achieved using the ↗JavaScript interface of
animate
. The necessary code is executed during Page-Open and Close events of hidden PDF annotations.Edit: To further enhance overlay awareness of animations, the
beamer
command\alt<>{}{}
can be used to reserve space on "silent" slides (note thedraft
option in the alternative clause). If this is not desired, the animation can just be put into\only<>{...}
: