summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-25 23:12:41 +0000
committerKarl Berry <karl@freefriends.org>2013-09-25 23:12:41 +0000
commitdf875ee0d3762dc9481bc960c1aef30b6ad85d00 (patch)
treeb44d4a30efb17c5b3c2c0cc6381ad89208fd74fb /Master/texmf-dist/tex/latex/animate
parent3c9c77c6de7e3cf26c042df0133dd9ce452d7fee (diff)
animate (25sep13)
git-svn-id: svn://tug.org/texlive/trunk@31766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty80
1 files changed, 34 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 13f1b883eff..d493f0fa054 100644
--- a/Master/texmf-dist/tex/latex/animate/animate.sty
+++ b/Master/texmf-dist/tex/latex/animate/animate.sty
@@ -12,7 +12,7 @@
\NeedsTeXFormat{LaTeX2e}
-\def\@anim@version{2013/07/19}
+\def\@anim@version{2013/09/24}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -37,14 +37,11 @@
\setboolean{@anim@powerdot}{false}
\@ifclassloaded{powerdot}{\setboolean{@anim@powerdot}{true}}{}%
-%driver options + powerdot's `clock' option (the only package options
-%we process immediately)
+%driver options (the only package options we process immediately)
\newboolean{@anim@@dvips}
\setboolean{@anim@@dvips}{false}
\newboolean{@anim@@dvipdfmx}
\setboolean{@anim@@dvipdfmx}{false}
-\newboolean{@anim@pdclock} %for compatibility with powerdot
-\setboolean{@anim@pdclock}{false}
\ifpdf\else
\setboolean{@anim@@dvips}{true}% default dvi mode
\setboolean{@anim@@dvipdfmx}{false}
@@ -60,9 +57,6 @@
\setboolean{@anim@@dvipdfmx}{true}
\setboolean{@anim@@dvips}{false}
}
- \DeclareOption{clock}{% for global `clock' option given to powerdot
- \setboolean{@anim@pdclock}{true}
- }
\fi
\newboolean{@anim@xetex}
\setboolean{@anim@xetex}{false}
@@ -97,8 +91,35 @@
be embedded using pdfTeX%
}
}}
+ %macro for adding AcroForm entry to PDF Catalog
+ \def\@anim@acroform{%
+ \ifdefined\Acro@Form@added\else%
+ \pdfcatalog{/AcroForm<</Fields []/NeedAppearances true>>}%
+ \gdef\Acro@Form@added{}%
+ \fi%
+ }
\else
- \if@anim@@dvipdfmx\else % dvips
+ \if@anim@@dvipdfmx
+ %macro for adding AcroForm entry to PDF Catalog
+ \def\@anim@acroform{%
+ \ifdefined\Acro@Form@added\else%
+ \special{pdf:put @catalog <<%
+ /AcroForm<</Fields []/NeedAppearances true>>>>}%
+ \gdef\Acro@Form@added{}%
+ \fi%
+ }
+ \else % dvips
+ %macro for adding AcroForm entry to PDF Catalog
+ \def\@anim@acroform{%
+ \ifdefined\Acro@Form@added\else%
+ \special{ps:
+ mark {Catalog} <<%
+ /AcroForm <</Fields []/NeedAppearances true>>%
+ >> /PUT pdfmark
+ }%
+ \gdef\Acro@Form@added{}%
+ \fi%
+ }
%if geometry package is loaded, execute `\geometry{dvips}' right before
% `\begin{document}'
\let\@anim@document\document
@@ -224,11 +245,8 @@
\newboolean{@anim@timeline} %true if `timeline' option is set
\newboolean{@anim@multipage} % multipage document?
-%add AcroForm and OCProperties entries to Catalog
+%add OCProperties entries to Catalog
\ifpdf
- %\newcount\@anim@@fields
- %\pdfobj reserveobjnum
- %\@anim@@fields=\pdflastobj
\newcount\@anim@@ocgs
\pdfobj reserveobjnum
\@anim@@ocgs=\pdflastobj
@@ -236,8 +254,6 @@
\pdfobj reserveobjnum
\@anim@@offocgs=\pdflastobj
\pdfcatalog{
- %/AcroForm <</Fields \the\@anim@@fields\space 0 R/NeedAppearances true>>
- /AcroForm <</Fields []/NeedAppearances true>>
/OCProperties <<
/OCGs \the\@anim@@ocgs\space 0 R
/D <<
@@ -245,13 +261,9 @@
>>
>>
}
- %\def\@anim@fields{}
\def\@anim@ocgs{}
\def\@anim@offocgs{}
\AtEndDocument{%
- %\immediate\pdfobj useobjnum \@anim@@fields {%
- % [\@anim@fields]%
- %}%
\immediate\pdfobj useobjnum \@anim@@ocgs {%
[\@anim@ocgs]%
}%
@@ -263,25 +275,17 @@
%counts inserted widget annots
\newcount\@anim@fieldnum\@anim@fieldnum=\z@%
\if@anim@@dvipdfmx
- %array which takes refs to all widget annotations
- %\special{pdf:obj @anim@fields [ ]}
%array which takes all ocgs (one per animation frame)
\special{pdf:obj @anim@ocgs [ ]}
%array which takes ocgs shown by default (the poster frames)
\special{pdf:obj @anim@offocgs [ ]}
\special{pdf:put @catalog <<
- %/AcroForm <</Fields @anim@fields/NeedAppearances true>>
- /AcroForm <</Fields []/NeedAppearances true>>
/OCProperties <<
/OCGs @anim@ocgs
/D <</BaseState/ON /OFF @anim@offocgs>>
>>
>>}
\else
- %\def\@anim@fields{@anim@fields}
- %\if@anim@powerdot\if@anim@pdclock
- % \def\@anim@fields{afields}
- %\fi\fi
\special{ps:
mark /_objdef {@anim@ocgs} /type/array /OBJ pdfmark
mark /_objdef {@anim@offocgs} /type/array /OBJ pdfmark
@@ -292,15 +296,6 @@
>>
>> /PUT pdfmark
}
- \ifthenelse{\boolean{@anim@powerdot}\AND\boolean{@anim@pdclock}}{}{
- \special{ps:
- %mark /_objdef {\@anim@fields} /type/array /OBJ pdfmark
- mark {Catalog} <<
- %/AcroForm <</Fields {\@anim@fields}/NeedAppearances true>>
- /AcroForm <</Fields []/NeedAppearances true>>
- >> /PUT pdfmark
- }
- }
\fi
\fi
@@ -654,7 +649,6 @@
/AP <</N \the\pdflastxform\space 0 R>>%
/T (#1.#2)%
}%
- %\xdef\@anim@fields{\@anim@fields\space\the\pdflastannot\space 0 R}%
}
\else
\if@anim@@dvipdfmx
@@ -716,7 +710,6 @@
/T (#1.#2)%
>>%
}%
- %\special{pdf:put @anim@fields @annot@\the\@anim@fieldnum}%
\global\advance\@anim@fieldnum by \@ne%
}
\else
@@ -793,7 +786,6 @@
/AP <</N {@anim@anmfrm@#1@#2}>>%
/T (#1.#2)%
/ANN pdfmark
- %mark {\@anim@fields} {annot@\the\@anim@fieldnum} /APPEND pdfmark
}%
\global\advance\@anim@fieldnum by \@ne%
}
@@ -1776,8 +1768,7 @@
\@anim@otherjscriptkey%
>>%
}%
- %append widget reference to Fields array of the AcroForm dict
- %\xdef\@anim@fields{\@anim@fields\space\the\pdflastannot\space 0 R}%
+ \@anim@acroform%
\hbox to \@anim@animwidth\p@ {%
\vrule width 0pt height \@anim@animheight\p@ depth \@anim@animdepth\p@%
\hss%
@@ -1805,7 +1796,7 @@
>>
>>%
}%
- %\special{pdf:put @anim@fields @annot@\the\@anim@fieldnum}%
+ \@anim@acroform%
\global\advance\@anim@fieldnum by \@ne%
\hbox to \@anim@animwidth\p@ {%
\vrule width 0pt height \@anim@animheight\p@ depth \@anim@animdepth\p@%
@@ -1849,8 +1840,8 @@
\@anim@otherjscriptkey%
>>%
/ANN pdfmark
- %mark {\@anim@fields} {annot@\the\@anim@fieldnum} /APPEND pdfmark
}%
+ \@anim@acroform%
\global\advance\@anim@fieldnum by \@ne%
\hbox to \@anim@animwidth\p@ {%
\vrule width 0pt height \@anim@animheight\p@ depth \@anim@animdepth\p@%
@@ -1880,7 +1871,6 @@
\@anim@tooltip%
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
}%
- %\xdef\@anim@fields{\@anim@fields\space\the\pdflastannot\space 0 R}%
\vrule width 0pt height \@anim@tmpdima depth 0pt%
\hss%
}%
@@ -1904,7 +1894,6 @@
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
>>%
}%
- %\special{pdf:put @anim@fields @annot@\the\@anim@fieldnum}%
\global\advance\@anim@fieldnum by \@ne%
\vrule width 0pt height \@anim@tmpdima depth 0pt%
\hss%
@@ -1942,7 +1931,6 @@
\@anim@tooltip%
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
/ANN pdfmark
- %mark {\@anim@fields} {annot@\the\@anim@fieldnum} /APPEND pdfmark
}%
\global\advance\@anim@fieldnum by \@ne%
\hbox to \the\@anim@tmpdima {%