summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty111
1 files changed, 43 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 16e12d96cbe..4acddc7ee15 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{2017/09/22}
+\def\@anim@version{2017/09/29}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -71,7 +71,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{pdfbase}%low level PDF operations
-\@ifpackagelater{pdfbase}{2017/03/23}{}{
+\@ifpackagelater{pdfbase}{2017/09/29}{}{
\PackageError{animate}{%
Support package `pdfbase.sty' too old.%
}{%
@@ -80,21 +80,25 @@
}%
}
\ExplSyntaxOn
+ \let\@anim@literal\pbs_literal:nn
+
\def\@anim@dictobj#1{
\pbs_pdfobj:nnn{}{dict}{#1}
\xdef\@anim@lastobj{\pbs_pdflastobj:}
}
+
\def\@anim@arrayobj#1{
\pbs_pdfobj:nnn{}{array}{#1}
\xdef\@anim@lastobj{\pbs_pdflastobj:}
}
+
\def\@anim@streamobj#1#2{
\pbs_pdfobj:nnn{}{stream}{{#1}{#2}}
\xdef\@anim@lastobj{\pbs_pdflastobj:}
}
- \def\@anim@xform#1#2#3#4{
- \pbs_pdfxform:nnnnn{#1}{#2}{}{#3}{#4}
+ \def\@anim@xform#1#2#3#4#5{
+ \pbs_pdfxform:nnnnn{#1}{#2}{#3}{#4}{#5}
\xdef\@anim@lastxform{\pbs_pdflastxform:}
}
@@ -319,7 +323,7 @@
%create form xobject from box argument
\ifthenelse{\equal{#4}{!}}{% %%%% new graphics %%%%
%put graphics into XObject
- \@anim@xform{1}{0}{}{#3}%
+ \@anim@xform{1}{0}{}{}{#3}%
\xdef\@anim@@lastxform{\@anim@lastxform}%
\@anim@newkey{natdims:\@anim@lastxform}{%
{\@anim@curwd}{\@anim@curht}{\@anim@curdp}%
@@ -342,7 +346,7 @@
}{\raisebox{\depth}{\box#3}}%
}%
}%
- \@anim@xform{0}{0}{}{#3}%
+ \@anim@xform{0}{0}{}{}{#3}%
\fi%
\fi%
%keep a record of XObject number
@@ -386,7 +390,7 @@
\fi%
\fi%
\ifcase\@anim@method% icon based
- \@anim@xform{0}{1}{}{\@anim@box}%
+ \@anim@xform{0}{1}{}{}{\@anim@box}%
%initial visibility
\ifnum\@anim@poster>\@anim@mtwo\relax% insert poster frame
\ifnum#2=\@anim@poster\relax%
@@ -425,7 +429,7 @@
\fi%
\fi%
%frame insertion
- \@anim@xform{0}{1}{}{\@anim@box}%
+ \@anim@xform{0}{1}{}{}{\@anim@box}%
\@anim@pdfwid{\@anim@animwidth}{\@anim@animheight}{\@anim@animdepth}{%
/Subtype/Widget%
\@anim@annotflag%
@@ -468,12 +472,12 @@
\fi%
%frame insertion
% % marked content method
-% \@anim@xform{0}{0}{}{\@anim@box}%
+% \@anim@xform{0}{0}{}{}{\@anim@box}%
% \ocgbase@oc@bdc{\@anim@curocg}%
% \@anim@refxform{\@anim@lastxform}%
% \ocgbase@oc@emc%
% /OC method
- \@anim@xform{0}{0}{/OC \@anim@curocg}{\@anim@box}%
+ \@anim@xform{0}{0}{}{/OC \@anim@curocg}{\@anim@box}%
\@anim@refxform{\@anim@lastxform}%
\fi%
}
@@ -713,60 +717,31 @@
\ifx\@anim@lscape\@anim@@lscape [0 1 -1 0 15 0] concat \fi%
\@anim@btnstep}{#1}%
}
- \newcount\@anim@objnum
\def\@anim@xbutton#1#2#3{% #1: name; #2: stroking commands, #3 @anim@num
- \special{ps:
- gsave [1 0 0 1 0 0] setmatrix
- mark
- /_objdef {@anm@obj\the\@anim@objnum}/BBox [0 0 15 15]
- \ifx\empty\@anim@alpha\empty\else
- product (Distiller) search {
- pop pop pop
- /Group <</S/Transparency>>
- }{pop}ifelse
- \fi
- /BP pdfmark
- {
- %landscape mode (powerdot, geometry /w landscape option)
- isls{
- [0 -1 1 0 0 15] concat % rotate by 270 degrees
- [-1 0 0 1 15 0] concat% flip around vertical axis
- }if
- #2
- }?pdfmark
- mark /EP pdfmark
- \ifx\empty\@anim@alpha\empty\else
- product (Ghostscript) search {
- pop pop pop
- mark {@anm@obj\the\@anim@objnum} <<
- /Group <</S/Transparency>>
- >> /PUT pdfmark
- }{pop}ifelse
- \fi
- grestore
- }%
- %nested XObject if transparency is added
+ \global\setbox\@anim@box=\hbox to 15bp {\vbox to 15bp {\vss%
+ \@anim@literal{}{#2}%
+ }\hss}%
+ %distill box into XObject
+ \@anim@xform{0}{1}{}{%
+ \ifx\empty\@anim@alpha\empty\else/Group <</S/Transparency>>\fi%
+ }{\@anim@box}%
+ %nested XObject if transparency is to be added
\ifx\empty\@anim@alpha\empty\else%
- \edef\@anim@objnum@last{\the\@anim@objnum}%
- \global\advance\@anim@objnum by \@ne%
- \special{ps:
- gsave [1 0 0 1 0 0] setmatrix
- mark /_objdef {@anm@obj\the\@anim@objnum}/BBox [0 0 15 15]/BP pdfmark
- \@anim@alpha
- {product (Distiller) search {
- pop pop pop
- mark /CA \@anim@alpha /ca \@anim@alpha /SetTransparency pdfmark
- }{
- pop
- /.setopacityalpha where {pop .setopacityalpha}{pop} ifelse
- }ifelse} ?pdfmark
- mark {@anm@obj\@anim@objnum@last} /SP pdfmark
- mark /EP pdfmark
- grestore
- }%
- \fi%
- \@anim@newkey{btn#1:#3}{{@anm@obj\the\@anim@objnum}}%
- \global\advance\@anim@objnum by \@ne%
+ \global\setbox\@anim@box=\hbox to 15bp {\vbox to 15bp {\vss%
+ \@anim@literal{direct}{%
+ /.setopacityalpha where {%
+ %Ghostscript
+ pop \@anim@alpha\space .setopacityalpha%
+ }{%
+ %Distiller
+ mark /CA \@anim@alpha /ca \@anim@alpha /SetTransparency pdfmark%
+ } ifelse%
+ }%
+ \@anim@refxform{\@anim@lastxform}%
+ }\hss}%
+ \@anim@xform{0}{0}{}{}{\@anim@box}%
+ \fi%
+ \@anim@newkey{btn#1:#3}{\@anim@lastxform}%
}
\else %pdftex/dvipdfmx/xetex
%stroking commands
@@ -1018,14 +993,14 @@
\@anim@streamobj{%
/Type/XObject/Subtype/Form/BBox [0 0 15 15]%
/Resources <<%
- /XObject <</R1 \@anim@lastobj>>%
/ExtGState <<%
- /R2 <<%
+ /R1 <<%
/Type/ExtGState/ca \@anim@alpha/CA \@anim@alpha/AIS false%
>>%
>>%
+ /XObject <</R2 \@anim@lastobj>>%
>>%
- }{/R2 gs /R1 Do Q}%
+ }{/R1 gs /R2 Do}%
\fi%
\@anim@newkey{btn#1:#3}{\@anim@lastobj}%
}
@@ -1618,7 +1593,7 @@
\ifnum\@anim@poster=\@anim@mtwo\relax%
\ifdefined\@anim@apdummy\else% empty appearance widget
\setbox\@anim@box=\hbox{\phantom{x}}%
- \@anim@xform{0}{0}{}{\@anim@box}%
+ \@anim@xform{0}{0}{}{}{\@anim@box}%
\xdef\@anim@apdummy{\@anim@lastxform}%
\@anim@pdfwid{1ex}{1ex}{\z@}{%
/Subtype/Widget%
@@ -1637,7 +1612,7 @@
\else%
\ifdefined\@anim@apdummy\else% empty appearance dummy
\setbox\@anim@box=\hbox{\phantom{x}}%
- \@anim@xform{0}{0}{}{\@anim@box}%
+ \@anim@xform{0}{0}{}{}{\@anim@box}%
\xdef\@anim@apdummy{\@anim@lastxform}%
\fi%
\def\@anim@apmk{\@anim@apdummy}%
@@ -1701,7 +1676,7 @@
\if@anim@mk\else%
\ifdefined\@anim@apdummy\else% empty appearance dummy
\setbox\@anim@box=\hbox{\phantom{x}}%
- \@anim@xform{0}{0}{}{\@anim@box}%
+ \@anim@xform{0}{0}{}{}{\@anim@box}%
\xdef\@anim@apdummy{\@anim@lastxform}%
\fi%
\fi%