texlive[44410] Master/texmf-dist: animate (18may17)

commits+karl at tug.org commits+karl at tug.org
Thu May 18 23:44:00 CEST 2017


Revision: 44410
          http://tug.org/svn/texlive?view=revision&revision=44410
Author:   karl
Date:     2017-05-18 23:43:59 +0200 (Thu, 18 May 2017)
Log Message:
-----------
animate (18may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
    trunk/Master/texmf-dist/doc/latex/animate/README
    trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
    trunk/Master/texmf-dist/source/latex/animate/animate.tex
    trunk/Master/texmf-dist/tex/latex/animate/animate.sty

Modified: trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-05-18 21:42:40 UTC (rev 44409)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2017-05-18 21:43:59 UTC (rev 44410)
@@ -1,3 +1,6 @@
+2017-05-18
+	* new: configurable animation controls
+
 2017-03-23
 	* fix: pdfbase.sty related adjustments
 

Modified: trunk/Master/texmf-dist/doc/latex/animate/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README	2017-05-18 21:42:40 UTC (rev 44409)
+++ trunk/Master/texmf-dist/doc/latex/animate/README	2017-05-18 21:43:59 UTC (rev 44410)
@@ -1,107 +1,113 @@
-                             =====================
-                              The animate Package
-                             =====================
+===================================
+ The animate Package
 
-Author:
+ https://github.com/agrahn/animate
 
-    Alexander Grahn
+ (C) 2007--\today Alexander Grahn
+===================================
 
 
-Description:
+1. Description
+==============
 
-    This package provides an interface to create portable, JavaScript driven PDF
-    animations from sets of (vector) graphics or rasterized image files or from
-    inline (vector) graphics, such as LaTeX-picture, PSTricks or pgf/TikZ
-    generated pictures, or just from typeset text.
+This package provides an interface to create portable, JavaScript driven PDF
+animations from sets of (vector) graphics or rasterized image files or from
+inline (vector) graphics, such as LaTeX-picture, PSTricks or pgf/TikZ
+generated pictures, or just from typeset text.
 
-    It supports the usual PDF making workflows, i. e.  pdfLaTeX, LaTeX -> dvips
-    -> ps2pdf (Ghostscript)/Distiller and (Xe)LaTeX -> (x)dvipdfmx, LuaLaTeX.
+It supports the usual PDF making workflows, i. e.  pdfLaTeX, LaTeX -> dvips
+-> ps2pdf (Ghostscript)/Distiller and (Xe)LaTeX -> (x)dvipdfmx, LuaLaTeX.
 
-    The resulting PDF with animations can be viewed in Acrobat Reader (except on
-    mobile devices), in PDF-XChange and in Foxit Reader.
+The resulting PDF with animations can be viewed in Acrobat Reader (except on
+mobile devices), in PDF-XChange and in Foxit Reader.
 
-    Note, this file only gives a summary of usage and available package and
-    command options. Please refer to the documentation `animate.pdf' for details
-    and examples.
+Note, this file only gives a summary of usage and available package and
+command options. Please refer to the documentation `animate.pdf' for details
+and examples.
 
-    Keywords: include portable PDF animated PDF animation animating
-    embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ MetaPost
-    LaTeX-picture inline graphics vector graphics animated GIF LaTeX
-    dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange
-    Foxit Reader
+ * Keywords: include portable PDF animated PDF animation animating
+             embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ MetaPost
+             LaTeX-picture inline graphics vector graphics animated GIF LaTeX
+             dvips ps2pdf dvipdfmx XeLaTeX JavaScript Acrobat Reader PDF-XChange
+             Foxit Reader
 
 
-Usage:
+2. Usage
+========
 
-    \usepackage[<package options>]{animate}
+\usepackage[<package options>]{animate}
 
-    * Package options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
-                       keepaspectratio, scale=<factor>, nomouse,
-                       autopause, autoplay, autoresume, controls, final, draft,
-                       buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
-                       loop, palindrome, step,
-                       poster[=first | <num> | last | none],
-                       method=icon | widget | ocg, dvipdfmx, xetex,
-                       type=[<file ext>]
+ * Package options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
+                    keepaspectratio, scale=<factor>, nomouse,
+                    autopause, autoplay, autoresume, controls[=all | none | ...],
+                    final, draft,
+                    buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
+                    loop, palindrome, step,
+                    poster[=first | <num> | last | none],
+                    method=icon | widget | ocg, dvipdfmx, xetex,
+                    type=[<file ext>]
 
 
-    \animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}
+\animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}
 
