summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-02-07 23:23:32 +0000
committerKarl Berry <karl@freefriends.org>2014-02-07 23:23:32 +0000
commite768bd4467a0c031caef65ceb6ca960a4ee11208 (patch)
tree76e382ccbfa040dd12cba3f8143ab79853a63729 /Master/texmf-dist/doc
parent187f01497820820a6075023f1825aacdac0e86cc (diff)
animate (7feb14)
git-svn-id: svn://tug.org/texlive/trunk@32909 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/animate/ChangeLog8
-rw-r--r--Master/texmf-dist/doc/latex/animate/animate.pdfbin3648946 -> 3676476 bytes
-rw-r--r--Master/texmf-dist/doc/latex/animate/animate.tex131
-rw-r--r--Master/texmf-dist/doc/latex/animate/files/exp.mp10
-rw-r--r--Master/texmf-dist/doc/latex/animate/files/scarab.mp4
5 files changed, 135 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/animate/ChangeLog b/Master/texmf-dist/doc/latex/animate/ChangeLog
index c95abc40a49..0d11ad656ad 100644
--- a/Master/texmf-dist/doc/latex/animate/ChangeLog
+++ b/Master/texmf-dist/doc/latex/animate/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-06
+ * New: JavaScript API for animation control
+ * Fix: broken PDF-XChange Viewer support due to [2013-07-19] changes
+
2013-09-24
* Fix: Adobe Reader prompting for "save changes" for documents without
animations
@@ -27,7 +31,7 @@
* minor, non-vital fix
2012-05-11
- * new: optional fourth field in timeline files for calling JavaScript;
+ * New: optional fourth field in timeline files for calling JavaScript;
ticking PSTricks metronome example by Manuel Luque added to docs
2011-12-21
@@ -103,7 +107,7 @@
* New: the transparency stack can now be cleared using `c' in the
timeline file
* improved documentation of the timeline option
- * new animateinline example (Lorenz Attractor)
+ * New animateinline example (Lorenz Attractor)
* Fix: animfp.sty: trailing zeros are now removed from the fractional part
of the result of the addition of two reals
diff --git a/Master/texmf-dist/doc/latex/animate/animate.pdf b/Master/texmf-dist/doc/latex/animate/animate.pdf
index 5d64badb9c2..6b2c3894fa1 100644
--- a/Master/texmf-dist/doc/latex/animate/animate.pdf
+++ b/Master/texmf-dist/doc/latex/animate/animate.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/animate/animate.tex b/Master/texmf-dist/doc/latex/animate/animate.tex
index b2b7179d9df..dc05de8ca28 100644
--- a/Master/texmf-dist/doc/latex/animate/animate.tex
+++ b/Master/texmf-dist/doc/latex/animate/animate.tex
@@ -29,6 +29,7 @@
\usepackage{breakurl}
\usepackage{amsmath}
\usepackage{fancyvrb}
+\usepackage{tabularx}
\usepackage[all]{hypcap}
\clubpenalty=10000
\widowpenalty=10000
@@ -47,11 +48,11 @@
\ifpdf
\makeatletter
- \@latex@error{This document contains PSTricks code.\MessageBreak Please compile it using the following commands:\MessageBreak\MessageBreak latex, dvips, ps2pdf\MessageBreak\MessageBreak Don't use option `-Ppdf` with dvips}
+ \@latex@error{This document contains PSTricks code.\MessageBreak Please compile it using the following commands:\MessageBreak\MessageBreak latex, dvips, ps2pdf -dNOSAFER\MessageBreak\MessageBreak Don't use option `-Ppdf` with dvips}
\makeatother
\fi
-\def\keywords{include portable PDF animation animated PDF animating embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Adobe Reader}
+\def\keywords{include portable PDF animation animated PDF animating embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf dvipdfmx XeLaTeX JavaScript Adobe Reader PDF-XChange Viewer}
\hypersetup{
pdftitle={The animate Package},
pdfsubject={Documentation},
@@ -75,6 +76,7 @@
\def\day{#3}
}
+\hyphenation{Ja-va-Script}
\begin{document}
\title{The {\sffamily animate} Package}
\begingroup
@@ -82,13 +84,13 @@
\def\@anim@sanitize{}\def\@anim@endsanitize{}
\expandafter\parsedate\@anim@version\relax %set current date to package date
\makeatother
-\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding. Animations may run slowly if viewed in the Adobe Reader browser plugin.}\\[1ex]\includegraphics[height=2.7ex]{mailto}}
+\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex]{8}{bye_}{0}{3}\protect\footnote{Animated GIF taken from \href{http://www.phpBB.com}{phpBB} forum software and burst into a set of EPS files using \href{http://www.imagemagick.org}{ImageMagick} before embedding.} \protect\footnote{Animations may run slowly if viewed in the Adobe Reader browser plugin.} \protect\footnote{In PDF-XChange, animations are rendered upside-down if the document was produced via the {\tt dvips}$\rightarrow${\tt ps2pdf} route.}\\[1ex]\includegraphics[height=2.7ex]{mailto}}
\maketitle
\endgroup
\begin{abstract}
\raggedright
-\noindent A LaTeX package for creating portable, JavaScript driven PDF animations from sets of vector graphics or rasterized image files or from inline graphics.
+\noindent A LaTeX package for creating portable, JavaScript driven PDF animations from sets of vector graphics or raster image files or from inline graphics.
\vskip 0.2\baselineskip
\emph{Keywords}: \keywords
@@ -102,7 +104,7 @@ This package provides an interface to create PDFs with animated content from set
Package `animate' supports the usual PDF making workflows, i.\,e. pdf\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+.
-The final PDF can be viewed in current Adobe Readers on all supported platforms.
+The final PDF can be viewed in current Adobe Readers on all supported platforms or in PDF-XChange Viewer.
%The `animate' package relies on Optional Content Groups (OCG), also known as PDF layers, which is a feature provided by the PDF-1.5 specification. Each frame of an animation is associated with an OCG that is hidden or made visible in a dynamic fashion by means of Adobe Reader's built-in JavaScript engine.
@@ -112,7 +114,7 @@ The final PDF can be viewed in current Adobe Readers on all supported platforms.
\item pdf\TeX{}, version $\ge1.20$ for direct PDF output
\item Ghostscript, version $\ge8.31$ or Adobe Distiller for PS to PDF conversion
\item dvipdfmx, version $\ge20080607$ for DVI to PDF conversion
-\item Adobe Reader, version $\ge7$
+\item Adobe Reader, version $\ge7$ or PDF-XChange Viewer
\end{trivlist}
\section{Installation}
@@ -150,7 +152,7 @@ poster[=first | none | last]
\end{verbatim}
Except for `\verb+dvipdfmx+' and `\verb+xetex+', the options above are also available (among others) as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all animations in the document. In turn, command options locally override global settings. Options without an argument are boolean options and can be negated, with the exception of package-only options `\verb+dvipdfmx+' and `\verb+xetex+', by appending `\verb+=false+'.
-If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, the `graphicx' package is required. \begin{animateinline}[autoplay,loop]{1.5}\strut\emph{Important:}\newframe\newframe[5]\end{animateinline} The \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
+If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, the `graphicx' package is required. \begin{animateinline}[autoplay,loop]{1}\strut\emph{Important:}\newframe[3]\end{animateinline} The \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
Sometimes, if the same animation sequence made from graphics files is to be embedded multiple times into the document, more compact PDF output may be obtained by passing option `\verb+-dMaxInlineImageSize=0+' to \verb+ps2pdf+.
@@ -195,7 +197,7 @@ All files of the sequence should exist and be consecutively numbered. (Exception
Command \verb+\graphicspath{}+ from the `graphicx' package can be used to specify directories to be browsed for graphics files.
-No file name extension may be specified as a parameter. The possible file formats depend on the output driver being used. In the case of \LaTeX{}+\verb+dvips+, files with the `eps' extension are at first searched for, followed by `mps' (\MP-generated Postscript) and `ps'. With pdf\LaTeX{} the searching order is: (1)~`pdf', (2)~`mps', (3)~`png', (4)~`jpg', (5)~`jpeg', (6)~`jbig2', (7)~`jb2', (8)~`jp2'\footnotemark[1], (9)~`j2k'\footnotemark[1], (10)~`jpx'\footnotemark[1]\footnotetext[1]{JPEG2000 is not yet supported by pdf\TeX.} and with \XeLaTeX{} or \LaTeX{}+\verb+dvipdfmx+: (1)~`pdf', (2)~`mps', (3)~`eps', (4)~`ps', (5)~`png', (6)~`jpg', (7)~`jpeg', (8)~`bmp'. That is, files capable of storing vector graphics are found first. Make sure that all file names have \emph{lower case} extensions.
+No file name extension may be specified as a parameter. The possible file formats depend on the output driver being used. In the case of \LaTeX{}+\verb+dvips+, files with the `eps' extension are at first searched for, followed by `mps' (\MP-generated Postscript) and `ps'. With pdf\LaTeX{} the searching order is: (1)~`pdf', (2)~`mps', (3)~`png', (4)~`jpg', (5)~`jpeg', (6)~`jbig2', (7)~`jb2', (8)~`jp2'\footnotemark[1], (9)~`j2k'\footnotemark[1], (10)~`jpx'\footnotemark[1]\footnotetext[1]{Only Lua\LaTeX currently supports JPEG2000.} and with \XeLaTeX{} or \LaTeX{}+\verb+dvipdfmx+: (1)~`pdf', (2)~`mps', (3)~`eps', (4)~`ps', (5)~`png', (6)~`jpg', (7)~`jpeg', (8)~`bmp'. That is, files capable of storing vector graphics are found first. Make sure that all file names have \emph{lower case} extensions.
For example, given the sequence `frame\_5.png' through `frame\_50.png' from a possibly larger set that shall be used to build an animation running at 12 frames per second, the correct inclusion command would read
\begin{verbatim}
@@ -215,6 +217,10 @@ would create an animation from all pages of the file `frames.pdf', running at 12
The following options to \verb+\animategraphics+ and `\verb+animateinline+' have been provided:
\subsection{Basic options}
\begin{verbatim}
+label=<label text>
+\end{verbatim}
+The animation is given a label, \verb+<label text>+, which should be unique. Labelling an animation enables its JavaScript programming interface by defining \verb+anim['<label text>']+, which is a JavaScript reference to the animation object. The animation object provides a number of properties and methods that can be used for controlling the animation playback from within user defined JavaScript. For details, see Sect.~\ref{sect:api}.
+\begin{verbatim}
poster[=first | none | last]
\end{verbatim}
Specifies which frame (first, last or none) to display and print if the animation is not activated. The first frame is shown by default. Thus `\verb+poster+' or `\verb+poster=first+' need not be explicitly set.
@@ -312,6 +318,7 @@ A short note on the `\verb+tikzpicture+' environment: Unlike `\verb+pspicture+',
end={\end{tikzpicture}}
\end{verbatim}
+\clearpage
\subsection{The `{\tt timeline}' option}\label{sect:timeline}
\begin{verbatim}
timeline=<timeline file>
@@ -327,12 +334,10 @@ Each line of the timeline file that is not blank and which does not begin with a
\begin{verbatim}
[*]:[<frame rate>]:[<transparencies>][:<JavaScript>]
\end{verbatim}
-While any field may be left blank, the first two colons are mandatory.
+While any field may be left blank, the first two colons are mandatory. The \verb+<JavaScript>+ field is explained on p.~\pageref{sect:jsfield}.
An asterisk (`\verb+*+') in the leftmost field causes the animation to pause at that frame, very much as a \verb+\newframe*+ would do; a number in the second field changes the frame rate of the animation section that follows. In connection with the `\verb+timeline+' option, the asterisk extension and the optional \verb+<frame rate>+ argument of \verb+\newframe+ cease to make sense and will be tacitly ignored if present.
-The optional fourth field takes JavaScript code to be executed at that frame. This could could be used, for instance, to play a sound that was embedded using the media9 \LaTeX{} package \cite{media9}. The backslash `\verb+\+' and percent `\verb+%+' characters retain their special meaning from \LaTeX{} and must be escaped by a backslash `\verb+\+' in the JavaScript code. The same applies to unbalanced braces `\verb+{+' and `\verb+}+'. Thus, a code line such as `\verb+console.println('{}%}{\n');+' would have to look like `\verb+console.println('{}\%\}\{\\n');+' in the timeline file. The first pair of braces are balancing themselves and do not need be escaped.
-
The third field \verb+<transparencies>+ is a comma-separated \emph{list} of \emph{transparency specifications} that determines the transparencies to be put on the stack. Semicolons (\verb+;+) are used to separate sub-stacks (= layers) from each other. A \emph{single} transparency specification obeys the syntax
\begin{verbatim}
<transparency ID>[x<number of frames>]
@@ -401,6 +406,25 @@ frame No. & timeline file & transparency stack\\\hline\hline
See the second animation, Fig.~\ref{fig:scarab}, in Section~\ref{sect:examples} for a working example that makes use of the timeline and the layer concept.
+\myparagraph*{Associate JavaScript actions with animation frames}\label{sect:jsfield}
+The optional fourth field \verb+<JavaScript>+ in a frame specification takes JavaScript code to be executed upon display of that frame. This could be used, for instance, to play a sound that was embedded using the `media9' \LaTeX{} package \cite{media9} or to execute JavaScript methods of the animation object. A non-trivial example is looping over a sub-range of frames which can be programmed by setting the `\verb+pageNum+' property of the animation object. See Sect.~\ref{sect:api} for details of the animation programming interface.
+
+The backslash `\verb+\+' and percent `\verb+%+' characters retain their special meaning from \LaTeX{} and must be escaped by a backslash `\verb+\+' in the JavaScript code. The same applies to unbalanced braces `\verb+{+' and `\verb+}+'. Thus, a code line such as
+\begin{verbatim}
+ console.println('{}%}{\n');
+\end{verbatim}
+would have to look like
+\begin{verbatim}
+ console.println('{}\%\}\{\\n');
+\end{verbatim}
+in the timeline file. The first pair of braces are balancing themselves and do not need to be escaped.
+
+Note that JavaScript is executed at the start of displaying the frame. If something is to be executed at the end of a particular frame, the \verb+<JavaScript>+ field should be added to the next frame in the timeline file. However, this is not possible for the last frame in a timeline file. Here, the `\verb+setTimeOut+' method can be used to delay the execution of commands:
+\begin{verbatim}
+ app.setTimeOut('anim.myanim.frameNum=5;', 0.5*anim.myanim.dt)
+\end{verbatim}
+In this example, the 6th frame will be displayed after half of the current frame's lifetime has elapsed.
+
\myparagraph*{Other things to note}
When designing the timeline, care should be taken not to include a transparency more than once into the \emph{same} animation frame. Besides the useless redundancy, this may slow down the animation speed in the Reader because the graphical objects of a multiply included transparency have to be rendered unnecessarily often at the same time. `animate' is smart enough to detect multiple inclusion and issues a warning message along with the transparency ID and the frame number if it occurs. Here is an example of a poorly designed timeline:
\small
@@ -416,16 +440,76 @@ When designing the timeline, care should be taken not to include a transparency
\normalsize
Also, `animate' finds and warns about transparencies that have never been used in an animation timeline. This may help to avoid dead code in the final PDF.
+\section{Programming interface}\label{sect:api}
+The package provides a simple JavaScript programming interface which gives access to the animation objects in a PDF file. A particular animation property or method can be accessed by
+\begin{verbatim}
+ anim['<anim label>'].<property or method>
+\end{verbatim}
+or
+\begin{verbatim}
+ anim.<anim label>.<property or method>
+\end{verbatim}
+`\verb+anim+' is an array of animation object references. Animations must be labelled using the `\verb+label=...+' command option in order to be present in the `\verb+anim+' array. As usual, properties and methods are accessed via the dot notation. Properties and methods of the animation object are summarized in Tables \ref{tab:props} and \ref{tab:methods}.
+
+One potential use of the JavaScript interface could be within a timeline file associated with an animation. For example, loops over a sub-range of frames can be programmed by setting the `\verb+pageNum+' property. See Section~\ref{sect:timeline}, p.~\pageref{sect:jsfield} for details.
+
+Also, the programming interface can be used to create custom buttons for playback control. The command \verb+\mediabutton+ from the `media9' package provides a convenient way for achieving this:
+\begin{verbatim}
+ \usepackage{media9}
+ \usepackage{animate}
+ ...
+
+ \animategraphics[label=my_anim]{12}{...}{...}{...}
+
+ \mediabutton[
+ jsaction={anim['my_anim'].playFwd();}
+ ]{\fbox{Play}}
+ \mediabutton[
+ jsaction={anim['my_anim'].frameNum=5;}
+ ]{\fbox{Goto 6th frame}}
+\end{verbatim}
+
+\begin{table}[hbp]
+\centering
+\caption{Animation object properties}\label{tab:props}
+\begin{tabularx}{\linewidth}[t]{lllX}\hline
+name & type & access & description\\\hline\hline
+{\tt numFrames} & Integer & read-only & Holds the total number of animation frames.\\
+{\tt frameNum} & Integer & read+write & Gets or sets the current frame being/to\,be displayed. Note that the values are zero-based. Assigning values less than zero or greater than {\tt numFrames-1} results in an error.\\
+{\tt fps} & Number & read+write & Gets or sets the animation frame rate (frames per second). Assigning values less than zero results in an error.\\
+{\tt dt} & Number & read-only & Holds the time span (milliseconds) for display of the current frame.\\
+{\tt isPlaying} & Boolean & read-only & Holds the value {\tt true} if the animation is currently playing, {\tt false} otherwise.\\
+{\tt playsFwd} & Boolean & read-only & Holds the value {\tt true} if the animation is played forward, independently of whether the animation is currently paused or not.\\
+\hline
+\end{tabularx}
+\end{table}
+
+\begin{table}[hbp]
+\centering
+\caption{Animation object methods}\label{tab:methods}
+\begin{tabularx}{\linewidth}[t]{lX}\hline
+name & description\\\hline\hline
+{\tt playFwd()} & Starts playing the animation in the forward direction, setting the properties {\tt isPlaying} and {\tt playsFwd} to {\tt true}.\\
+{\tt playBwd()} & Starts playing the animation in the backward direction, setting {\tt isPlaying} to {\tt true} and {\tt playsFwd} to {\tt false}.\\
+{\tt pause()} & Pauses animation, setting {\tt isPlaying} to {\tt false}.\\
+{\tt stopFirst()} & Stops animation and rewinds to the first frame. {\tt isPlaying} is set to false.\\
+{\tt stopLast()} & Stops animation and goes to the last frame. {\tt isPlaying} is set to false.\\
+\hline
+\end{tabularx}
+\end{table}
+
+\clearpage
\section{Examples}
\subsection[Animations from sets of files, using `animategraphics' command]{Animations from sets of files, using {\tt \string\animategraphics} command}\label{sect:examples}
Animations in this section are made from graphics files that were prepared with \MP. Run `\verb+mpost --tex=latex+' on the files ending in `.mp' in the `files' directory to generate the graphics files. Both examples make use of the `\verb+timeline+' option to reduce the resulting PDF file size.
-The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~\cite{hol}, shows the exponential function $y=e^x$ and its approximation by Taylor polynomials of different degree.
+The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~\cite{hol}, shows the exponential function $y=e^x$ and its approximation by Taylor polynomials of different degree. Below the animation, a custom button was inserted using the JavaScript programming interface and the \verb+\mediabutton+ command from the `media9' package.
\small
\begin{verbatim}
\documentclass{article}
\usepackage{animate}
+\usepackage{media9}
\usepackage{graphicx}
\begin{filecontents}{timeline.txt}
@@ -444,9 +528,19 @@ The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~
\begin{center}
\animategraphics[
+ label=taylor,
controls, loop,
timeline=timeline.txt
]{4}{exp_}{0}{8}
+
+ \mediabutton[
+ jsaction={
+ if(anim['taylor'].isPlaying)
+ anim['taylor'].pause();
+ else
+ anim['taylor'].playFwd();
+ }
+ ]{\fbox{Play/Pause}}
\end{center}
\end{document}
@@ -465,7 +559,16 @@ The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~
::7
::8
\end{VerbatimOut}
-\animategraphics[controls,loop,timeline=timeline.txt]{4}{exp_}{0}{8}
+\animategraphics[label=taylor,controls,loop,timeline=timeline.txt]{4}{exp_}{0}{8}
+
+\mediabutton[
+ jsaction={
+ if(anim['taylor'].isPlaying)
+ anim['taylor'].pause();
+ else
+ anim['taylor'].playFwd();
+ }
+]{\fbox{Play/Pause}}
\caption{}\label{fig:taylor}
\end{figure}
@@ -765,7 +868,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
\end{verbatim}
\normalsize
-The last inline example in Fig.~\ref{fig:metronome} is a ticking metronome written by Manuel Luque~\cite{luque12}. The short clicking sound was embedded by means of the media9 package. Whenever the pendulum reaches one of its reversal points, playback of the sound file is started using JavaScript. The JavaScript code was inserted at the corresponding frame specifications in a timeline file. Since the PSTricks macros for drawing the metronome body and the pendulum are quite long they have been moved into an external file, \verb+files/pstmetronome.tex+. Note that the sound can be heard only on Win and Mac platforms. Even then, mileage may vary. A dual core CPU may be necessary for fluent playback.
+The last inline example in Fig.~\ref{fig:metronome} is a ticking metronome written by Manuel Luque~\cite{luque12}. The short clicking sound was embedded by means of the `media9' package. Whenever the pendulum reaches one of its reversal points, playback of the sound file is started using JavaScript. The JavaScript code was inserted at the corresponding frame specifications in a timeline file. Since the PSTricks macros for drawing the metronome body and the pendulum are quite long they have been moved into an external file, \verb+files/pstmetronome.tex+. Note that the sound can be heard only on Win and Mac platforms. Even then, mileage may vary. A dual core CPU may be necessary for fluent playback.
\begin{figure}[hb]
\centering
\begin{VerbatimOut}{files/pstmetronome.tex}
diff --git a/Master/texmf-dist/doc/latex/animate/files/exp.mp b/Master/texmf-dist/doc/latex/animate/files/exp.mp
index f719391fecf..064410ff502 100644
--- a/Master/texmf-dist/doc/latex/animate/files/exp.mp
+++ b/Master/texmf-dist/doc/latex/animate/files/exp.mp
@@ -1,7 +1,15 @@
% Jan Holecek, Alexander Grahn
-% 2008/01/03
+% 2013/10/15
filenametemplate "%j_%c.mps";
+verbatimtex
+\documentclass{article}
+\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+\usepackage{amsmath}
+\begin{document}
+etex
e := 2.718282;
N=8;
diff --git a/Master/texmf-dist/doc/latex/animate/files/scarab.mp b/Master/texmf-dist/doc/latex/animate/files/scarab.mp
index bef95226e24..7f4a53ee483 100644
--- a/Master/texmf-dist/doc/latex/animate/files/scarab.mp
+++ b/Master/texmf-dist/doc/latex/animate/files/scarab.mp
@@ -1,11 +1,13 @@
% Maxime Chupin, Alexander Grahn
-% 2008/01/03
+% 2013/10/15
filenametemplate "%j_%c.mps";
verbatimtex
\documentclass{article}
\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
etex