texlive[54520] Master/texmf-dist: animate (24mar20)

commits+karl at tug.org commits+karl at tug.org
Tue Mar 24 21:52:05 CET 2020


Revision: 54520
          http://tug.org/svn/texlive?view=revision&revision=54520
Author:   karl
Date:     2020-03-24 21:52:05 +0100 (Tue, 24 Mar 2020)
Log Message:
-----------
animate (24mar20)

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-03-24 20:51:44 UTC (rev 54519)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2020-03-24 20:52:05 UTC (rev 54520)
@@ -1,3 +1,11 @@
+2020-03-24
+	* new: option `controlsaligned' extended for refined adjustment of
+	horizontal position
+
+2020-03-23
+	* new: option `controlsaligned' for changing horizontal position of
+	animation controls
+
 2019-12-03
 	* fix: another occurrence of quotes issue, now fixed at a central place
 

Modified: trunk/Master/texmf-dist/doc/latex/animate/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/animate/README.txt	2020-03-24 20:51:44 UTC (rev 54519)
+++ trunk/Master/texmf-dist/doc/latex/animate/README.txt	2020-03-24 20:52:05 UTC (rev 54520)
@@ -44,7 +44,9 @@
  * Package options: width=<h-size>, height=<v-size>, totalheight=<v-size>,
                     keepaspectratio, scale=<factor>, nomouse,
                     hiresbb,pagebox,interpolate,
-                    autopause, autoplay, autoresume, controls[=all | none | ...],
+                    autopause, autoplay, autoresume,
+                    controls[=all | none | ...],
+                    controlsaligned=left[+<indent>] | center | right[+<indent>],
                     final, draft,
                     buttonsize=<size>,
                     buttonbg=<colour>, buttonfg=<colour>, buttonalpha=<opacity>,

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-03-24 20:51:44 UTC (rev 54519)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2020-03-24 20:52:05 UTC (rev 54520)
@@ -161,6 +161,7 @@
 final
 controls[=(all|true|on) |
           (none|false|off) | {[play][,step][,stop][,speed]}]
+controlsaligned=left[+<indent>] | center | right[+<indent>]
 width=<h-size>
 height=<v-size> | totalheight=<v-size>
 keepaspectratio
@@ -343,6 +344,14 @@
 \end{verbatim}
 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}
+controlsaligned=left[+<indent>] | center | right[+<indent>]
+\end{verbatim}
+Animation controls are centred below the animation widget by default. With this option one can choose between centred, flush-left or flush-right alignment. The optional \verb+<indent>+ inserts additional horizontal space that pushes the control buttons away from the left or right edge of the animation widget towards the opposite side. \verb+<indent>+ must be a valid \TeX{} dimension. Negative values may be used, as in
+\begin{verbatim}
+    controlsaligned=right+-4em,
+\end{verbatim}
+in which case control buttons protrude beyond the animation's right vertical edge by \verb+4em+.
+\begin{verbatim}
 buttonsize=<size>
 \end{verbatim}
 Changes the control button height to \verb+<size>+, which must be a valid \TeX{} dimension. The default button height is \verb+1.44em+ and thus scales with the current font size.
@@ -913,7 +922,7 @@
 \noindent\begin{animateinline}[
   timeline=lorenz.tln,
   controls,poster=last,
-  begin={\begin{pspicture}(-39,-13)(39,60)},
+  begin={\begin{pspicture}(-36,-13)(36,55)},
   end={\end{pspicture}}
 ]{10}
   %coordinate axes
@@ -1317,19 +1326,17 @@
 \end{document}
 \end{lstlisting}
 
-\section{Producing animated SVG} 
-Thanks to Martin Gieseking's `\verb+dvisvgm+' utility~\cite{dvisvgm} that ships with all major \TeX{} distributions, package `animate' can produce self-contained animated SVG, with all the bits and pieces already included that are necessary to run in modern Web browsers as standalone files or as embedded objects within a Web page made of HTML. Animations have the same look and usability, including optional control buttons, as if they were embedded in a PDF document. Animated SVG even work on mobile devices.
+\section{Animated SVG}
+Thanks to Martin Gieseking's \verb+dvisvgm+ utility~\cite{dvisvgm} that ships with all major \TeX{} distributions, package `animate' can produce self-contained animated SVG, with all the bits and pieces already included that are necessary to run in modern Web browsers as standalone files or as embedded objects within a Web page made of HTML. Animations have the same look and usability, including optional control buttons, as if they were embedded in a PDF document. Animated SVG even work on mobile devices.
 