-    \begin{animateinline}[<options>]{<frame rate>}
-        ... typeset material ...
-    \newframe[<frame rate>]
-        ... typeset material ...
-    \newframe*[<frame rate>]
-        ... typeset material ...
-    \newframe
-    \multiframe{<number of frames>}{[<variables>]}{
-        ... repeated (parameterized) material ...
-    }
-    \end{animateinline}
+\begin{animateinline}[<options>]{<frame rate>}
+    ... typeset material ...
+\newframe[<frame rate>]
+    ... typeset material ...
+\newframe*[<frame rate>]
+    ... typeset material ...
+\newframe
+\multiframe{<number of frames>}{[<variables>]}{
+    ... repeated (parameterized) material ...
+}
+\end{animateinline}
 
-    * Command options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
-                       keepaspectratio, scale=<factor>, nomouse,
-                       autopause, autoplay, autoresume, final,
-                       draft, controls, buttonsize=<size>, buttonbg=<colour>,
-                       buttonfg=<colour>, loop, palindrome, step, measure,
-                       poster[=first | <num> | last | none],
-                       begin={<begin text>}, end={<end text>},
-                       timeline=<timeline file>,
-                       method=icon | widget | ocg,
-                       every=<number>, bb=<llx> <lly> <urx> <ury>,
-                       viewport=<llx> <lly> <urx> <ury>,
-                       trim=<left> <bottom> <right> <top>,
-                       label=<label text>, type=[<file ext>]
+ * Command options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
+                    keepaspectratio, scale=<factor>, nomouse,
+                    autopause, autoplay, autoresume, final, draft,
+                    controls[=all | none | ...],
+                    buttonsize=<size>, buttonbg=<colour>, buttonfg=<colour>,
+                    loop, palindrome, step, measure,
+                    poster[=first | <num> | last | none],
+                    begin={<begin text>}, end={<end text>},
+                    timeline=<timeline file>,
+                    method=icon | widget | ocg,
+                    every=<number>, bb=<llx> <lly> <urx> <ury>,
+                    viewport=<llx> <lly> <urx> <ury>,
+                    trim=<left> <bottom> <right> <top>,
+                    label=<label text>, type=[<file ext>]
 
 
-Requirements:
+3. Requirements
+===============
 
-    e-TeX
-    pdfTeX, version >= 1.20, or LuaLaTeX, version >= 0.95
-    Ghostscript, version >= 9.15 or Adobe Distiller
-    dvipdfmx, version >= 20080607
-    Acrobat Reader (version >= 7), PDF-XChange, Foxit Reader
+ * e-TeX
+ * pdfTeX, version >= 1.20, or LuaLaTeX, version >= 0.95
+ * Ghostscript, version >= 9.15 or Adobe Distiller
+ * dvipdfmx, version >= 20080607
+ * Acrobat Reader (version >= 7), PDF-XChange, Foxit Reader
 
 
-Installation:
+4. Installation
+===============
 
-    Unzip the file `animate.tds.zip' into the local TDS root directory which can
-    be found by running
+Unzip the file `animate.tds.zip' into the local TDS root directory which can
+be found by running
 
-      kpsewhich -var-value TEXMFLOCAL
+  kpsewhich -var-value TEXMFLOCAL
 
-    on the command line.
+on the command line.
 
-    After installation, update the filename database by running `texhash' on the
-    command line.
+After installation, update the filename database by running `texhash' on the
+command line.
 
-    TeXLive and MiKTeX users should run the package manager for installation.
+TeXLive and MiKTeX users should run the package manager for installation.
 
 
-License:
+                         * * *
 
-    This material is subject to the LaTeX Project Public License. See
+This material is subject to the LaTeX Project Public License. See
 
-      http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
+  http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html
 
-    for the details of that license.
+for the details of that license.

