diff options
author | Karl Berry <karl@freefriends.org> | 2016-02-05 23:33:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-02-05 23:33:14 +0000 |
commit | 3aae4432d377922d7bb16a3d21568878c05004c4 (patch) | |
tree | 2abe2dbccbf3db902d6a0d97f3e566e0affd99d5 /Master/texmf-dist/tex | |
parent | 5f82e5742529dd68459b28000f95cac7acd7d57a (diff) |
animate (5feb16)
git-svn-id: svn://tug.org/texlive/trunk@39586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/animate/animate.sty | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty index d12b6fcab69..13e8954f0ca 100644 --- a/Master/texmf-dist/tex/latex/animate/animate.sty +++ b/Master/texmf-dist/tex/latex/animate/animate.sty @@ -13,7 +13,7 @@ \NeedsTeXFormat{LaTeX2e} -\def\@anim@version{2016/02/02} +\def\@anim@version{2016/02/04} \ProvidesPackage{animate} [\@anim@version\space PDF animations from files and inline graphics] @@ -551,7 +551,7 @@ \def\@anim@refobj#1{#1} \def\@anim@xform#1#2#3{%#1 not used, #2 used as appearance ? 1:0, #3 boxnum - \ifnum\@anim@method=\z@% icon based && dvips kill links in document + \ifnum\@anim@method=\z@\relax% icon based && dvips kill links in document \ifdefined\hypersetup% \ifdefined\@anim@icondvipswarned\else% \AtEndDocument{% @@ -561,7 +561,7 @@ \fi% \fi% \fi% - \ifnum\@anim@method<\tw@% icon based && widget based + \ifnum\@anim@method<\tw@\relax% icon based && widget based \ifdefined\@anim@@dpiwarning\else% %determine DVI resolution and output warning message if too high \AtEndDvi{\special{ps:\@anim@dpiwarning}}% @@ -647,9 +647,11 @@ } \def\@anim@refxform#1{% #1: xform obj ID \special{ps: + gsave currentpoint pop \@anim@getkeyval{origin:#1} pop sub currentpoint exch pop \@anim@getkeyval{origin:#1} exch pop sub translate mark #1 /SP pdfmark + grestore }% } @@ -687,7 +689,7 @@ \edef\@anim@curwd{\strip@pt\wd#3}% \edef\@anim@curht{\strip@pt\ht#3}% \edef\@anim@curdp{\strip@pt\dp#3}% - \ifnum#2=\z@% + \ifnum#2=\z@\relax% %nat. dims of zeroth frame \xdef\@anim@zframewd{\@anim@curwd}% \xdef\@anim@zframeht{\@anim@curht}% @@ -712,9 +714,9 @@ }{% \xdef\@anim@lastxform{#4}% }% - \ifnum#2>\z@% + \ifnum#2>\z@\relax% %adjust size of current frame to zeroth frame's dims, if necessary - \ifnum\@anim@needresize>\z@% + \ifnum\@anim@needresize>\z@\relax% \global\setbox#3=\hbox to \@anim@curwd\p@{% \vrule width \z@ height \@anim@curht\p@ depth \@anim@curdp\p@% \@anim@refxform{\@anim@lastxform}% @@ -762,11 +764,11 @@ \ifcase\@anim@method% icon based \@anim@xform{0}{1}{\@anim@box}% %initial visibility - \ifnum\@anim@poster>\@anim@mtwo% insert poster frame - \ifnum#2=\@anim@poster% + \ifnum\@anim@poster>\@anim@mtwo\relax% insert poster frame + \ifnum#2=\@anim@poster\relax% \edef\@anim@posterap{\@anim@lastxform}% \else% - \ifnum\@anim@poster=\@anim@mone% use last frame as poster + \ifnum\@anim@poster=\@anim@mone\relax% use last frame as poster \edef\@anim@posterap{\@anim@lastxform}% \fi% \fi% @@ -780,8 +782,8 @@ \or% widget based %initial visibility \def\@anim@annotflag{/F 2}% default: hidden - \ifnum\@anim@poster>\@anim@mtwo% insert poster frame - \ifnum#2=\@anim@poster% + \ifnum\@anim@poster>\@anim@mtwo\relax% insert poster frame + \ifnum#2=\@anim@poster\relax% \def\@anim@annotflag{/F 4}% not hidden + print (4) \else% \ifnum\@anim@poster=\@anim@mone\relax% use last frame as poster @@ -817,7 +819,7 @@ \ocgbase@add@to@off@list{\@anim@curocg}% }% \else% - \ifnum#2=\@anim@poster\else% + \ifnum#2=\@anim@poster\relax\else% \ocgbase@add@to@off@list{\@anim@curocg}% \fi% \fi% @@ -2057,6 +2059,9 @@ \ifdefined\NoHyper\NoHyper\fi% silently suppress any hyperref specials \let\newframe\@anim@@newframe% \let\multiframe\@anim@multiframe% + \let\PDFXForm\@gobble% suppress any of these inside `animateinline' + \let\PDFRefXForm\@gobble% + \let\PDFLastXForm\relax% \@anim@beginframe% \ignorespaces% }{% @@ -3262,6 +3267,32 @@ \def\@anim@@method{\@ne} \fi\fi +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% useful macros for XObject generation and usage +% \PDFXForm, \PDFRefXForm, \PDFLastXForm modelled after +% PDFTeX's builtins \pdfxform, \pdfrefxform, \pdflastxform +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\PDFXForm#1{% #1 box number + \begingroup% + \edef\@anim@mywd{\the\wd#1}% + \edef\@anim@myht{\the\ht#1}% + \edef\@anim@mydp{\the\dp#1}% + \@anim@reset\@anim@xform{}{0}{#1}% + \global\let\PDFLastXForm\@anim@lastxform% + \expandafter\xdef\csname xform.\pdfLastXForm.wd\endcsname{\@anim@mywd}% + \expandafter\xdef\csname xform.\pdfLastXForm.ht\endcsname{\@anim@myht}% + \expandafter\xdef\csname xform.\pdfLastXForm.dp\endcsname{\@anim@mydp}% + \endgroup% +} +\def\PDFRefXForm#1{% #1 PDF XForm Object identifier + \makebox[\csname xform.#1.wd\endcsname][l]{% + \rule{0pt}{\csname xform.#1.ht\endcsname}% + \rule{0pt}{-\csname xform.#1.dp\endcsname}% + \@anim@refxform{#1}% + }% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %process package options \def\@anim@setpkgkeys#1{\setkeys{anim@pkg}{#1}} \edef\@anim@pkgopts{{\@ptionlist{\@currname.\@currext}}} |