[Tex/LaTex] How to set a pausing point within an animation

animatepause

I am currently working on an animation for a presentation. The animation is generated by LaTeX using the package "animate". It consists of 402 pdf-files. Now what i want is to insert a Pausing point within the animation, lets say i want the animation to play till frame 202 and pause there, so that you have to click on the "play"-Button again for the animation to proceed. An MWE is included here.

I know this is most likely a fairly easy problem, but i'm still a beginner regarding LaTeX.

Thanks in advance.

\documentclass{beamer}
\usepackage{animate}
\usepackage{graphics}

\begin{document}

  \begin{center}
     \animategraphics[controls, trim=0cm 3cm 0cm 3cm, width=.6 \textwidth]{20}{Bild/forward}{1}{402}
  \end{center}

\end{document}

Best Answer

With \animategraphics, a timeline file can be used, as suggested in this comment.

It would look like

::0
::1
...
*::201 %frame from file forward202.pdf; pause here
::202
...
::401 %frame from file forward402.pdf

The timeline file could be generated using a spreadsheet application or by in-line code in the tex source:

\documentclass{beamer}
\usepackage{animate}
\usepackage{graphics}

\usepackage{multido}
%write timeline file
\newwrite\OutFile%
\immediate\openout\OutFile=timeline.txt%
\multido{\iFrame=0+1}{201}{%
  \immediate\write\OutFile{::\iFrame}%
}%
\immediate\write\OutFile{*::201}%
\multido{\iFrame=202+1}{200}{%
  \immediate\write\OutFile{::\iFrame}%
}%
\immediate\closeout\OutFile%

\begin{document}

  \begin{center}
     \animategraphics[
       controls,
       trim=0cm 3cm 0cm 3cm,
       width=.6\textwidth,
       timeline=timeline.txt
     ]{20}{Bild/forward}{1}{402}
  \end{center}

\end{document}
Related Question