Modified: trunk/Master/texmf-dist/doc/latex/animate/animate.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/animate/animate.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/animate/animate.tex	2017-05-18 21:42:40 UTC (rev 44409)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2017-05-18 21:43:59 UTC (rev 44410)
@@ -9,11 +9,11 @@
 %
 \documentclass[a4paper]{article}
 \frenchspacing
+\usepackage[buttonbg=0.9]{animate}
 \usepackage[UKenglish]{babel}
 \usepackage{pst-3dplot}
 \usepackage{pst-node,pst-plot,pst-tools,pst-text,pst-ode}
 \usepackage{media9}
-\usepackage[buttonbg=0.9]{animate}
 \usepackage{intcalc}
 \usepackage{graphicx}
 \graphicspath{{files/}}
@@ -32,6 +32,7 @@
 \usepackage{tabls}
 \usepackage{multirow}
 \usepackage[bookmarksnumbered,linktocpage]{hyperref}
+\usepackage[ocgcolorlinks]{ocgx2}
 \usepackage{breakurl}
 \usepackage{amsmath}
 \usepackage{fancyvrb}
@@ -64,13 +65,7 @@
   pdfsubject={Documentation},
   pdfauthor={Alexander Grahn},
   pdfkeywords={\keywords},
-  citebordercolor={0 0 1},
-  filebordercolor={0 0 1},
-  linkbordercolor={0 0 1},
-  menubordercolor={0 0 1},
-  pagebordercolor={0 0 1},
-  urlbordercolor={0 0 1},
-%  pdfpagelayout=SinglePage
+  allcolors=blue
 }
 
 %\usepackage[scaled=0.85]{luximono}
@@ -94,7 +89,7 @@
 \def\@anim at sanitizeColon{}\def\@anim at sanitizeJS{}\def\@anim at endsanitize{}
 \expandafter\parsedate\@anim at version\relax %set current date to package date
 \makeatother