-As `\verb+dvisvgm+' is linked against the Ghostscript library, it can parse and convert embedded PostScript to inline SVG code. It is therefore compatible with the popular TikZ and PSTricks \LaTeX{} packages.
+As \verb+dvisvgm+ is linked against the Ghostscript library, it can parse and convert embedded PostScript to inline SVG code. It is therefore compatible with the popular TikZ and PSTricks \LaTeX{} packages.
  
-SVG is a single-page graphics format. Therefore, it is most useful to first produce DVI with a single animation per file or page. Then, `\verb+dvisvgm+' converts every page of the DVI input to a standalone animated SVG file. Use the `article' document class and pass `\verb+dvisvgm+' as a global option. In this way, it gets conveyed to `animate' and other packages to be loaded, such as `graphicx' or TikZ. Note that the `standalone' document class is not required; `\verb+dvisvgm+' already computes the tightly enclosing bounding box around the page content by default. If `standalone' is still to be used, `\verb+preview+' must be added as a global document class option.
+SVG is a single-page graphics format. Therefore, it is recommended to produce documents with a single animation per file or page. Thereafter, \verb+dvisvgm+ converts every page of the DVI input to a standalone animated SVG file. You may want to use the `standalone' document class for creating standalone SVG animations. Pass `\verb+dvisvgm+' as a global document class option. In this way, it gets conveyed to `animate' and other packages to be loaded, such as `graphicx' or TikZ.
 
 The following code may serve as a template for generating standalone animated SVG:
 \begin{lstlisting}
-\documentclass[dvisvgm]{article}
+\documentclass[dvisvgm]{standalone}
 
-\pagestyle{empty} % suppress page number
-
 \usepackage{animate}
 \usepackage{graphicx}
 
@@ -1340,7 +1347,6 @@
 %\usepackage{tikz}
 
 \begin{document}
-\begin{center}
 
 %
 % \animategraphics{..}{...}{...}{...}
@@ -1350,34 +1356,35 @@
 % \begin{animateinline}{..} ... \end{animateinline} 
 %
 
-\end{center}
 \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. 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. Unfortunately, animating PDF and PostScript files with \verb+\animategraphics+ is limited to vector graphics. If such files contain bitmapped content they must be converted to PNG (or JPEG, if photographs). Of course, these files remain external to the final animated SVG.
+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.
 
 Use one of
 \begin{verbatim}
 latex
 platex
-lualatex --output-format=dvi
+dvilualatex
 xelatex -no-pdf
 \end{verbatim}
 to produce DVI or XDV output from the \LaTeX{} source. After this, SVG is obtained by running
 \begin{verbatim}
-dvisvgm --font-format=woff --exact --zoom=-1
+dvisvgm --font-format=woff --exact --zoom=-1 --page=1,- --optimize ...
 \end{verbatim}
 on the intermediate DVI or XDV file.
 
-Option `\verb+--font-format=woff+' (or `\verb+--font-format=woff2+') prompts `\verb+dvisvgm+' to embed document fonts in a format that is understood by Web browsers. It ensures that typeset text looks as in normal PDF output.
+Option `\verb+--font-format=woff+' (or `\verb+--font-format=woff2+') prompts \verb+dvisvgm+ to embed document fonts in a format that is understood by Web browsers. It ensures that typeset text looks as in normal PDF output.
 
