texlive[54874] Master/texmf-dist: animate (25apr20)
commits+karl at tug.org
commits+karl at tug.org
Sat Apr 25 22:47:38 CEST 2020
Revision: 54874
http://tug.org/svn/texlive?view=revision&revision=54874
Author: karl
Date: 2020-04-25 22:47:38 +0200 (Sat, 25 Apr 2020)
Log Message:
-----------
animate (25apr20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
trunk/Master/texmf-dist/doc/latex/animate/README.txt
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 2020-04-25 20:47:25 UTC (rev 54873)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog 2020-04-25 20:47:38 UTC (rev 54874)
@@ -1,3 +1,11 @@
+2020-04-25
+ * fix: compilation error in case of `dvisvgm' + [french]{babel}. For
+ slightly better performance, \animategraphics doesn't pass `clip' anymore
+ automatically to graphicx' \includegraphics; instead, the new `clip'
+ pkg/command option should be set if need be (mostly when using dvisvgm
+ together with trimming options). Interaction with animation on mobile
+ devices: single tap for play/pause
+
2020-03-25
* fix: using `controlsaligned' as package option
Modified: trunk/Master/texmf-dist/doc/latex/animate/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README.txt 2020-04-25 20:47:25 UTC (rev 54873)
+++ trunk/Master/texmf-dist/doc/latex/animate/README.txt 2020-04-25 20:47:38 UTC (rev 54874)
@@ -41,24 +41,29 @@
\usepackage[<package options>]{animate}
- * Package options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
- keepaspectratio, scale=<factor>, nomouse,
- hiresbb,pagebox,interpolate,
- autopause, autoplay, autoresume,
- controls[=all | none | ...],
- controlsaligned=left[+<indent>] | center | right[+<indent>],
- final, draft,
- buttonsize=<size>,
- buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
- loop, palindrome, step,
- poster[=first | <num> | last | none],
- alttext=none | {<alternative description>},
- method=icon | widget | ocg,
- dvipdfmx, dvisvgm, xetex,
- type=[<file ext>],
- export
+ * Package options:
+ width=<h-size>, height=<v-size>, totalheight=<v-size>,
+ keepaspectratio, scale=<factor>,
+ bb=<llx> <lly> <urx> <ury>,
+ viewport=<llx> <lly> <urx> <ury>,
+ trim=<left> <bottom> <right> <top>,
+ clip, hiresbb, pagebox=..., interpolate,
+ type=[<file ext>],
+ final, draft, nomouse,
+ autopause, autoplay, autoresume,
+ controls[=all | none | ...],
+ controlsaligned=left[+<indent>] | center | right[+<indent>],
+ buttonsize=<size>,
+ buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
+ loop, palindrome, step,
+ poster[=first | <num> | last | none],
+ alttext=none | {<alternative description>},
+ method=icon | widget | ocg,
+ dvipdfmx, dvisvgm, xetex,
+ export
+
\animategraphics[<options>]{<frame rate>}{<file basename>}{<first>}{<last>}
\begin{animateinline}[<options>]{<frame rate>}
@@ -73,25 +78,31 @@
}
\end{animateinline}
- * Command options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
- keepaspectratio, scale=<factor>, nomouse,
- hiresbb,pagebox,interpolate,
- autopause, autoplay, autoresume, final, draft,
- controls[=all | none | ...],
- buttonsize=<size>,
- buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
- loop, palindrome, step, measure,
- poster[=first | <num> | last | none],
- alttext=none | {<alternative description>},
- 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>,
+ bb=<llx> <lly> <urx> <ury>,
+ viewport=<llx> <lly> <urx> <ury>,
+ trim=<left> <bottom> <right> <top>,
+ clip, hiresbb, pagebox=..., interpolate,
+ type=[<file ext>],
+ final, draft, nomouse,
+ autopause, autoplay, autoresume,
+ controls[=all | none | ...],
+ controlsaligned=left[+<indent>] | center | right[+<indent>],
+ buttonsize=<size>,
+ buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,
+ loop, palindrome, step,
+ measure,
+ poster[=first | <num> | last | none],
+ alttext=none | {<alternative description>},
+ begin={<begin text>}, end={<end text>},
+ timeline=<timeline file>,
+ method=icon | widget | ocg,
+ every=<number>, label=<label text>
+
+
3. Requirements
===============
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 2020-04-25 20:47:25 UTC (rev 54873)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex 2020-04-25 20:47:38 UTC (rev 54874)
@@ -1,5 +1,3 @@
-\ifdefined\outputmode\outputmode=0\fi
-\ifdefined\pdfoutput\pdfoutput=0\fi
% Copyright 2007--\today Alexander Grahn
%
% This material is subject to the LaTeX Project Public License. See
@@ -6,6 +4,8 @@
% http://mirrors.ctan.org/macros/latex/base/lppl.txt
% for the details of that license.
%
+\ifdefined\outputmode\outputmode=0\fi
+\ifdefined\pdfoutput\pdfoutput=0\fi
\documentclass[a4paper]{article}
\frenchspacing
\usepackage[buttonbg=0.9]{animate}
@@ -112,14 +112,17 @@
\section{Introduction}
This package provides an interface for creating PDF and SVG files with animated content from sets of graphics or image files, from inline graphics, such as \LaTeX-picture, PSTricks or pgf/TikZ generated pictures, or just from typeset text. Unlike standard movie/video formats, package `animate' allows for animating vector graphics. The result is roughly similar to the SWF (Flash) format, although not as space-efficient.
-Package `animate' supports the usual workflows for making PDF, i.\,e. pdf\LaTeX{}, Lua\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+. For animated SVG, it supports the \verb+dvisvgm+ driver. The DVI/XDV used as input for \verb+dvisvgm+ can be generated with \LaTeX{}, Lua\LaTeX{} (in DVI mode) and \XeLaTeX.
+Package `animate' supports the usual workflows for making PDF, i.\,e. pdf\LaTeX{}, Lua\LaTeX{}, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+. For animated SVG, it supports the \verb+dvisvgm+ driver. The DVI/XDV used as input for \verb+dvisvgm+ can be generated with \LaTeX{}, Lua\LaTeX{} (in DVI mode with command `\verb+dvilualatex+') and \XeLaTeX{} (with option `\verb+--no-pdf+').
-PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), PDF-XChange and Foxit Reader. Animated SVG produced by means of \LaTeX{} and \verb+dvisvgm+ are self-contained files that can be embedded into HTML using the \verb+<object>+ tag or opened directly in a Web browser, such as Chromium or Firefox.
+PDF files with animations can be viewed in Acrobat Reader (except on mobile devices), PDF-XChange and Foxit Reader.
-The user interacts with the animation through optional animation controls or using the mouse like so: pressing the mouse button over the animation widget immediately pauses a playing animation and releasing it resumes playback. Pressing the shift-key at the same time reverses the playback direction. Keeping the mouse button pressed while moving the mouse pointer off the animation widget permanently pauses playback.
+Animated SVG produced by means of \LaTeX{} and \verb+dvisvgm+ are self-sufficient files that can be embedded into HTML using the \verb+<object>+ tag or opened directly in a Web browser, such as Chromium or Firefox. Also, presentations, such as `beamer'-class documents, with embedded animations can be exported to SVG instead of PDF and viewed in a Web browser. SVG-capable Web browsers are standard on many platforms and operating systems and thus make SVG a very portable file format. A \LaTeX{} package for embedding video and audio into SVG is also available\cite{media4svg}.
-On mobile devices, interaction with an animated SVG is similar to that on desktop devices, just using finger touches instead of mouse button press/release. To permanently pause an animation without the pause button, touch the animation with a second finger, then lift both fingers off.
+The user interacts with the animation through optional animation controls or using the mouse like so: pressing the mouse button over the animation widget immediately pauses a playing animation and releasing it resumes playback. Pressing the shift-key at the same time reverses the playback direction. Keeping the mouse button pressed while moving the mouse pointer off the animation widget permanently pauses playback. On mobile devices, tapping on the animation toggles between play and pause.
+%On mobile devices, interaction with an animated SVG is similar to that on desktop devices, just using finger touches instead of mouse button press/release. To permanently pause an animation without the pause button, touch the animation with a second finger, then lift both fingers off.
+
+
\section{Requirements}
\begin{trivlist}
%\item $\varepsilon$-\TeX
@@ -129,7 +132,7 @@
\item dvipdfmx, version $\ge 20190503$, for DVI to PDF conversion
\item \verb+dvisvgm+ for DVI to SVG conversion (also requires Ghostscript)
\item PDF: Acrobat Reader, PDF-XChange, Foxit Reader
-\item SVG: Chromium-based browsers, Firefox and others
+\item SVG: Chromium-based browsers for best performance
\end{trivlist}
\section{Installation}
@@ -166,9 +169,13 @@
height=<v-size> | totalheight=<v-size>
keepaspectratio
scale=<factor>
+bb=<llx> <lly> <urx> <ury>
+viewport=<llx> <lly> <urx> <ury>
+trim=<left> <bottom> <right> <top>
+clip
hiresbb
interpolate
-pagebox
+pagebox=...
buttonsize=<size>
buttonbg=<colour>
buttonfg=<colour>
@@ -266,9 +273,9 @@
\end{verbatim}
would create an animation from all pages of the file `frames.pdf', running at 12 fps.
-\clearpage
+%\clearpage
\section{Command options}
-The following options to \verb+\animategraphics+ and `\verb+animateinline+' have been provided:
+The following options to \verb+\animategraphics+ and `\verb+animateinline+' have been provided.
\subsection{Basic options}
\begin{verbatim}
label=<label text>
@@ -281,7 +288,7 @@
\begin{verbatim}
poster[=first | <num> | last | none]
\end{verbatim}
-Specifies which frame 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. A frame number \verb+<num>+ may as well be given; \verb+<num>+ is zero-based, that is, the first frame has number `0'.
+Specifies which frame 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. A frame number \verb+<num>+ may as well be given; \verb+<num>+ is zero-based, that is, the first frame has number `0'.
\begin{verbatim}
every=<num>
\end{verbatim}
@@ -331,9 +338,13 @@
\begin{verbatim}
trim=<left> <bottom> <right> <top>
\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.
+(\verb+\animategraphics+ only.) Crops graphic 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 graphic.
\begin{verbatim}
-pagebox
+clip
+\end{verbatim}
+(\verb+\animategraphics+ only.) Clips the graphic to the (possibly modified) bounding box.
+\begin{verbatim}
+pagebox=...
hiresbb
interpolate
\end{verbatim}
@@ -534,25 +545,7 @@
\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+frameNum+' 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{lstlisting}
- \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{lstlisting}
-
-\begin{table}[p]%[hbp]
+\begin{table}[hbp]%[p]%[hbp]
\centering
\caption{Animation object properties}\label{tab:props}
\begin{tabularx}{\linewidth}[t]{lllX}\hline
@@ -568,7 +561,7 @@
\end{tabularx}
\end{table}
-\begin{table}[p]%[htbp]
+\begin{table}[htp]%[p]%[htbp]
\centering
\caption{Animation object methods}\label{tab:methods}
\begin{tabularx}{\linewidth}[t]{lX}\hline
@@ -582,6 +575,24 @@
\end{tabularx}
\end{table}
+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+frameNum+' 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{lstlisting}
+ \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{lstlisting}
+
\clearpage
\section{Examples}
\subsection{Animations from sets of files, using {\tt\textbackslash animategraphics}}\label{sect:examples}
@@ -1337,9 +1348,6 @@
\begin{lstlisting}
\documentclass[dvisvgm]{standalone}
-\usepackage{animate}
-\usepackage{graphicx}
-
%\usepackage{xcolor}
%\pagecolor{white} % opaque background with solid colour
@@ -1346,8 +1354,10 @@
%\usepackage{pstricks} % enable as needed
%\usepackage{tikz}
+\usepackage{animate}
+\usepackage{graphicx}
+
\begin{document}
-
%
% \animategraphics{..}{...}{...}{...}
%
@@ -1355,7 +1365,6 @@
%
% \begin{animateinline}{..} ... \end{animateinline}
%
-
\end{document}
\end{lstlisting}
Note that when animating external graphics with \verb+\animategraphics+, only PDF and PostScript (EPS, PS, MPS) files are converted to inline SVG code; files in other formats (SVG, PNG, JPEG) remain external and must be bundled with the final SVG output. Thus, for obtaining self-contained SVG, it is recommended to convert PNG, JPEG and SVG files to PDF or PostScript first. Also note that PostScript files must have all required fonts embedded. This is not always the case for \MP-generated PostScript. Here, embedding of fonts is ensured by putting `\verb+prologues := 3;+' into the header of the \MP{} input.
@@ -1455,13 +1464,15 @@
\section{Acknowledgements}
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.
+\enlargethispage{4ex}
\begin{thebibliography}{8}
- \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/}} \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\url{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/}} \href{http://melusine.eu.org/syracuse/metapost/animations/chupin/?idsec=scara}{\url{syracuse/metapost/animations/chupin/?idsec=scara}}
\bibitem{dvisvgm} \emph{dvisvgm: A fast DVI to SVG converter} URL: \url{http://dvisvgm.de}
\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
\bibitem{luque12} Luque, M.: \emph{PSTricks : applications.} URL: \url{http://pstricks.blogspot.com}
+\bibitem{media4svg} \emph{The media4svg Package}. URL: \url{http://www.ctan.org/pkg/media4svg}
\bibitem{media9} \emph{The media9 Package}. URL: \url{http://www.ctan.org/pkg/media9}
\bibitem{texsx} \emph{Beamer: animate package and overlay}. URL: \href{https://tex.stackexchange.com/a/385209}{\url{https://tex.stackexchange.com}}\\ \href{https://tex.stackexchange.com/a/385209}{\url{/a/385209}}
\end{thebibliography}
Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty 2020-04-25 20:47:25 UTC (rev 54873)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty 2020-04-25 20:47:38 UTC (rev 54874)
@@ -13,7 +13,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\@anim at version{2020/03/25}
+\def\@anim at version{2020/04/25}
\ProvidesPackage{animate}
[\@anim at version\space PDF & SVG animations from files and inline graphics]
@@ -104,7 +104,7 @@
\endlinechar`\:% `:' appended to every line read
\IfFileExists{#1.xbb}{%
%read from xbb file
- {\catcode`\%=0\sbox0{\input{#1.xbb}}}%
+ {\catcode`\:=12\catcode`\%=0\sbox0{\input{#1.xbb}}}%
\ifdefined#3\else%
\PackageError{animate}{%
Cannot read number of pages from file\MessageBreak%
@@ -118,9 +118,8 @@
%read from command pipe (`extractbb')
%firstly, check whether reading from pipe is allowed
\immediate\closein\@inputcheck%
- \immediate\openin\@inputcheck="|extractbb -h"%
- \let\@anim at foo\@anim at bar% <-- needed for some reason to make
- \ifeof\@inputcheck% <-- this test work correctly
+ \immediate\openin\@inputcheck="|extractbb -h"\relax%
+ \ifeof\@inputcheck%
\immediate\closein\@inputcheck%
\PackageError{animate}{%
Cannot determine number of pages in file\MessageBreak%
@@ -127,7 +126,7 @@
----------------------------------------\MessageBreak%
#1.#2\MessageBreak%
----------------------------------------\MessageBreak%
- Try --shell-escape option (--enable-pipes in MikTeX),%
+ Try --shell-escape option (--enable-pipes in MiKTeX),%
\MessageBreak or run\MessageBreak%
\space\space extractbb #1.#2\MessageBreak%
on the command line to provide a valid `xbb' file%
@@ -134,7 +133,7 @@
}{}%
\else%
\immediate\closein\@inputcheck%
- {\catcode`\%=0\sbox0{\@@input "|extractbb -O #1.#2"}}%
+ {\catcode`\:=12\catcode`\%=0\sbox0{\@@input "|extractbb -O #1.#2"}}%
\fi%
}%
}}
@@ -349,7 +348,7 @@
%helper macro that typesets graphics file into savebox
\if at anim@dvips
\def\@anim at filebox#1#2{% dvips: no multi-page support
- \edef\@anim at curfile{[clip\@anim at gropts]{#1}}%
+ \edef\@anim at curfile{[\@anim at gropts]{#1}}%
\global\setbox\@anim at box=\hbox{%
\expandafter\includegraphics\@anim at curfile}%
}
@@ -356,7 +355,7 @@
\else
%pdfTeX, LuaTeX, dvipdfmx, xetex, dvisvgm
\def\@anim at filebox#1#2{%
- \edef\@anim at curfile{[clip\@anim at gropts,page=#2]{#1}}%
+ \edef\@anim at curfile{[\@anim at gropts,page=#2]{#1}}%
\global\setbox\@anim at box=\hbox{%
\expandafter\includegraphics\@anim at curfile}%
}
@@ -398,7 +397,8 @@
\gdef\@anim at boxscale{\@ne}%
%append final dims to inclusion opts, also used for the remaining files
%of the current animation
- \xdef\@anim at gropts{\@anim at gropts,width=\@anim at animwidth%
+ \xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi width=\@anim at animwidth%
,height=\@anim at animheight,totalheight=\@anim at animtotalheight}%
\fi%
\fi%
@@ -1535,10 +1535,22 @@
\ifnum\@anim at resizeflags=7\relax% height+totalheight+width->totalheight+width
\global\@anim at resizeflags=5%
\fi%
- \if at anim@hiresbb\xdef\@anim at gropts{\@anim at gropts,hiresbb}\fi%
- \if at anim@interpolate\xdef\@anim at gropts{\@anim at gropts,interpolate}\fi%
- \ifx\@anim at pagebox\@empty\else%
- \xdef\@anim at gropts{\@anim at gropts,pagebox=\@anim at pagebox}\fi%
+ \ifx\@anim at bb\@empty\else\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi\@anim at bb}\fi%
+ \ifx\@anim at viewport\@empty\else\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi\@anim at viewport}\fi%
+ \ifx\@anim at trim\@empty\else\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi\@anim at trim}\fi%
+ \ifx\@anim at angle\@empty\else\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi\@anim at angle}\fi%
+ \if at anim@clip\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi clip}\fi%
+ \if at anim@hiresbb\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi hiresbb}\fi%
+ \if at anim@interpolate\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi interpolate}\fi%
+ \ifx\@anim at pagebox\@empty\else\xdef\@anim at gropts{\@anim at gropts%
+ \ifx\@anim at gropts\@empty\else,\fi\@anim at pagebox}\fi%
\ifthenelse{\boolean{@anim at autoplay}\OR\boolean{@anim at autoresume}}{%
\setboolean{@anim at autoplayorresume}{true}%
}{}%
@@ -2790,6 +2802,22 @@
\define at key{anim at user}{keepaspectratio}[true]{%
\setboolean{@anim at iso}{#1}%
}
+\define at key{anim at user}{bb}{%
+ \xdef\@anim at bb{bb=#1}%
+}
+\define at key{anim at user}{viewport}{%
+ \xdef\@anim at viewport{viewport=#1}%
+}
+\define at key{anim at user}{trim}{%
+ \xdef\@anim at trim{trim=#1}%
+}
+\define at key{anim at user}{angle}{%
+ \xdef\@anim at angle{angle=#1}%
+}
+\newboolean{@anim at clip}
+\define at key{anim at usr}{clip}[true]{%
+ \setboolean{@anim at clip}{#1}%
+}
\newboolean{@anim at hiresbb}
\define at key{anim at user}{hiresbb}[true]{%
\setboolean{@anim at hiresbb}{#1}%
@@ -2799,10 +2827,10 @@
\setboolean{@anim at interpolate}{#1}%
}
\define at key{anim at user}{pagebox}{%
- \gdef\@anim at pagebox{#1}%
+ \xdef\@anim at pagebox{pagebox=#1}%
}
\define at key{anim at user}{scale}{%
- \gdef\@anim at boxscale{#1}%
+ \xdef\@anim at boxscale{#1}%
}
\define at key{anim at user}{buttonsize}{%
\gdef\@anim at btnsize{#1}%
@@ -2946,7 +2974,7 @@
\newboolean{@anim at ctrlright}
\newboolean{@anim at ctrlcentre}
\define at key{anim at user}{controlsaligned}{%
- \@anim at parse@ctrlsalignarg\@anim at tmpvar\@anim at tmpdima#1+\@nil%
+ \@anim at parse@ctrlsalignarg\@anim at tmpvar\@anim at tmpdima#1+\@nil%
\ifthenelse{\equal{\@anim at tmpvar}{left}}{%
\setboolean{@anim at ctrlleft}{true}%
\setboolean{@anim at ctrlright}{false}%
@@ -3063,18 +3091,6 @@
\define at key{anim at user}{every}{% embed every #1th frame
\ifnum#1<\@ne\relax\gdef\@anim at every{1}\else\gdef\@anim at every{#1}\fi%
}
-\define at key{anim at user}{bb}{%
- \g at addto@macro\@anim at gropts{, bb=#1}%
-}
-\define at key{anim at user}{viewport}{%
- \g at addto@macro\@anim at gropts{, viewport=#1}%
-}
-\define at key{anim at user}{trim}{%
- \g at addto@macro\@anim at gropts{, trim=#1}%
-}
-\define at key{anim at user}{angle}{%
- \g at addto@macro\@anim at gropts{, angle=#1}%
-}
\newboolean{@anim at meas}
\define at key{anim at user}{measure}[true]{%
\setboolean{@anim at meas}{#1}%
@@ -3107,6 +3123,11 @@
\setboolean{@anim at doscaling}{true}%
\global\let\@anim at boxscale\@anim@@boxscale%
\global\let\if at anim@iso=\if at anim@@iso%
+ \global\let\@anim at bb\@anim@@bb%
+ \global\let\@anim at viewport\@anim@@viewport%
+ \global\let\@anim at trim\@anim@@trim%
+ \global\let\@anim at angle\@anim@@angle%
+ \global\let\if at anim@clip=\if at anim@@clip%
\global\let\if at anim@hiresbb=\if at anim@@hiresbb%
\global\let\if at anim@interpolate=\if at anim@@interpolate%
\global\let\@anim at pagebox\@anim@@pagebox%
@@ -3308,6 +3329,26 @@
\define at key{anim at pkg}{keepaspectratio}[true]{%
\setboolean{@anim@@iso}{#1}%
}
+\def\@anim@@bb{}
+\define at key{anim at pkg}{bb}{%
+ \xdef\@anim at bb{bb=#1}%
+}
+\def\@anim@@viewport{}
+\define at key{anim at pkg}{viewport}{%
+ \xdef\@anim@@viewport{viewport=#1}%
+}
+\def\@anim@@trim{}
+\define at key{anim at pkg}{trim}{%
+ \xdef\@anim@@trim{trim=#1}%
+}
+\def\@anim@@angle{}
+\define at key{anim at pkg}{angle}{%
+ \xdef\@anim@@angle{angle=#1}%
+}
+\newboolean{@anim@@clip}
+\define at key{anim at pkg}{clip}[true]{%
+ \setboolean{@anim@@clip}{#1}%
+}
\newboolean{@anim@@hiresbb}
\define at key{anim at pkg}{hiresbb}[true]{%
\setboolean{@anim@@hiresbb}{#1}%
@@ -3318,7 +3359,7 @@
}
\def\@anim@@pagebox{}
\define at key{anim at pkg}{pagebox}{%
- \def\@anim@@pagebox{#1}%
+ \xdef\@anim@@pagebox{pagebox=#1}%
}
\def\@anim@@boxscale{1}%
\define at key{anim at pkg}{scale}{%
@@ -3389,7 +3430,7 @@
\setboolean{@anim@@ctrlcentre}{true}
\def\@anim@@ctrlsindent{\z@}
\define at key{anim at pkg}{controlsaligned}{%
- \@anim at parse@ctrlsalignarg\@anim at tmpvar\@anim at tmpdima#1+\@nil%
+ \@anim at parse@ctrlsalignarg\@anim at tmpvar\@anim at tmpdima#1+\@nil%
\setboolean{@anim@@ctrlcentre}{false}%
\ifthenelse{\equal{\@anim at tmpvar}{left}}{%
\setboolean{@anim@@ctrlleft}{true}%
@@ -3569,7 +3610,7 @@
\if at anim@controls at play%
var a#1_btnPauseLeft,a#1_btnPlayLeft,a#1_btnPauseRight,a#1_btnPlayRight;$%
\fi%
- var a#1_playsRight,a#1_isPaused;$%
+ var a#1_playsRight,a#1_isPaused\if at anim@step\else,a#1_playing\fi;$%
\if at anim@step\else
var a#1_int;$% timer id (takes return val of setIntervall())
% function pointers
@@ -4228,7 +4269,7 @@
\@anim@@jsvardecls{#1}% variables that are supposed to be global
(function(){$% IIFE (self-executing anon. function) to limit scope
function onload(){$%
- \@anim@@jsinit{#1}%
+ \@anim@@jsinit{#1}$%
\if at anim@nomouse\else
document.getElementById('anm#1').addEventListener('mouseup',%
onMouseUpWdgt);$%
@@ -4236,10 +4277,6 @@
onMouseDownWdgt);$%
document.getElementById('anm#1').addEventListener('touchend',%
onTouchEndWdgt);$%
- document.getElementById('anm#1').addEventListener('touchstart',%
- onTouchStartWdgt);$%
- document.getElementById('anm#1').addEventListener('touchmove',%
- onTouchMove);$%
\fi%
onvisible();$% in case of `autoplay' option
}$%
@@ -4259,29 +4296,20 @@
document.addEventListener('visibilitychange',onVisibilityChange);$%
window.addEventListener('load',onload);$%
\if at anim@nomouse\else
- var permPause#1=false;
function onWidgetUpAction(event){$%
\@anim at wdgtUpJS{#1}%
}$%
- function onTouchStartWdgt(event){$%
- event.preventDefault();$%
- event.stopPropagation();$%
- permPause#1=false;
- \@anim at wdgtDownJS{#1}%
- }$%
function onTouchEndWdgt(event){$%
event.preventDefault();$%
event.stopPropagation();$%
- if(event.targetTouches.length>0){permPause#1=true;}$%
- else{$%
- if(permPause#1){permPause#1=false;}$%
- else{onWidgetUpAction(event);}$%
- }$%
+ \if at anim@step\else
+ if(a#1_playing){try{a#1_pause();}catch(e){}}else{$%
+ \fi%
+ \@anim at wdgtUpJS{#1}%
+ \if at anim@step\else%
+ }$%
+ \fi%
}$%
- function onTouchMove(event){$%
- event.preventDefault();$%
- event.stopPropagation();$%
- }$%
function onMouseDownWdgt(event){$%
event.preventDefault();$%
event.stopPropagation();$%
More information about the tex-live-commits
mailing list.