[Tex/LaTex] LaTeX animation not working

animateanimations

I want to animate parts of a beamer presentation. Experiments with \transduration have been somewhat promising, but since the animation is only for a graphics image on the page with changing time parameter, so I searched on for a better solution than explicitly creating multiple graphics files externally and a corresponding multitude of \includegraphics in the LaTeX document, one for each point in time.

A search has quickly led to AlexG's answer to “Animations in LaTeX”, which appeals to me because the animation is encapsulated in a single \multiframe and seems not to require any tools external to LaTeX to generate the animation's frames.

However, I cannot get AlexG's LaTeX code to work like so:

latex alexg.tex
dvips alexg.dvi
ps2pdf alexg.ps
pdfpc alexg.pdf

In fact, I see a media-player like box with some controls below and one thick blue vertical line inside, but nothing happens when I push the controls.

(Also attempts to apply okular and evince for display have failed. I have also tried pdflatex for conversion, but this has not worked either and has, moreover, led to problems in unrelated other places when importing postscript graphics.)

Best Answer

Unlike Acrobat Reader, Evince and Okular are minimalistic PDF viewers that don't come with a JavaScript engine. It is necessary to run the embedded animations produced by means of the animate package.

On Linux and mobile platforms, PDF viewers with the required functionality are not available. Here, SVG could be chosen as an alternative output format and a Web browser for viewing. See "Using the animate package without Adobe" for further information.

The example linked in the OP, with slight modifications (turned into beamer-class document, dvisvgm set as global option):

latex texsx-524206
latex texsx-524206
dvisvgm --zoom=-1 --font-format=woff texsx-524206

\documentclass[dvisvgm, aspectratio=169]{beamer}

\usepackage{animate}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems}
\pgfdeclarelindenmayersystem{A}{%
  \symbol{F}{\pgflsystemstep=0.6\pgflsystemstep\pgflsystemdrawforward}
  \rule{A->F[+A][-A]}
}

\begin{document}

\begin{frame}{Embedded animation}

  Press \fbox{F11} for presentation mode.
  \begin{center}
    \begin{animateinline}[controls,loop]{2}
    \multiframe{8}{n=1+1}{
      \begin{tikzpicture}[scale=10,rotate=90]
        \draw (-.1,-.2) rectangle (.4,0.2);
        \draw [blue,opacity=0.5,line width=0.1cm,line cap=round]
          l-system [l-system={A,axiom=A,order=\n,angle=45,step=0.25cm}];
      \end{tikzpicture}
    }
    \end{animateinline}
  \end{center}

\end{frame}

\end{document}
````
Related Question