-Option `\verb+--exact+' tells `\verb+dvisvgm+' to calculate exact bounding boxes around font glyphs. This avoids clipping of glyphs in the SVG output, as glyphs usually tend to be slightly bigger than their boxes defined in the font files.
+Option `\verb+--exact+' tells \verb+dvisvgm+ to calculate exact bounding boxes around font glyphs. This avoids clipping of glyphs in the SVG output, as glyphs usually tend to be slightly bigger than their boxes defined in the font files.
 
 The purpose of `\verb+--zoom=-1+' is to produce responsive SVG. If embedded in a Web page, this kind of SVG will automatically scale to fill up the available space of its surrounding container, usually an \verb+<object>+ tag (see below). If viewed standalone in a Web browser, a responsive SVG fills up the complete browser tab.
 
-By default, `\verb+dvisvgm+' processes only the very first page of the input file. To convert multipage DVI/XDV with several animations, add option `\verb+-p1,-+'.
+By default, \verb+dvisvgm+ processes only the very first page of the input file. To convert multipage DVI/XDV with several animations, add option `\verb+--page=1,-+'.
 
-As SVG derives from XML it is not known to be particularly economical in terms of file size. Compressed SVG, with file extension `\verb+svgz+', shortens download times and is supported by most Web browsers. It can be generated by adding option `\verb+-z+'. Also, option `\verb+--precision=1+' may be used to reduce the SVG file size. It limits the precision of floating point numbers, such as coordinates, to one decimal figure.
+With option `\verb+--optimize+', \verb+dvisvgm+ applies several optimizations to reduce the output file size.
 
+As SVG derives from XML it is not known to be particularly economical in terms of file size. Compressed SVG, with file extension `\verb+svgz+', shortens download times and is supported by most Web browsers. It can be generated by adding option `\verb+-z+'. Also, option `\verb+--precision=1+' may be used to reduce the SVG file size. It limits the precision of floating point numbers, such as coordinates, to one decimal figure. Sometimes, animations may behave stangely after applying this option. Then, of course, it should be omitted.
+
 The recommended way to include animated SVG into HTML is to use the \verb+<object>+ tag. The \verb+<img>+ tag does not work here, as it ignores the embedded JavaScript. However, it may still be used as fallback. Also, it allows for search engine indexing, if desired:
 \begin{lstlisting}
 <object type="image/svg+xml" data="animatedImage.svg">
@@ -1395,10 +1402,6 @@
 
   \item Animated SVG is best viewed in Web browsers that are based on the Blink rendering engine. The most prominent representatives are Chrome, its open-source base Chromium and Opera. Unfortunately, Firefox is very slow.
 
-%  \item Animations may run very slowly if viewed in the Acrobat Reader web-browser plugin. Instead, open the PDF locally in the Reader application for best results.
-
-%  \item The Acrobat Reader setting `Use page cache' (menu `Edit' $\rightarrow$ `Preferences' $\rightarrow$ `Startup') should be \emph{dis}abled for version 7, while remaining \emph{en}abled beginning with version 8 (menu `Edit' $\rightarrow$ `Preferences' $\rightarrow$ `Page Display' $\rightarrow$ `Rendering').
-
   \item The \verb+dvips+ option `\verb+-Ppdf+' should be avoided entirely or followed by something like `\verb+-D 1200+' on the command line in order to set a sensible DVI resolution. This does \emph{not} degrade the output quality! The configuration file `config.pdf' loaded by option `\verb+-Ppdf+' specifies an excessively high DVI resolution that will be passed on to the final PDF. Eventually, Acrobat Reader gets confused and will not display the frames within the animation widget.
 
   \item Animations do not work if the PDF was produced with Ghostscript versions older than 9.15.
@@ -1427,7 +1430,7 @@
     into the editor window that opens, save the file and quit the editor.
     \item\label{item:laststep} To rebuild the format, enter\\
     {\tt initexmf -{}-dump=latex}
-    \item Repeat steps \ref{item:firststep}--\ref{item:laststep} with config files `{\tt pdflatex}' and `{\tt xelatex}'
+    \item Repeat steps \ref{item:firststep}--\ref{item:laststep} with config files {\tt pdflatex} and {\tt xelatex}
   \end{enumerate}
 
   \TeX\ Live:
@@ -1450,7 +1453,7 @@
 \end{itemize}
 
 \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.
