texlive[55056] Master/texmf-dist: animate (7may20)

commits+karl at tug.org commits+karl at tug.org
Thu May 7 23:24:23 CEST 2020


Revision: 55056
          http://tug.org/svn/texlive?view=revision&revision=55056
Author:   karl
Date:     2020-05-07 23:24:22 +0200 (Thu, 07 May 2020)
Log Message:
-----------
animate (7may20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/animate/ChangeLog
    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-05-07 21:24:06 UTC (rev 55055)
+++ trunk/Master/texmf-dist/doc/latex/animate/ChangeLog	2020-05-07 21:24:22 UTC (rev 55056)
@@ -1,3 +1,9 @@
+2020-05-07
+	* fix: control button issue (dvisvgm)
+
+2020-05-06
+	* fix: control button transparency (all drivers)
+
 2020-04-25
 	* fix: compilation error in case of `dvisvgm' + [french]{babel}. For
 	slightly better performance, \animategraphics doesn't pass `clip' anymore

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-05-07 21:24:06 UTC (rev 55055)
+++ trunk/Master/texmf-dist/source/latex/animate/animate.tex	2020-05-07 21:24:22 UTC (rev 55056)
@@ -112,7 +112,7 @@
 \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 with command `\verb+dvilualatex+') and \XeLaTeX{} (with option `\verb+--no-pdf+').
+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.
 
@@ -371,7 +371,7 @@
 buttonfg=<colour>
 buttonalpha=<opacity>
 \end{verbatim}
-By default, control button widgets are drawn with black strokes on transparent background. The background can be turned into a solid colour by the first option, while the second option specifies the stroke colour. The parameter \verb+<colour>+ is an array of colon-(\verb+:+)-separated numbers in the range from 0.0 to 1.0. The number of array elements determines the colour model in which the colour is defined: (1) gray value, (3) RGB, (4) CMYK. For example, `\verb+1+', `\verb+1:0.5:0.2+' and `\verb+0.5:0.3:0.7:0.1+' are valid colour specifications. Option \verb+buttonalpha+ adds transparency to the control buttons. Its parameter \verb+<opacity>+ is a number between 0.0 and 1.0, where 0.0 produces fully transparent and 1.0 fully opaque buttons.
+By default, control button widgets are drawn with black strokes on empty, fully transparent background. The background can be filled with colour using the first option, while the second option specifies the stroke colour. Option \verb+buttonalpha+ adds transparency to the background colour. The parameter \verb+<colour>+ is an array of colon-(\verb+:+)-separated numbers in the range from 0.0 to 1.0. The number of array elements determines the colour model in which the colour is defined: (1) gray value, (3) RGB, (4) CMYK. For example, `\verb+1+', `\verb+1:0.5:0.2+' and `\verb+0.5:0.3:0.7:0.1+' are valid colour specifications. The parameter \verb+<opacity>+ is a number between 0.0 and 1.0, where 0.0 produces fully transparent and 1.0 fully opaque buttons.
 \begin{verbatim}
 draft
 final
@@ -1377,8 +1377,11 @@
 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 --page=1,- --optimize ...
+%\end{verbatim}
 \begin{verbatim}
-dvisvgm --font-format=woff --exact --zoom=-1 --page=1,- --optimize ...
+dvisvgm --font-format=woff --exact --zoom=-1 --page=1,- ...
 \end{verbatim}
 on the intermediate DVI or XDV file.
 
@@ -1390,7 +1393,7 @@
 
 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,-+'.
 
-With option `\verb+--optimize+', \verb+dvisvgm+ applies several optimizations to reduce the output file size.
+%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.
 

Modified: trunk/Master/texmf-dist/tex/latex/animate/animate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2020-05-07 21:24:06 UTC (rev 55055)
+++ trunk/Master/texmf-dist/tex/latex/animate/animate.sty	2020-05-07 21:24:22 UTC (rev 55056)
@@ -13,7 +13,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 
-\def\@anim at version{2020/04/25}
+\def\@anim at version{2020/05/07}
 \ProvidesPackage{animate}
 [\@anim at version\space PDF & SVG animations from files and inline graphics]
 
@@ -316,12 +316,8 @@
   \gdef\@anim at lscape{}%
   \gdef\@anim@@lscape{:ls}%
   \ifdefined\landscape%
-%    \if at anim@dvisvgm% disable `landscape' environment
-%      \renewenvironment{landscape}{}{}%
-%    \else%
-      \g at addto@macro{\landscape}{\gdef\@anim at lscape{:ls}}%
-      \g at addto@macro{\endlandscape}{\gdef\@anim at lscape{}}%
-%    \fi%
+    \g at addto@macro{\landscape}{\gdef\@anim at lscape{:ls}}%
+    \g at addto@macro{\endlandscape}{\gdef\@anim at lscape{}}%
   \fi%
 }
 
