[Tex/LaTex] Beamer \animategraphics Missing $ inserted \end{frame}

animatebeamer

I am using the animate package to make some nice animations from several pdfs created in R. I have 3 animations in my beamer presentation, but now I'm trying to insert the forth and I get the error:

Missing $ inserted \end{frame}.

If I replace such new animation with other it works. The code I'm using is

\begin{frame}{Deaths 1997-2013}
  \centerline{\animategraphics[controls,buttonsize=0.3cm,width=7.5cm]{5}{"AP_inc_"}{1997}{2013}}
\end{frame}

and just with this set of pdfs the error appears. Can somebody help me.

Best Answer

The file basename (file name AP_inc_????.pdf without frame number and extension) has to be specified without quotes:

\animategraphics[controls,buttonsize=0.3cm,width=7.5cm]{5}{AP_inc_}{1997}{2013}
Related Question