-\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{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 Acrobat Reader browser plugin.}\\[1ex]\includegraphics[height=2.7ex]{mailto}}
+\author{Alexander Grahn \animategraphics[autoplay,loop,height=1.8ex,nomouse]{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 Acrobat Reader browser plugin.}\\[1ex]\includegraphics[height=2.7ex]{mailto}\\[1ex]\url{https://github.com/agrahn/animate}}
 \maketitle
 \endgroup
 \begin{abstract}
@@ -139,7 +134,7 @@
 \begin{verbatim}
 \usepackage[<package options>]{animate}
 \end{verbatim}
-to the preamble of your document, i.\,e. somewhere between \verb+\documentclass+ and \verb+\begin{document}+.
+to the preamble of the document source, i.\,e. somewhere between \verb+\documentclass+ and \verb+\begin{document}+.
 
 `animate' honours the package options:
 \begin{verbatim}
@@ -152,7 +147,8 @@
 palindrome
 draft
 final
-controls
+controls[=(all|true|on) |
+          (none|false|off) | {[play][,step][,stop][,speed]}]
 width=<h-size>
 height=<v-size> | totalheight=<v-size>
 keepaspectratio
@@ -174,7 +170,7 @@
 
 Usually, a second \LaTeX{} run is necessary to resolve internally created object references. A warning message will be issued if appropriate.
 
-\clearpage
+%\clearpage
 \section{The user interface}
 Package `animate' provides the command
 \begin{verbatim}
@@ -296,9 +292,10 @@
 \end{verbatim}
 (\verb+\animategraphics+ only.) Crops graphics at the edges. The four lengths specify the amount to be removed from or, if negative values have been provided, to be added to each side of the graphics.
 \begin{verbatim}
-controls
+controls[=all | true | on]
+controls=(none | false | off) | {[play][,step][,stop][,speed]}
 \end{verbatim}
-Inserts control buttons below the animation widget. The meaning of the buttons is as follows, from left to right: stop \& first frame, step backward, play backward, play forward, step forward, stop \& last frame, decrease speed, default speed, increase speed. Both `play' buttons are replaced by a large `pause' button while the animation is playing.
+Inserts control buttons below the animation widget. Visibility of buttons can be fine-tuned through optional keys. By default, if setting `\verb+controls+' alone, all available buttons are shown, while any of `\verb+none+', `\verb+false+' or `\verb+off+' suppresses them altogether. A comma-separated selection from `\verb+play+', `\verb+step+', `\verb+stop+' and `\verb+speed+' enables corresponding pairs or groups of buttons. Such a comma list must be enclosed in braces, i.\,e. \verb+controls={..., ..., ...}+. If all buttons are shown, their meaning is as follows, from left to right: stop \& first frame, step backwards, play backwards, play forwards, step forwards, stop \& last frame, decrease speed, default speed, increase speed. Both `play' buttons are replaced by a large `pause' button while the animation is playing.
 \begin{verbatim}
 buttonsize=<size>
 \end{verbatim}
@@ -433,7 +430,7 @@
 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 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+frameNum+' 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}
@@ -495,7 +492,7 @@
   ]{\fbox{Goto 6th frame}}
 \end{verbatim}
 
-\begin{table}[hbp]
+\begin{table}[p]%[hbp]
 \centering
 \caption{Animation object properties}\label{tab:props}
 \begin{tabularx}{\linewidth}[t]{lllX}\hline
@@ -510,7 +507,7 @@
 \end{tabularx}
 \end{table}
 
-\begin{table}[htbp]
+\begin{table}[p]%[htbp]
 \centering
 \caption{Animation object methods}\label{tab:methods}
 \begin{tabularx}{\linewidth}[t]{lX}\hline
@@ -524,7 +521,7 @@
 \end{tabularx}
 \end{table}
 
-%\clearpage
+\clearpage
 \section{Examples}
 \subsection{Animations from sets of files, using {\tt\textbackslash animategraphics}}\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.
@@ -1329,7 +1326,7 @@
 I would like to thank François Lafont who discovered quite a few bugs and made many suggestions that helped to improve the functionality of the package. Many thanks to Jin-Hwan Cho, the developer of `\verb+dvipdfmx+', for contributing the `\verb+dvipdfmx+' specific code, and to Walter Scott for proof-reading the documentation.
 
 \begin{thebibliography}{8}
-\bibitem{chupin} Chupin, M.: \emph{Syracuse MetaPost/Animations.} URL: \url{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}
+  \bibitem{chupin} Chupin, M.: \emph{Syracuse MetaPost/Animations.} URL: \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\url{http://melusine.eu.org/syracuse/}} \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\url{metapost/animations/chupin/?idsec=scara}}
 \bibitem{gilg05} Gilg, J.: PDF-Animationen. In: \emph{Die \TeX nische Kom\"odie}, Issue 4, 2005, pp.~30--37
 %\bibitem{hol} Holeček, J.: \emph{Animations in a pdf\TeX-generated PDF}. URL: \url{http://www.fi.muni.cz/~xholecek/tex/pdfanim.xhtml}
 \bibitem{hol} Holeček, J.; Sojka, P.: Animations in pdf\TeX-generated PDF. In: \emph{\TeX, XML, and Digital Typography}, Springer, 2004, pp.~179--191. doi:10.1007/978-3-540-27773-6\textunderscore14

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-05-18 21:42:40 UTC (rev 44409)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2017-05-18 21:43:59 UTC (rev 44410)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2017/03/23}
+\def\@anim at version{2017/05/18}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF animations from files and inline graphics]
 
@@ -27,7 +27,7 @@
   }
 \fi
 
-\RequirePackage{keyval}
+\RequirePackage{xkeyval}
 \RequirePackage{ifthen}
 \RequirePackage{ifpdf}
 \RequirePackage{ifluatex}
@@ -43,16 +43,16 @@
 \ifpdf\else
   \setboolean{@anim at dvips}{true}% default dvi mode
   \setboolean{@anim at dvipdfmx}{false}
-  \DeclareOption{dvips}{%
+  \DeclareOptionX{dvips}{%
     \setboolean{@anim at dvips}{true}
     \setboolean{@anim at dvipdfmx}{false}
   }
-  \DeclareOption{dvipdfmx}{%
+  \DeclareOptionX{dvipdfmx}{%
     \setboolean{@anim at dvipdfmx}{true}
     \setboolean{@anim at dvips}{false}
     \PassOptionsToPackage{dvipdfmx}{pdfbase}
   }
-  \DeclareOption{xetex}{%
+  \DeclareOptionX{xetex}{%
     \setboolean{@anim at dvipdfmx}{true}
     \setboolean{@anim at dvips}{false}
     \PassOptionsToPackage{xetex}{pdfbase}
@@ -66,7 +66,7 @@
   \setboolean{@anim at dvips}{false}
 \fi
 
-\DeclareOption*{}\ProcessOptions*\relax %allow anything as an option
+\DeclareOptionX*{}\ProcessOptionsX*\relax %allow anything as an option
 %(remaining package options will be processed near end of this file)
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1127,21 +1127,30 @@
     }}%
     \if at anim@controls%
       \setlength{\@anim at tmpdima}{\@anim at btnsize}%
+      \setlength{\@anim at tmpdimb}{\z@}%
       \vskip 0.1\@anim at tmpdima%
       \hbox to \@anim at animwidth {%
         \hss%
-        \frame{%
-          \setlength{\@anim at tmpdimb}{2\@anim at tmpdima}%
-          \rule{0pt}{\@anim at tmpdima}\hskip\@anim at tmpdimb\hskip\@anim at tmpdimb%
-          \if at anim@step\else\hskip\@anim at tmpdimb\fi%
-        }%
-        \if at anim@step\else%
-          \hskip 0.3\@anim at tmpdima%
-          \frame{%
-            \setlength{\@anim at tmpdimb}{3\@anim at tmpdima}%
-            \rule{0pt}{\@anim at tmpdima}\hskip\@anim at tmpdimb%
-          }%
+        \setboolean{@anim at controls@firstgrp}{false}%
+        \if at anim@controls at stop%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \addtolength{\@anim at tmpdimb}{2\@anim at tmpdima}%
         \fi%
+        \if at anim@controls at step%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \addtolength{\@anim at tmpdimb}{2\@anim at tmpdima}%
+        \fi%
+        \if at anim@controls at play%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \addtolength{\@anim at tmpdimb}{2\@anim at tmpdima}%
+        \fi%
+        \if at anim@controls at firstgrp%
+          \frame{\phantom{\rule{\@anim at tmpdimb}{\@anim at tmpdima}}}%
+        \fi%
+        \if at anim@controls at speed%
+          \if at anim@controls at firstgrp\hskip 0.3\@anim at tmpdima\fi%
+          \frame{\phantom{\rule{3\@anim at tmpdima}{\@anim at tmpdima}}}%
+        \fi%
         \hss%
       }%
     \fi%
@@ -1290,12 +1299,11 @@
     \fi%
   \fi%
   \@anim at reset% to default settings
-  \begingroup% make use of graphic[xs] search path
+  \begingroup%
   \@anim at beginLTR%
-  \ifcsname Ginput at path\endcsname%
+  \ifcsname Ginput at path\endcsname% make use of graphic[xs] search path
     \let\input at path\Ginput at path%
   \fi%
-  %
   \setkeys{anim at user}{#1}%
   \ifthenelse{\boolean{@anim at autoplay}\OR\boolean{@anim at autoresume}}{%
     \setboolean{@anim at autoplayorresume}{true}%
@@ -1303,10 +1311,17 @@
   \ifthenelse{\NOT\boolean{@anim at controls}\AND\boolean{@anim at step}}{%
     \setboolean{@anim at loop}{true}%
   }{}%
+  \if at anim@step%
+    %for stepping animations, ignore any `controls' settings except
+    \setboolean{@anim at controls@play}{false}%        `step' and `stop'
+    \setboolean{@anim at controls@speed}{false}%
+    \setboolean{@anim at controls}{false}%
+    \if at anim@controls at stop\setboolean{@anim at controls}{true}\fi%
+    \if at anim@controls at step\setboolean{@anim at controls}{true}\fi%
+  \fi%
   \def\@anim at base{#3}%
   \def\@anim at first{#4}%
   \def\@anim at last{#5}%
-  %
   \@anim at checkmultipage{\@anim at base}{\@anim at ftype}%test for multipage file
   \if at anim@multipage\else% cope with wrong user input
     \ifthenelse{\equal{#4}{}\OR\equal{#5}{}}{%
@@ -1404,6 +1419,7 @@
 \def\animategraphics{\@anim at sanitizeColon\@anim at animategraphics}
 
 %inserts animation and control button widgets
+\newboolean{@anim at controls@firstgrp}
 \def\@anim at insertwidgets#1#2{%#1:@anim at num, #2 existing btn colour combination
   \vtop{%
     \offinterlineskip%
@@ -1414,9 +1430,17 @@
       \hbox to \@anim at animwidth {%
         \hss%
         \def\@anim at tooltip{}%
-        \@anim at buttonwidget{#1}{EndLeft}{EndLeft:#2}%
-        \@anim at buttonwidget{#1}{StepLeft}{StepLeft:#2}%
-        \if at anim@step\else%
+        \setboolean{@anim at controls@firstgrp}{false}%
+        \if at anim@controls at stop%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \@anim at buttonwidget{#1}{EndLeft}{EndLeft:#2}%
+        \fi%
+        \if at anim@controls at step%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \@anim at buttonwidget{#1}{StepLeft}{StepLeft:#2}%
+        \fi%
+        \if at anim@controls at play%
+          \setboolean{@anim at controls@firstgrp}{true}%
           \@anim at buttonwidget{#1}{PauseLeft}{PauseLeft:#2}%
           \@anim at buttonwidget{#1}{PlayLeft}{PlayLeft:#2}%
           \@anim at buttonwidget{#1}{PlayPauseLeft}{}%
@@ -1424,10 +1448,16 @@
           \@anim at buttonwidget{#1}{PlayRight}{PlayRight:#2}%
           \@anim at buttonwidget{#1}{PlayPauseRight}{}%
         \fi%
-        \@anim at buttonwidget{#1}{StepRight}{StepRight:#2}%
-        \@anim at buttonwidget{#1}{EndRight}{EndRight:#2}%
-        \if at anim@step\else%
-          \hskip 0.3\@anim at tmpdima%
+        \if at anim@controls at step%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \@anim at buttonwidget{#1}{StepRight}{StepRight:#2}%
+        \fi%
+        \if at anim@controls at stop%
+          \setboolean{@anim at controls@firstgrp}{true}%
+          \@anim at buttonwidget{#1}{EndRight}{EndRight:#2}%
+        \fi%
+        \if at anim@controls at speed%
+          \if at anim@controls at firstgrp\hskip 0.3\@anim at tmpdima\fi%
           \def\@anim at tooltip{/TU (slower)}%
           \@anim at buttonwidget{#1}{Minus}{Minus:#2}%
           \def\@anim at tooltip{/TU (default speed)}%
@@ -1666,8 +1696,7 @@
   \@anim at reset% to default settings
   \begingroup%
   \@anim at beginLTR%
-  % make use of graphic[xs] search path
-  \ifcsname Ginput at path\endcsname%
+  \ifcsname Ginput at path\endcsname% make use of graphic[xs] search path
     \let\input at path\Ginput at path%
   \fi%
   \setkeys{anim at user}{#1}%
@@ -1677,6 +1706,14 @@
   \ifthenelse{\NOT\boolean{@anim at controls}\AND\boolean{@anim at step}}{%
     \setboolean{@anim at loop}{true}%
   }{}%
+  \if at anim@step%
+    %for stepping animations, ignore any `controls' settings except
+    \setboolean{@anim at controls@play}{false}%        `step' and `stop'
+    \setboolean{@anim at controls@speed}{false}%
+    \setboolean{@anim at controls}{false}%
+    \if at anim@controls at stop\setboolean{@anim at controls}{true}\fi%
+    \if at anim@controls at step\setboolean{@anim at controls}{true}\fi%
+  \fi%
   \global\@anim at curframe@zb=\z@%
   \global\@anim at skipfram=\z@%
   \if at anim@draft\else%
@@ -2468,10 +2505,53 @@
     \fi%
   \fi%
 }
+
 \newboolean{@anim at controls}
-\define at key{anim at user}{controls}[true]{%
-  \setboolean{@anim at controls}{#1}%
+\newboolean{@anim at controls@play}
+\newboolean{@anim at controls@step}
+\newboolean{@anim at controls@stop}
+\newboolean{@anim at controls@speed}
+\def\@anim at user@controls at all{%
+  \setboolean{@anim at controls}{true}%
+  \setboolean{@anim at controls@play}{true}%
+  \setboolean{@anim at controls@step}{true}%
+  \setboolean{@anim at controls@stop}{true}%
+  \setboolean{@anim at controls@speed}{true}%
 }
+\def\@anim at user@controls at none{%
+  \setboolean{@anim at controls}{false}%
+  \setboolean{@anim at controls@play}{false}%
+  \setboolean{@anim at controls@step}{false}%
+  \setboolean{@anim at controls@stop}{false}%
+  \setboolean{@anim at controls@speed}{false}%
+}
+\define at key{anim at user}{controls}[all]{%
+  \@anim at user@controls at none%
+  \setkeys{anim at user@controls}{#1}%
+}
+\define at key{anim at user@controls}{all}[]{\@anim at user@controls at all}
+\define at key{anim at user@controls}{true}[]{\@anim at user@controls at all}
+\define at key{anim at user@controls}{on}[]{\@anim at user@controls at all}
+\define at key{anim at user@controls}{none}[]{\@anim at user@controls at none}
+\define at key{anim at user@controls}{false}[]{\@anim at user@controls at none}
+\define at key{anim at user@controls}{off}[]{\@anim at user@controls at none}
+\define at key{anim at user@controls}{play}[]{%
+  \setboolean{@anim at controls}{true}%
+  \setboolean{@anim at controls@play}{true}%
+}
+\define at key{anim at user@controls}{step}[]{%
+  \setboolean{@anim at controls}{true}%
+  \setboolean{@anim at controls@step}{true}%
+}
+\define at key{anim at user@controls}{stop}[]{%
+  \setboolean{@anim at controls}{true}%
+  \setboolean{@anim at controls@stop}{true}%
+}
+\define at key{anim at user@controls}{speed}[]{%
+  \setboolean{@anim at controls}{true}%
+  \setboolean{@anim at controls@speed}{true}%
+}
+
 \newboolean{@anim at loop}
 \define at key{anim at user}{loop}[true]{%
   \setboolean{@anim at loop}{#1}%
@@ -2625,6 +2705,10 @@
   \xdef\@anim at btnsize{\@anim@@btnsize}%
   \xdef\@anim at poster{\@anim@@poster}%
   \global\let\if at anim@controls=\if at anim@@controls%
+  \global\let\if at anim@controls at play=\if at anim@@controls at play%
+  \global\let\if at anim@controls at step=\if at anim@@controls at step%
+  \global\let\if at anim@controls at stop=\if at anim@@controls at stop%
+  \global\let\if at anim@controls at speed=\if at anim@@controls at speed%
   \global\let\if at anim@loop=\if at anim@@loop%
   \global\let\if at anim@autoplay=\if at anim@@autoplay%
   \global\let\if at anim@autoresume=\if at anim@@autoresume%
@@ -2786,11 +2870,53 @@
 \define at key{anim at pkg}{buttonsize}{%
   \gdef\@anim@@btnsize{#1}%
 }
+
 \newboolean{@anim@@controls}
-\setboolean{@anim@@controls}{false}%
-\define at key{anim at pkg}{controls}[true]{%
-  \setboolean{@anim@@controls}{#1}%
+\newboolean{@anim@@controls at play}
+\newboolean{@anim@@controls at step}
+\newboolean{@anim@@controls at stop}
+\newboolean{@anim@@controls at speed}
+\def\@anim at pkg@controls at all{%
+  \setboolean{@anim@@controls}{true}%
+  \setboolean{@anim@@controls at play}{true}%
+  \setboolean{@anim@@controls at step}{true}%
+  \setboolean{@anim@@controls at stop}{true}%
+  \setboolean{@anim@@controls at speed}{true}%
 }
+\def\@anim at pkg@controls at none{%
+  \setboolean{@anim@@controls}{false}%
+  \setboolean{@anim@@controls at play}{false}%
+  \setboolean{@anim@@controls at step}{false}%
+  \setboolean{@anim@@controls at stop}{false}%
+  \setboolean{@anim@@controls at speed}{false}%
+}
+\define at key{anim at pkg}{controls}[all]{%
+  \@anim at pkg@controls at none%
+  \setkeys{anim at pkg@controls}{#1}%
+}
+\define at key{anim at pkg@controls}{all}[]{\@anim at pkg@controls at all}
+\define at key{anim at pkg@controls}{true}[]{\@anim at pkg@controls at all}
+\define at key{anim at pkg@controls}{on}[]{\@anim at pkg@controls at all}
+\define at key{anim at pkg@controls}{none}[]{\@anim at pkg@controls at none}
+\define at key{anim at pkg@controls}{false}[]{\@anim at pkg@controls at none}
+\define at key{anim at pkg@controls}{off}[]{\@anim at pkg@controls at none}
+\define at key{anim at pkg@controls}{play}[]{%
+  \setboolean{@anim@@controls}{true}%
+  \setboolean{@anim@@controls at play}{true}%
+}
+\define at key{anim at pkg@controls}{step}[]{%
+  \setboolean{@anim@@controls}{true}%
+  \setboolean{@anim@@controls at step}{true}%
+}
+\define at key{anim at pkg@controls}{stop}[]{%
+  \setboolean{@anim@@controls}{true}%
+  \setboolean{@anim@@controls at stop}{true}%
+}
+\define at key{anim at pkg@controls}{speed}[]{%
+  \setboolean{@anim@@controls}{true}%
+  \setboolean{@anim@@controls at speed}{true}%
+}
+
 \newboolean{@anim@@loop}
 \setboolean{@anim@@loop}{false}%
 \define at key{anim at pkg}{loop}[true]{%
@@ -2952,12 +3078,12 @@
         }%
       }%
     \fi%
-    \if at anim@controls\if at anim@step\else
+    \if at anim@controls at play
       var a#1_btnPauseLeft=this.getField('#1.PauseLeft');%
       var a#1_btnPlayLeft=this.getField('#1.PlayLeft');%
       var a#1_btnPauseRight=this.getField('#1.PauseRight');%
       var a#1_btnPlayRight=this.getField('#1.PlayRight');%
-    \fi\fi%
+    \fi%
     %playing state and direction
     \if at anim@step%
       \if at anim@palindrome var a#1_playsRight=true;\fi%
@@ -3035,8 +3161,8 @@
             a#1_setFps(a#1_nFpsAt[f]);%
           }%
         \fi%
+        \if at anim@meas a#1_frcnt++;\fi%
       \fi%
-      \if at anim@step\else\if at anim@meas a#1_frcnt++;\fi\fi%
       return 0;%
     };%
     var a#1_stopFirst=function(){%
@@ -3129,7 +3255,7 @@
         try{app.clearInterval(a#1_int);}catch(e){}%
         a#1_playing=false;%
         a#1_isPaused=!stop;%
-        \if at anim@controls
+        \if at anim@controls at play
           a#1_btnPauseLeft.display=display.hidden;%
           a#1_btnPlayLeft.display=display.visible;%
           a#1_btnPauseRight.display=display.hidden;%
@@ -3146,7 +3272,7 @@
         a#1_playsRight=true;%
         a#1_playing=true;%
         a#1_isPaused=false;%
-        \if at anim@controls
+        \if at anim@controls at play
           a#1_btnPauseLeft.display=display.visible;%
           a#1_btnPlayLeft.display=display.hidden;%
           a#1_btnPauseRight.display=display.visible;%
@@ -3163,7 +3289,7 @@
         a#1_playsRight=false;%
         a#1_playing=true;%
         a#1_isPaused=false;%
-        \if at anim@controls
+        \if at anim@controls at play
           a#1_btnPauseLeft.display=display.visible;%
           a#1_btnPlayLeft.display=display.hidden;%
           a#1_btnPauseRight.display=display.visible;%
@@ -3171,7 +3297,7 @@
           this.dirty=false;%
         \fi%
       };%
-      \if at anim@controls
+      \if at anim@controls at speed
         var a#1_fpsIncr=function(){% speed up animation
           a#1_sm*=1.1;%
           a#1_setFps(a#1_fps);%



More information about the tex-live-commits mailing list