@@ -618,7 +614,6 @@
   %dvips .OR. dvisvgm
   %stroking commands
   \def\@anim at btnend{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -632,8 +627,9 @@
     14 1 6.5 1 2 arct
     closepath
     \ifx\empty\@anim at bg\empty\else
-      gsave \@anim at bg\space fill grestore
+      gsave \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     %
     1 setlinewidth
@@ -647,7 +643,6 @@
     stroke
   }
   \def\@anim at btnstep{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -661,8 +656,9 @@
     14 1 6.5 1 2 arct
     closepath
     \ifx\empty\@anim at bg\empty\else
-      gsave \@anim at bg\space fill grestore
+      gsave \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     %
     1 setlinewidth
@@ -672,7 +668,6 @@
     stroke
   }
   \def\@anim at btnplay{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -682,8 +677,9 @@
     14 14 1 14 2 arct
     0 14 lineto
     \ifx\empty\@anim at bg\empty\else
-      gsave closepath \@anim at bg\space fill grestore
+      gsave closepath \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     0.1 setlinewidth
     0 14 moveto
@@ -698,7 +694,6 @@
     stroke
   }
   \def\@anim at btnpause{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -708,8 +703,9 @@
     14 14 1 14 2 arct
     0 14 lineto
     \ifx\empty\@anim at bg\empty\else
-      gsave closepath \@anim at bg\space fill grestore
+      gsave closepath \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     %
     0 setlinecap
@@ -719,7 +715,6 @@
     stroke
   }
   \def\@anim at btnminus{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -733,8 +728,9 @@
     14 1 6.5 1 2 arct
     closepath
     \ifx\empty\@anim at bg\empty\else
-      gsave \@anim at bg\space fill grestore
+      gsave \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     %
     1.0 setlinewidth
@@ -744,7 +740,6 @@
     stroke
   }
   \def\@anim at btnplus{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -758,8 +753,9 @@
     14 1 6.5 1 2 arct
     closepath
     \ifx\empty\@anim at bg\empty\else
-      gsave \@anim at bg\space fill grestore
+      gsave \@anim at bg\space bgfill grestore
     \fi
+    \@anim at fg\space
     stroke
     %
     1.0 setlinewidth
@@ -770,8 +766,19 @@
     7.5 10.3 lineto
     stroke
   }