+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: \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}}

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2020-03-24 20:51:44 UTC (rev 54519)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2020-03-24 20:52:05 UTC (rev 54520)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2019/12/03}
+\def\@anim at version{2020/03/23}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF & SVG animations from files and inline graphics]
 
@@ -144,177 +144,6 @@
 
 \if at anim@dvisvgm
   \setboolean{@anim at export}{false}
-  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-  \AtBeginDocument{%
-    % Add PS and PDF file inclusion (PDF files as of dvisvgm-2.6.3) and
-    % fix some scaling issues in the dvisvgm.def graphics driver
-    \def\GPT at space{ }
-    \def\Gin at extensions{.svg,.eps,.png,.jpg,.jpeg}
-    \def\Ginclude at pdf#1{\Ginclude at psorpdf{#1}{pdffile}}
-    \def\Ginclude at eps#1{\let\Gin at page\@empty\Ginclude at psorpdf{#1}{PSfile}}
-    \def\Ginclude at psorpdf#1#2{%
-     \message{<#1>}%
-      \bgroup
-      \def\@tempa{!}%
-      \dimen@\Gin at req@width
-      \dimen at ii.1bp%
-      \divide\dimen@\dimen at ii
-      \@tempdima\Gin at req@height
-      \divide\@tempdima\dimen at ii
-      \Gin at req@width0.99626\Gin at req@width%
-      \Gin at req@height0.99626\Gin at req@height%
-        \ifGin at clip\special{dvisvgm:raw
-          <g><clipPath id="GinClip\Gin at clip@id">%
-            <path d="M{?x},{?y}l\strip at pt\Gin at req@width,0l0,-\strip at pt\Gin at req@height
-              l-\strip at pt\Gin at req@width,0Z"/>%
-          </clipPath>%
-          <g clip-path="url(\Gin at hash@tag GinClip\Gin at clip@id)">}%
-        \fi%
-        \special{#2="#1"\GPT at space
-          \ifx\Gin at page\@empty\else page=\Gin at page\GPT at space\fi
-          llx=\Gin at llx\GPT at space
-          lly=\Gin at lly\GPT at space
-          urx=\Gin at urx\GPT at space
-          ury=\Gin at ury\GPT at space
-          \ifx\Gin at scalex\@tempa\else rwi=\number\dimen@\GPT at space\fi
-          \ifx\Gin at scaley\@tempa\else rhi=\number\@tempdima\GPT at space\fi
-        }%
-        \ifGin at clip%
-          \special{dvisvgm:raw </g></g>}%
-          \begingroup%
-            \count@\Gin at clip@id\advance\count@ by\@ne\xdef\Gin at clip@id{\the\count@}%
-          \endgroup%
-        \fi%
-      \egroup}
-    \@namedef{Gin at rule@.ps}#1{{eps}{.ps}{#1}}
-    \@namedef{Gin at rule@.eps}#1{{eps}{.eps}{#1}}
-    \@namedef{Gin at rule@.mps}#1{{eps}{.mps}{#1}}
-    \@namedef{Gin at rule@.pdf}#1{{pdf}{.xbb}{#1}}
-    \def\Gread at pdf#1{%
-      \Gread at generic{#1}\Gread at extractbb@aux%
-    }%
-    \def\Gread at extractbb@aux#1{%
-      \ifeof\@inputcheck%
-        \immediate\openin\@inputcheck=%
-          "|extractbb %
-          \ifx\Gin at page\@empty\else -p \Gin at page\GPT at space\fi
-          \ifx\Gin at pagebox\@empty\else -B \Gin at pagebox\GPT at space\fi
-          -O \Gin at base\Gin at ext"%
-      \fi%
-      \Gread at true%
-      \let\@tempb\Gread at false%
-      \ifeof\@inputcheck%
-        \@latex at error%
-          {Cannot run pipe command. Try --shell-escape\MessageBreak%
-           (--enable-pipes in MikTeX) option}%
-          {Alternatively, execute\MessageBreak\space\space
-             extractbb
-             \ifx\Gin at page\@empty\else -p \Gin at page\GPT at space\fi
-             \ifx\Gin at pagebox\@empty\else -B \Gin at pagebox\GPT at space\fi
-             \Gin at base\Gin at ext\MessageBreak in a terminal.}%
-      \else%
-        \loop%
-          \read\@inputcheck to\@tempa%
-          \ifeof\@inputcheck%
-            \Gread at false%
-          \else%
-            \expandafter\Gread at find@bb\@tempa:.\\%
-          \fi%
-          \ifGread@%
-          \repeat%
-        \immediate\closein\@inputcheck%
-      \fi%
-    }
-    \def\Ginclude at bitmap#1{%
-      \dimen@\Gin at urx pt%
-      \advance\dimen@ by-\Gin at llx pt%
-      \edef\Gin at svg@view at width{\strip at pt\dimen@}%
-      \dimen@\Gin at ury pt%
-      \advance\dimen@ by-\Gin at lly pt%
-      \edef\Gin at svg@view at height{\strip at pt\dimen@}%
-      \dimen@\Gin at svg@real at height@bp pt%
-      \advance\dimen@ by-\Gin at ury pt%
-      \edef\Gin at svg@view at base{\strip at pt\dimen@}%
-      \Gin at req@width0.99626\Gin at req@width%
-      \Gin at req@height0.99626\Gin at req@height%
-      \raise\strip at pt\Gin at req@height bp\hbox{%
-        \special{dvisvgm: raw
-          <g transform="translate({?x},{?y})">
-            <svg overflow="\ifGin at clip hidden\else visible\fi" width="\strip at pt\Gin at req@width" height="\strip at pt\Gin at req@height"
-                 viewBox="\Gin at llx\GPT at space\Gin at svg@view at base\GPT at space\Gin at svg@view at width\GPT at space\Gin at svg@view at height">
-              <image width="\Gin at svg@real at width@bp" height="\Gin at svg@real at height@bp"
-                     xlink:href="#1"/>
-            </svg>
-          </g>}%
-      }%
-    }
-    \@namedef{Gin at rule@.svg}#1{{svg}{.svg}{#1}}
-    \let\Ginclude at svg\Ginclude at bitmap
-    \def\Gread at svg#1{%
-      \begingroup
-      \catcode`\"12\relax%
-      \immediate\openin\@inputcheck#1 %
-      \ifeof\@inputcheck
-        \@latex at error{File `#1' not found}\@ehc
-      \else
-         \let\Gin at urx\relax
-         \let\Gin at ury\relax
-         \Gread at true
-         \let\@tempb\Gread at false
-         \loop
-           \read\@inputcheck to\@tempa
-           \ifeof\@inputcheck
-             \Gread at false
-           \else
-             \ifx\@tempa\Gin at partext\else
-               \ifx\Gin at ury\relax\expandafter\Gread at svg@height\@tempa height=\relax\fi%
-               \ifx\Gin at urx\relax\expandafter\Gread at svg@width\@tempa width=\relax\fi%
-             \fi%
-           \fi
-           \ifx\Gin at urx\relax\else\ifx\Gin at ury\relax\else\Gread at false\fi\fi%
-         \ifGread@
-         \repeat
-         \immediate\closein\@inputcheck
-         \ifx\Gin at urx\relax
-           \@latex at error{Cannot determine width of graphic in #1 (no BoundingBox)}\@ehc
-           \def\Gin at urx{72}%
-         \fi
-         \ifx\Gin at ury\relax
-           \@latex at error{Cannot determine height of graphic in #1 (no BoundingBox)}\@ehc
-           \def\Gin at ury{72}%
-         \fi
-      \fi
-      \edef\Gin at setter{\def\noexpand\Gin at urx{\Gin at urx}\def\noexpand\Gin at ury{\Gin at ury}}%
-      \expandafter\endgroup\Gin at setter%
-      \def\Gin at llx{0}%
-      \def\Gin at lly{0}%
-      \edef\Gin at svg@real at width@bp{\Gin at urx}%
-      \edef\Gin at svg@real at height@bp{\Gin at ury}%
-    }
-    \def\Gin at partext{\par}
-    \def\Gread at svg@height#1height={\@ifnextchar\relax{}{\@ifnextchar'\Gread at svg@height at apo\Gread at svg@height at double}}
-    \def\Gread at svg@height at apo'#1'#2\relax{\afterassignment\Gin at gobble@till at relax\dimen@#1pt\relax\edef\Gin at ury{\strip at pt\dimen@}}
-    \def\Gread at svg@height at double"#1"#2\relax{\afterassignment\Gin at gobble@till at relax\dimen@#1pt\relax\edef\Gin at ury{\strip at pt\dimen@}}
-    \def\Gread at svg@width#1width={\@ifnextchar\relax{}{\@ifnextchar'\Gread at svg@width at apo\Gread at svg@width at double}}
-    \def\Gread at svg@width at apo'#1'#2\relax{\afterassignment\Gin at gobble@till at relax\dimen@#1pt\relax\edef\Gin at urx{\strip at pt\dimen@}}
-    \def\Gread at svg@width at double"#1"#2\relax{\afterassignment\Gin at gobble@till at relax\dimen@#1pt\relax\edef\Gin at urx{\strip at pt\dimen@}}
-    \def\Gin at gobble@till at relax#1\relax{}
-    \edef\Gin at hash@tag{\string#}
-    \def\Gin at clip@id{0}
-    \@namedef{Gin at rule@.jpg}#1{{bitmap}{.xbb}{#1}}
-    \@namedef{Gin at rule@.jpeg}#1{{bitmap}{.xbb}{#1}}
-    \@namedef{Gin at rule@.png}#1{{bitmap}{.xbb}{#1}}
-    \def\Gread at bitmap#1{%
-      \Gread at generic{#1}\Gread at extractbb@aux%
-      \dimen@\Gin at urx pt%
-      \advance\dimen@ by-\Gin at llx pt%
-      \edef\Gin at svg@real at width@bp{\strip at pt\dimen@}%
-      \dimen@\Gin at ury pt%
-      \advance\dimen@ by-\Gin at lly pt%
-      \edef\Gin at svg@real at height@bp{\strip at pt\dimen@}%
-    }
-  }
-  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \fi
 
 \if at anim@export
@@ -364,7 +193,7 @@
 \if at anim@dvisvgm
   \setboolean{@anim at export}{false}
 
-  \def\@anim at updatebbox#1#2#3{\special{dvisvgm:bbox #1 #2 #3}}
+  \def\@anim at updatebbox#1#2#3{\special{dvisvgm:bbox #1 #2 #3 transform}}
 
   %approach similar to OCGs, that is, putting the frame content in an svg group,
   % <g id='...'>...</g>, whose visibility is then manipulated by JavaScript
@@ -1563,7 +1392,9 @@
       \setlength{\@anim at tmpdimb}{\z@}%
       \vskip 0.1\@anim at tmpdima%
       \hbox to \@anim at animwidth {%
-        \hss%
+        \if at anim@ctrlleft\hspace{\@anim at ctrlsindent}\fi%
+        \ifnum\if at anim@ctrlright\@ne\else%
+          \if at anim@ctrlcentre\@ne\else\z@\fi\fi=\@ne\hss\fi%
         \setboolean{@anim at controls@firstgrp}{false}%
         \if at anim@controls at stop%
           \setboolean{@anim at controls@firstgrp}{true}%
@@ -1584,7 +1415,9 @@
           \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%
+        \ifnum\if at anim@ctrlleft\@ne\else%
+          \if at anim@ctrlcentre\@ne\else\z@\fi\fi=\@ne\hss\fi%
+        \if at anim@ctrlright\hspace{\@anim at ctrlsindent}\fi%
       }%
     \fi%
   }%
