diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r-- | Master/texmf-dist/tex/latex/animate/animate.sty | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty index caa4574eecb..a492a7677d7 100644 --- a/Master/texmf-dist/tex/latex/animate/animate.sty +++ b/Master/texmf-dist/tex/latex/animate/animate.sty @@ -11,9 +11,9 @@ % Supports LaTeX->dvips->ps2pdf, (Xe)LaTeX->(x)dvipdfmx, LuaLaTeX, % pdfLaTeX and LaTeX->dvisvgm workflows. -\NeedsTeXFormat{LaTeX2e} +\NeedsTeXFormat{LaTeX2e}[2020-10-01] -\def\@anim@version{2020/10/07} +\def\@anim@version{2021/06/11} \ProvidesPackage{animate} [\@anim@version\space PDF & SVG animations from files and inline graphics] @@ -187,6 +187,9 @@ } \let\@anim@fpeval\fp_eval:n + +%hashing object references of embedded files to avoid multiple inclusion +\let\@anim@pdfmdfivesum\file_mdfive_hash:n \ExplSyntaxOff \if@anim@dvisvgm @@ -235,24 +238,6 @@ \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%\pdfmdfivesum is used for hashing object references of embedded files based -%on their MD5 digest (in order to avoid multiple inclusion); if it is not -%available, hashing will be based on the file name -\ifluatex - \RequirePackage{pdftexcmds} - \let\@anim@pdfmdfivesum\pdf@filemdfivesum -\else - \ifcsname pdfmdfivesum\endcsname - \def\@anim@pdfmdfivesum#1{\pdfmdfivesum file {#1}} - \else - \ifcsname mdfivesum\endcsname - \def\@anim@pdfmdfivesum#1{\mdfivesum file {#1}} - \else - \def\@anim@pdfmdfivesum#1{#1} - \fi - \fi -\fi - %creating and using global definitions \def\@anim@newkey#1#2{{\expandafter\xdef\csname#1\endcsname{#2}}} \def\@anim@getkeyval#1{\ifcsname#1\endcsname\csname#1\endcsname\fi} @@ -1554,9 +1539,11 @@ \fi% \begingroup% %store current abs. page num in macro \@anim@abspage - \zref@labelbyprops{anim@abspage\the\@anim@num}{abspage}% - \zref@def@extractdefault{\@anim@abspage}{% - anim@abspage\the\@anim@num}{abspage}{-1}% + \if@anim@dvisvgm\if@anim@draft\else% + \zref@labelbyprops{anim@abspage\the\@anim@num}{abspage}% + \zref@def@extractdefault{\@anim@abspage}{% + anim@abspage\the\@anim@num}{abspage}{-1}% + \fi\fi% \@anim@beginLTR% \ifcsname Ginput@path\endcsname% make use of graphic[xs] search path \let\input@path\Ginput@path% @@ -2078,9 +2065,11 @@ \fi% \begingroup% %store current abs. page num in macro \@anim@abspage - \zref@labelbyprops{anim@abspage\the\@anim@num}{abspage}% - \zref@def@extractdefault{\@anim@abspage}{% - anim@abspage\the\@anim@num}{abspage}{-1}% + \if@anim@dvisvgm\if@anim@draft\else% + \zref@labelbyprops{anim@abspage\the\@anim@num}{abspage}% + \zref@def@extractdefault{\@anim@abspage}{% + anim@abspage\the\@anim@num}{abspage}{-1}% + \fi\fi% \@anim@beginLTR% \ifdefined\NoHyper\NoHyper\fi% silently suppress any hyperref specials \ifcsname Ginput@path\endcsname% make use of graphic[xs] search path @@ -4240,20 +4229,20 @@ if(a#1_idx==\@anim@maxframe)a#1_playsRight=false;$% if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}% \else - var a#1_doplay=true;$% + var doplay=true;$% if(a#1_idx==\@anim@maxframe&&a#1_playsRight){% a#1_stopFirst();% \if@anim@pauseframes - if(a#1_pauseAt[a#1_idx]){a#1_pause();a#1_doplay=false;}% + if(a#1_pauseAt[a#1_idx]){a#1_pause();doplay=false;}% \fi% }$% if(a#1_idx==0&&!a#1_playsRight){% a#1_stopLast();% \if@anim@pauseframes - if(a#1_pauseAt[a#1_idx]){a#1_pause();a#1_doplay=false;}% + if(a#1_pauseAt[a#1_idx]){a#1_pause();doplay=false;}% \fi% }$% - if(a#1_doplay){% + if(doplay){% if(a#1_playsRight){a#1_playRight();}else{a#1_playLeft();}% }$% \fi |