+  \def\@anim at btnresetbg{% Reset-button background for dvisvgm
+    6.5 1 moveto
+    1 1 1 6.5 2 arct
+    1 6.5 lineto
+    1 14 6.5 14 2 arct
+    6.5 14 lineto
+    14 14 14 6.5 2 arct
+    14 6.5 lineto
+    14 1 6.5 1 2 arct
+    closepath
+    \@anim at bg\space fill
+  }
   \def\@anim at btnreset{%
-    \@anim at fg\space
     0.5 setlinewidth
     1 setlinecap
     1 setlinejoin
@@ -784,9 +791,10 @@
     14 6.5 lineto
     14 1 6.5 1 2 arct
     closepath
-    \ifx\empty\@anim at bg\empty\else
-      gsave \@anim at bg\space fill grestore
-    \fi
+    \ifx\empty\@anim at bg\empty\else\if at anim@dvisvgm\else
+      gsave \@anim at bg\space bgfill grestore
+    \fi\fi
+    \@anim at fg\space
     stroke
     %
     1 setlinewidth
@@ -817,39 +825,53 @@
     \ifx\@anim at EndLeft\@anim at arg%
       \@anim at xbutton{EndLeft}{%
         [-1 0 0 1 15 0] concat
-        \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnend}{#2}%
     \fi%
     \ifx\@anim at EndRight\@anim at arg%
       \@anim at xbutton{EndRight}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnend}{#2}%
     \fi%
     \ifx\@anim at Minus\@anim at arg%
       \@anim at xbutton{Minus}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnminus}{#2}%
     \fi%
     \ifx\@anim at PauseLeft\@anim at arg%
       \@anim at xbutton{PauseLeft}{%
         [-1 0 0 1 15 0] concat
-        \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnpause}{#2}%
     \fi%
     \ifx\@anim at PauseRight\@anim at arg%
       \@anim at xbutton{PauseRight}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnpause}{#2}%
     \fi%
     \ifx\@anim at PlayLeft\@anim at arg%
       \@anim at xbutton{PlayLeft}{%
         [-1 0 0 1 15 0] concat
-        \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnplay}{#2}%
     \fi%
     \ifx\@anim at PlayRight\@anim at arg%
       \@anim at xbutton{PlayRight}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnplay}{#2}%
     \fi%
     \ifx\@anim at Plus\@anim at arg%
@@ -856,27 +878,82 @@
       \@anim at xbutton{Plus}{\@anim at btnplus}{#2}%
     \fi%
     \ifx\@anim at Reset\@anim at arg%
-      \@anim at xbutton{Reset}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
-        \@anim at btnreset}{#2}%
+      \if at anim@dvisvgm% Reset btn has filled foreground parts. In dvisvgm, for
+        % filling and setting transparency correctly, BG and FG are treated
+        % separately.
+        \ifcsname btn#1:#2\endcsname\else%
+          \ifx\empty\@anim at bg\empty\else%
+            \@anim at xbutton{ResetBG}{\@anim at btnresetbg}{#2}%
+          \fi%
+          \begingroup%
+            \def\@anim at alpha{}%
+            \@anim at xbutton{ResetFG}{\@anim at btnreset}{#2}%
+          \endgroup%
+          \ifx\empty\@anim at bg\empty\else%
+            \global\setbox\@anim at box=\hbox to \@anim at btnsize {%
+              \vbox to \@anim at btnsize {\vss%
+                \@anim at refxform{\@anim at getkeyval{btnResetBG:#2}}%
+                \@anim at refxform{\@anim at lastxform}%
+              }\hss%
+            }%
+            \@anim at xform{0}{1}{}{}{\@anim at box}%
+          \fi%
+          \@anim at newkey{btn#1:#2}{\@anim at lastxform}%
+        \fi%
+      \else%
+        \@anim at xbutton{Reset}{%
+          \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+          \@anim at btnreset}{#2}%
+      \fi%
     \fi%
     \ifx\@anim at StepLeft\@anim at arg%
       \@anim at xbutton{StepLeft}{%
         [-1 0 0 1 15 0] concat
-        \ifx\@anim at lscape\@anim@@lscape [0 -1 -1 0 15 15] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnstep}{#2}%
     \fi%
     \ifx\@anim at StepRight\@anim at arg%
       \@anim at xbutton{StepRight}{%
-        \ifx\@anim at lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
+        \if at anim@dvisvgm\else\ifx\@anim at lscape\@anim@@lscape
+          [0 1 -1 0 15 0] concat
+        \fi\fi%
         \@anim at btnstep}{#2}%
     \fi%
   }
   \def\@anim at xbutton#1#2#3{% #1: name; #2: stroking commands,
+    % only create if button face doesn't exist yet
     \ifcsname btn#1:#3\endcsname\else% #3: current colour+alpha+ ... combination
-      % only create if button face doesn't exist yet
       \global\setbox\@anim at box=\hbox to 15bp {\vbox to 15bp {\vss%
-        \@anim at literal{}{#2}%
+        \@anim at literal{}{%
+          save
+          \ifx\empty\@anim at alpha\empty%
+            /bgfill {fill} bind def
+          \else\if at anim@dvisvgm
+            /bgfill {fill} bind def
+          \else%
+            /bgfill {%
+              /.setfillconstantalpha where {%
+                pop gsave \@anim at alpha\space .setfillconstantalpha fill
+                1 .setfillconstantalpha newpath fill grestore newpath%
+              }{%
+                /.setopacityalpha where {%
+                  pop gsave \@anim at alpha\space .setopacityalpha fill
+                  1 .setopacityalpha newpath fill grestore newpath%
+                }{%
+                  %Distiller
+                  gsave
+                  mark /ca \@anim at alpha\space/SetTransparency pdfmark fill
+                  mark /ca 1.0 /SetTransparency pdfmark newpath fill
+                  grestore newpath%
+                } ifelse%
+              } ifelse%
+            } bind def
+          \fi\fi%
+          #2
+          restore%
+        }%
       }\hss}%
       \if at anim@dvisvgm%
         \global\setbox\@anim at box=\hbox{%
@@ -884,32 +961,10 @@
       \fi%
       %distill box into XObject
       \@anim at xform{0}{1}{}{%
-        \ifx\empty\@anim at alpha\empty\else%
-          \if at anim@dvisvgm%
-            opacity='\@anim at alpha'%
-          \else%
-            /Group <</S/Transparency>>%
-          \fi%
-        \fi%
+        \ifx\empty\@anim at alpha\empty\else\if at anim@dvisvgm%
+            fill-opacity='\@anim at alpha'%
+        \fi\fi%
       }{\@anim at box}%
-      %nested XObject if transparency is to be added
-      \if at anim@dvisvgm\else%
-        \ifx\empty\@anim at alpha\empty\else%
-          \global\setbox\@anim at box=\hbox to 15bp {\vbox to 15bp {\vss%
-            \@anim at literal{direct}{%
-              /.setopacityalpha where {%
-                %Ghostscript
-                pop \@anim at alpha\space .setopacityalpha%
-              }{%
-                %Distiller
-                mark /CA \@anim at alpha /ca \@anim at alpha /SetTransparency pdfmark%
-              } ifelse%
-            }%
-            \@anim at refxform{\@anim at lastxform}%
-          }\hss}%
-          \@anim at xform{0}{0}{}{}{\@anim at box}%
-        \fi%
-      \fi%
       \@anim at newkey{btn#1:#3}{\@anim at lastxform}%
     \fi%
   }
@@ -940,7 +995,7 @@
     0 j
     100 47 m
     100 103 l
-    S
+    S%
   }
   \def\@anim at btnstep{%
     5 w
@@ -963,7 +1018,7 @@
     55 47 m
     96 75 l
     55 103 l
-    S
+    S%
   }
   \def\@anim at btnplay{%
     5 w
@@ -987,7 +1042,7 @@
     50 40 m
     50 110 l
     100 75 l
-    s
+    s%
   }
   \def\@anim at btnpause{%
     5 w
@@ -1007,7 +1062,7 @@
     20 w
     22 40 m
     22 110 l
-    S
+    S%
   }
   \def\@anim at btnminus{%
     5 w
@@ -1030,7 +1085,7 @@
     0 J
     47 75 m
     103 75 l
-    S
+    S%
   }
   \def\@anim at btnplus{%
     5 w
@@ -1055,7 +1110,7 @@
     103 75 l
     75 47 m
     75 103 l
-    S
+    S%
   }
   \def\@anim at btnreset{%
     5 w
@@ -1079,6 +1134,7 @@
     75 103 l
     S
     \@anim@@@fg\space
+    \ifx\empty\@anim at alpha\empty\else/R2 gs \fi
     35 50 m
     70 75 l
     35 100 l
@@ -1093,7 +1149,7 @@
     35 75 l
     120 75 m
     115 75 l
-    S
+    S%
   }
   \def\@anim at makebutton#1#2{% #1: name ; #2: current colour, alpha, ...
     \edef\@anim at arg{#1}%
@@ -1176,26 +1232,21 @@
   }
   %XObject creation
   \def\@anim at xbutton#1#2#3{% #1 name, #2 stroking commands, #3 @anim at num
-    \ifcsname btn#1:#3\endcsname\else% only create if button face doesn't
-      \@anim at streamobj{%                                      % exist yet
-        /Type/XObject/Subtype/Form/BBox [0 0 15 15]
+    \ifcsname btn#1:#3\endcsname\else% only create if button face doesn't% exist yet
+      \edef\@anim at arg{#1}%
+      \@anim at streamobj{%
+        /Type/XObject/Subtype/Form/BBox [0 0 15 15]%
         \ifx\empty\@anim at alpha\empty\else%
-          /Group <</S/Transparency>>%
-        \fi%
-      }{#2}%
-      \ifx\empty\@anim at alpha\empty\else%
-        \@anim at streamobj{%
-          /Type/XObject/Subtype/Form/BBox [0 0 15 15]%
           /Resources <<%
             /ExtGState <<%
-              /R1 <<%
-                /Type/ExtGState/ca \@anim at alpha/CA \@anim at alpha/AIS false%
-              >>%
+              /R1 <</Type/ExtGState/ca \@anim at alpha>>%
+              \ifx\@anim at Reset\@anim at arg%
+                /R2 <</Type/ExtGState/ca 1.0>>%
+              \fi%
             >>%
-            /XObject <</R2 \@anim at lastobj>>%
           >>%
-        }{/R1 gs /R2 Do}%
-      \fi%
+        \fi%
+      }{\ifx\empty\@anim at alpha\empty\else/R1 gs\fi\space #2}%
       \@anim at newkey{btn#1:#3}{\@anim at lastobj}%
     \fi%
   }
@@ -1527,6 +1578,7 @@
     \let\input at path\Ginput at path%
   \fi%
   \setkeys{anim at user}{#1}%
+  \ifx\empty\@anim at bg\empty\xdef\@anim at alpha{}\fi%
   \xdef\@anim at btnsize{\the\dimexpr\@anim at btnsize\relax}%
   %correct wrong option combination; totalheight overrides height
   \ifnum\@anim at resizeflags=3\relax% height+totalheight->totalheight
@@ -1662,11 +1714,12 @@
     \if at anim@export\else%
       % insert <script> part
       \if at anim@dvisvgm\@anim at script{\the\@anim at num}\fi%
-      \@anim at insertwidgets{\the\@anim at num}{%
+      \edef\@anim at btnattrs{%
         \@anim at bgcolour:\@anim at fgcolour:\@anim at alpha%
         \if at anim@dvisvgm:\@anim at btnsize:\@anim at abspage\fi%
         \@anim at lscape%
       }%
+      \@anim at insertwidgets{\the\@anim at num}{\@anim at btnattrs}%
     \fi%
   \fi%
   \@anim at endLTR%
@@ -1962,7 +2015,7 @@
       \@anim at annot{\@anim at btnsize}{\@anim at btnsize}{\z@}{%
         cursor='pointer' onmousedown='\@anim at btnJS{#1}{\@anim at arg}'%
       }%
-      \@anim at updatebbox{\@anim at btnsize}{\@anim at btnsize}{\z@}%
+      \@anim at updatebbox{\@anim at btnsize}{\@anim at btnsize}{0pt}%
       \hbox to \@anim at btnsize {%
         \vrule width \z@ height \@anim at btnsize depth \z@%
         \hss%
@@ -2048,6 +2101,7 @@
     \let\input at path\Ginput at path%
   \fi%
   \setkeys{anim at user}{#1}%
+  \ifx\empty\@anim at bg\empty\xdef\@anim at alpha{}\fi%
   \xdef\@anim at btnsize{\the\dimexpr\@anim at btnsize\relax}%
   %correct wrong option combination; totalheight overrides height
   \ifnum\@anim at resizeflags=3\relax% height+totalheight->totalheight
@@ -2108,11 +2162,12 @@
     \if at anim@export\else%
       % insert <script> part
       \if at anim@dvisvgm\@anim at script{\the\@anim at num}\fi%
-      \@anim at insertwidgets{\the\@anim at num}{%
+      \edef\@anim at btnattrs{%
         \@anim at bgcolour:\@anim at fgcolour:\@anim at alpha%
         \if at anim@dvisvgm:\@anim at btnsize:\@anim at abspage\fi%
         \@anim at lscape%
       }%
+      \@anim at insertwidgets{\the\@anim at num}{\@anim at btnattrs}%
     \fi%
     % if last frame used as poster, write frame num to aux file
     \ifnum\@anim at poster=\@anim at mone\relax%



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