I would like to have an animation (consisting of three pictures pic-0.jpg, pic-1.jpg, pic-2.jpg) with additional elements added on the top of the animation. What am I doing wrong? And how can I do it right?


   \put(-6,-3){\includegraphics[height=0.8\columnwidth]{pic-\i} }
   \end{figure} }
 \end{animateinline}      }  

  • 1
    Several issues: (1) figure environment inside animateinline environment; (2) zero picture size – AlexG Jan 31 '18 at 14:09
  • Thanks. I got rid of the issues. I still does not work. – Markow Jan 31 '18 at 23:05
  • The error is: package animate error content of first frame must not have zero width – Markow Jan 31 '18 at 23:06
  1. \begin{picture}(0,0) ... \end{picture} produces a box with zero dimensions, but animate wants non-zero size boxes in order to produce animation frames.

    TikZ is better suited for annotating external graphics files. Dedicated TikZ-based packages exist for image annotation, e. g. callouts on CTAN, and non-CTAN onimage, introduced ↗here. I prefer the latter. It can be downloaded as onimage.dtx↗here. Run pdflatex twice on it to get onimage.sty and the documentation onimage.pdf.

  1. The figure environment should be moved out of the animateinline environment.



\begin{frame}{Annotated animation}
      \begin{tikzonimage}[width=0.6\columnwidth]{example-image-a}[tsx/show help lines]
        \draw (0.5,0.5) [<-]-- (0.3,0.4) node [anchor=east] {centre};
      \begin{tikzonimage}[width=0.6\columnwidth]{example-image-b}[tsx/show help lines]
        \node [anchor=south west] at (0,0) {lower left};
      \begin{tikzonimage}[width=0.6\columnwidth]{example-image-c}[tsx/show help lines]
        \node [anchor=north east] at (1,1) {upper right};
    %  \begin{tikzonimage}[width=0.6\columnwidth]{pic-\i}[tsx/show help lines]
    %    ... 
    %  \end{tikzonimage}
    \caption{annotated animation}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.