@@ -1842,7 +1675,9 @@
       \setlength{\@anim at tmpdima}{\@anim at btnsize}%
       \vskip 0.1\@anim at tmpdima%
       \hbox to \@anim at animwidth {%
-        \hss%
+        \if at anim@ctrlleft\hspace{\@anim at ctrlsindent}\fi%
+        \ifnum\if at anim@ctrlright\@ne\else%
+          \if at anim@ctrlcentre\@ne\else\z@\fi\fi=\@ne\hss\fi%
         \def\@anim at tooltip{}%
         \setboolean{@anim at controls@firstgrp}{false}%
         \if at anim@controls at stop%
@@ -1890,7 +1725,9 @@
           \@anim at makebutton{Plus}{#2}%
           \@anim at buttonwidget{#1}{Plus}{Plus:#2}%
         \fi%
-        \hss%
+        \ifnum\if at anim@ctrlleft\@ne\else%
+          \if at anim@ctrlcentre\@ne\else\z@\fi\fi=\@ne\hss\fi%
+        \if at anim@ctrlright\hspace{\@anim at ctrlsindent}\fi%
       }%
     \fi%
   }%
@@ -3099,6 +2936,39 @@
   \setboolean{@anim at controls@speed}{true}%
 }
 
+\def\@anim at parse@ctrlsalignarg#1#2#3+#4\@nil{%
+  \ifthenelse{\equal{#3}{}}{}{\def#1{#3}}%
+  \ifthenelse{\equal{#4}{}}{#2=\z@}{\@anim at getalignindent#2#4\@nil}%
+}
+\def\@anim at getalignindent#1#2+\@nil{#1=#2}
+
+\newboolean{@anim at ctrlleft}
+\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% 
+  \ifthenelse{\equal{\@anim at tmpvar}{left}}{%
+    \setboolean{@anim at ctrlleft}{true}%
+    \setboolean{@anim at ctrlright}{false}%
+    \setboolean{@anim at ctrlcentre}{false}%
+    \xdef\@anim at ctrlsindent{\the\@anim at tmpdima}%
+  }{%
+    \ifthenelse{\equal{\@anim at tmpvar}{right}}{%
+      \setboolean{@anim at ctrlleft}{false}%
+      \setboolean{@anim at ctrlright}{true}%
+      \setboolean{@anim at ctrlcentre}{false}%
+      \xdef\@anim at ctrlsindent{\the\@anim at tmpdima}%
+    }{%
+      \ifthenelse{\equal{\@anim at tmpvar}{center}}{%
+        \setboolean{@anim at ctrlleft}{false}%
+        \setboolean{@anim at ctrlright}{false}%
+        \setboolean{@anim at ctrlcentre}{true}%
+        \xdef\@anim at ctrlsindent{\z@}%
+      }{}%
+    }%
+  }%
+}
+
 \newboolean{@anim at loop}
 \define at key{anim at user}{loop}[true]{%
   \setboolean{@anim at loop}{#1}%
@@ -3261,6 +3131,10 @@
   \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@ctrlleft=\if at anim@@ctrlleft%
+  \global\let\if at anim@ctrlright=\if at anim@@ctrlright%
+  \global\let\if at anim@ctrlcentre=\if at anim@@ctrlcentre%
+  \global\let\@anim at ctrlsindent\@anim@@ctrlsindent%
   \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%
@@ -3509,6 +3383,25 @@
   \setboolean{@anim@@controls at speed}{true}%
 }
 
+\newboolean{@anim@@ctrlleft}
+\newboolean{@anim@@ctrlright}
+\newboolean{@anim@@ctrlcentre}
+\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% 
+  \setboolean{@anim@@ctrlcentre}{false}%
+  \ifthenelse{\equal{#1}{left}}{%
+    \setboolean{@anim@@ctrlleft}{true}%
+    \edef\@anim@@ctrlsindent{\the\@anim at tmpdima}%
+  }{%
+    \ifthenelse{\equal{#1}{right}}{%
+      \setboolean{@anim@@ctrlright}{true}%
+      \edef\@anim@@ctrlsindent{\the\@anim at tmpdima}%
+    }{\setboolean{@anim@@ctrlcentre}{true}}%
+  }%
+}
+
 \newboolean{@anim@@loop}
 \setboolean{@anim@@loop}{false}%
 \define at key{anim at pkg}{loop}[true]{%



More information about the tex-live-commits mailing list.