I'm just trying add some animation into my thesis, but pdf-backend still compliants to me, that requested file can't be found.
Also I would like to know how to proceed, if the image is not stored in the same directory. For attached MNWE, file is stored in same directory as compiled test.tex file.
If I am right, the syntax should be like (The number of frames need not be specified):
\animategraphics[<options>]{<frames per second>}{<name without extension>}{<first frame>}{<last frame>}
Compiled by:
lualatex --enable-write18 --shell-escape test.texworks NOKpdflatex --enable-write18 --shell-escape test.texworks OK
MNWE
\documentclass{article}
\usepackage{graphicx}
\usepackage{animate}
\begin{document}
text
\begin{figure}
\centering
\animategraphics[controls,autoplay,loop]{2}{animation}{}{}
\end{figure}
\end{document}
For sake of completens, I also try the answer in the similar post Animation using a sequence of images in a single pdf file, but the behavior is the same.
Code for generating PDF with 20 pages used for animation:
% This animation helps explain the geometric interpretation of the
% definite integral.
% http://texample.net/tikz/examples/animated-definite-integral/
\documentclass[tikz]{standalone}
\usepackage{tikz, pgf}
\usepackage{multido}
\begin{document}
%
\multido{\n=1+1}{20}{%
\begin{tikzpicture}[scale=1.25]
\draw[red,thick,<->] (-1,1) parabola bend (0,0) (2.1,4.41)
node[below right] {\(y=x^2\)};
\draw[loosely dotted] (-1,0) grid (4,4);
\draw[->] (-0.2,0) -- (4.25,0) node[right] {\(x\)};
\draw[->] (0,-0.25) -- (0,4.25) node[above] {\(y\)};
\foreach \x/\xtext in {1/1, 2/2, 3/3}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {\(\xtext\)};
\foreach \y/\ytext in {1/1, 2/2, 3/3, 4/4}
\draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {\(\ytext\)};
%
\def\mc{\n*\n}
\pgfmathsetmacro\result{int(\n*\n*\n)}
\shade[top color=blue,bottom color=gray!50]
(0,0) parabola (0.1*\n,0.01*\mc) |- (0,0);
\node[draw, fill=white] at (3cm,2cm)
{\(\int\limits_0^{\frac{\n}{10}}\!\!x^2\mathrm{d}x = \frac{\result}{3000}\)};
\draw[fill=black,color=black] (0.1*\n,0.01*\mc) circle (1.2pt);
\end{tikzpicture}
}
\end{document}
\includegraphics{animation}find the file? (Its name should beanimation.pdf, obviously a multipage PDF.) – AlexG Nov 25 '19 at 12:01\graphicspath{...}to extend the list of paths to be searched for graphics files. – AlexG Nov 25 '19 at 12:09aniMation.PDFmight not be found. – AlexG Nov 25 '19 at 12:24lualatexfails for some reason, that's new: due to recent changes of grf*-related pkgs or the renewed l2e format, perhaps? On the other hand, no problem withpdflatexandxelatex... – AlexG Nov 25 '19 at 13:31\pdfximage(pdfTeX) and\saveimageresource(LuaTeX) have different syntax? (I do\let\pdfximage\saveimageresourcein pdfbase, as suggested in the LuaTeX manual.) AND I don't use quotes ... – AlexG Nov 25 '19 at 13:43animate-type PDF-animations run in AR, Foxit, PDFXChange. Apart from this, you can produce animated SVG which run everywhere, where Chromium-based browsers exist. Firefox too, but with bad performance. – AlexG Nov 25 '19 at 15:12