summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-01 22:14:08 +0000
committerKarl Berry <karl@freefriends.org>2015-11-01 22:14:08 +0000
commit88cec4fd84673a2e6336d375cd43c316b3acad48 (patch)
treee92ad62d89841ef41e69db3e1039e4745c00a4ee /Master/texmf-dist/tex/latex/animate
parent6814d757e06f69d1b3f413c7f9beb948d06fe3ad (diff)
animate (1nov15)
git-svn-id: svn://tug.org/texlive/trunk@38758 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty138
1 files changed, 21 insertions, 117 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 09bcd4dc38b..fbb7c1a9b31 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{2015/08/28}
+\def\@anim@version{2015/10/28}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -57,10 +57,12 @@
\DeclareOption{dvipdfmx}{%
\setboolean{@anim@dvipdfmx}{true}
\setboolean{@anim@dvips}{false}
+ \PassOptionsToPackage{dvipdfmx}{ocgbase}
}
\DeclareOption{xetex}{%
\setboolean{@anim@dvipdfmx}{true}
\setboolean{@anim@dvips}{false}
+ \PassOptionsToPackage{xetex}{ocgbase}
}
\fi
\newboolean{@anim@xetex}
@@ -74,6 +76,8 @@
\DeclareOption*{}\ProcessOptions*\relax %allow anything as an option
%(remaining package options will be processed near end of this file)
+\RequirePackage{ocgbase} %OCG generating and configuration macros
+
\ifpdf
%test for correct pdfTeX version
\ifluatex\else
@@ -191,7 +195,7 @@
%macro for writing global defs to external *.aux file
\def\@anim@keytoaux#1#2{%
- \@bsphack\protected@write\@auxout{}{%
+ \@bsphack\protected@write\@mainaux{}{%
\string\@anim@newkey{#1}{#2}%
}\@esphack%
\ifcsname#1\endcsname\else%
@@ -235,13 +239,9 @@
}{}%
}
-%macros for adding Appearances name tree / AcroForm / OCProperties dicts to
-%PDF Catalog
+%macros for adding Appearances name tree / AcroForm dicts to PDF Catalog
\def\@anim@appearances{}
\ifdefined\@anim@fields\else\def\@anim@fields{}\fi %takes Field object refs
-\ifdefined\@ocgbase@ocgs\else\def\@ocgbase@ocgs{}\fi %takes ocg object refs
-\ifdefined\@ocgbase@offocgs\else\def\@ocgbase@offocgs{}\fi
-\ifdefined\@ocgbase@ocgorder\else\def\@ocgbase@ocgorder{}\fi
\ifpdf
%Appearance name tree
\AtEndDvi{%
@@ -264,34 +264,6 @@
}%
\gdef\Acro@Form@added{}%
\fi%
- %OCProperties dict
- \ifdefined\oc@props@added\else%
- \AtEndDvi{%
- \ifx\empty\@ocgbase@ocgs\empty\else%
- \immediate\pdfobj{[\@ocgbase@ocgs]}%
- \edef\@ocgbase@@ocgs{\the\pdflastobj}%
- \immediate\pdfobj{[\@ocgbase@offocgs]}%
- \edef\@ocgbase@@offocgs{\the\pdflastobj}%
- \immediate\pdfobj{[\@ocgbase@ocgorder]}%
- \edef\@ocgbase@@ocgorder{\the\pdflastobj}%
- \pdfcatalog{%
- /OCProperties <<%
- /OCGs \@ocgbase@@ocgs\space 0 R%
- /D <<%
- /BaseState/ON /OFF \@ocgbase@@offocgs\space 0 R%
- /Order \@ocgbase@@ocgorder\space 0 R/ListMode/VisiblePages%
- /AS [%
- <</Event/View /Category[/View] /OCGs \@ocgbase@@ocgs\space 0 R>>%
- <</Event/Print /Category[/Print] /OCGs \@ocgbase@@ocgs\space 0 R>>%
- <</Event/Export/Category[/Export]/OCGs \@ocgbase@@ocgs\space 0 R>>%
- ]%
- >>%
- >>%
- }%
- \fi%
- }%
- \gdef\oc@props@added{}%
- \fi%
\else
%counts inserted widget annots
\newcount\@anim@fieldnum\@anim@fieldnum=\z@
@@ -315,43 +287,6 @@
}%
\gdef\Acro@Form@added{}%
\fi%
- \ifdefined\oc@props@added\else%
- \AtEndDvi{%
- \ifx\empty\@ocgbase@ocgs\empty\else%
- \special{pdf:obj @ocgbase@ocgs []}%
- \special{pdf:put @ocgbase@ocgs \@ocgbase@ocgs}%
- \ifx\empty\@ocgbase@offocgs\empty
- \gdef\@anim@offocgentry{}
- \else%
- \special{pdf:obj @ocgbase@offocgs []}%
- \special{pdf:put @ocgbase@offocgs \@ocgbase@offocgs}%
- \gdef\@anim@offocgentry{/OFF @ocgbase@offocgs}
- \fi%
- \ifx\empty\@ocgbase@ocgorder\empty
- \gdef\@anim@ocgorderentry{}
- \else%
- \special{pdf:obj @ocgbase@ocgorder []}%
- \special{pdf:put @ocgbase@ocgorder \@ocgbase@ocgorder}%
- \gdef\@anim@ocgorderentry{/Order @ocgbase@ocgorder}
- \fi%
- \special{pdf:put @catalog <<%
- /OCProperties <<%
- /OCGs @ocgbase@ocgs%
- /D <<%
- /BaseState/ON \@anim@offocgentry%
- \@anim@ocgorderentry/ListMode/VisiblePages%
- /AS[%
- <</Event/View /Category[/View] /OCGs @ocgbase@ocgs>>%
- <</Event/Print /Category[/Print] /OCGs @ocgbase@ocgs>>%
- <</Event/Export/Category[/Export]/OCGs @ocgbase@ocgs>>%
- ]%
- >>%
- >>%
- >>}%
- \fi%
- }%
- \gdef\oc@props@added{}%
- \fi%
\else
\AtEndDvi{%
\ifx\empty\@anim@appearances\empty\else%
@@ -378,35 +313,6 @@
}%
\gdef\Acro@Form@added{}%
\fi%
- \ifdefined\oc@props@added\else%
- \AtEndDvi{%
- \ifx\empty\@ocgbase@ocgs\empty\else%
- \special{ps:
- mark /_objdef {@ocgbase@ocgs} /type/array /OBJ pdfmark
- mark {@ocgbase@ocgs} 0 [\@ocgbase@ocgs] /PUTINTERVAL pdfmark
- mark /_objdef {@ocgbase@offocgs} /type/array /OBJ pdfmark
- mark {@ocgbase@offocgs} 0 [\@ocgbase@offocgs] /PUTINTERVAL pdfmark
- mark /_objdef {@ocgbase@ocgorder} /type/array /OBJ pdfmark
- mark {@ocgbase@ocgorder} 0 [\@ocgbase@ocgorder] /PUTINTERVAL pdfmark
- mark {Catalog} <<%
- /OCProperties <<%
- /OCGs {@ocgbase@ocgs}%
- /D <<%
- /BaseState/ON /OFF {@ocgbase@offocgs}%
- /Order {@ocgbase@ocgorder} /ListMode/VisiblePages%
- /AS[%
- <</Event/View /Category[/View] /OCGs {@ocgbase@ocgs}>>%
- <</Event/Print /Category[/Print] /OCGs {@ocgbase@ocgs}>>%
- <</Event/Export/Category[/Export]/OCGs {@ocgbase@ocgs}>>%
- ]%
- >>%
- >>%
- >> /PUT pdfmark
- }%
- \fi%
- }%
- \gdef\oc@props@added{}%
- \fi%
\fi
\fi
@@ -856,12 +762,10 @@
\fi%
}
-%creates OCG
+%creates OCG (ocgbase.sty)
\def\@anim@newocg#1#2{%#1:@anim@num, #2:@anim@curframe@zb
- \@anim@dictobj{/Type/OCG /Name (#1.#2)}%
- \xdef\@anim@curocg{\@anim@lastobj}%
- %append to ocg array
- \xdef\@ocgbase@ocgs{\@ocgbase@ocgs\space\@anim@curocg}%
+ \ocgbase@new@ocg{#1.#2}{}{1}%
+ \xdef\@anim@curocg{\ocgbase@last@ocg}%
}
%inserts one animation frame into the output acc. to
@@ -920,7 +824,7 @@
/AP <</N \@anim@refobj{\@anim@lastxform}>>%
/MK <</TP 1/I \@anim@refobj{\@anim@lastxform}/IF<</S/A/FB true>>>>%
/T (#1.#2)%
- \ifdefined\fxocg@insert@OC\fxocg@insert@OC\fi%
+ \ifdefined\ocgxii@insert@OC\ocgxii@insert@OC\fi%
}%
\or% ocg based
\@anim@newocg{#1}{#2}%
@@ -928,11 +832,11 @@
\ifnum\@anim@poster=\@anim@mone% use last frame as poster
\@anim@keytoaux{a#1.poster}{#2}%
\ifthenelse{\equal{\@anim@getkeyval{a#1.poster}}{#2}}{}{%
- \xdef\@ocgbase@offocgs{\@ocgbase@offocgs\space\@anim@curocg}%
+ \ocgbase@add@to@off@list{\@anim@curocg}%
}%
\else%
\ifnum#2=\@anim@poster\else%
- \xdef\@ocgbase@offocgs{\@ocgbase@offocgs\space\@anim@curocg}%
+ \ocgbase@add@to@off@list{\@anim@curocg}%
\fi%
\fi%
\def\@anim@needresize{0}%
@@ -2021,11 +1925,11 @@
\def\@anim@apmk{\@anim@refobj{\@anim@apdummy}}%
\fi%
%With icon and ocg method, we put one dummy widget below; this seems to be
- %necessary for the OCG visibility referenced by the /OC entry to work
- %as expected (if we place the animation on a PDF layer using fixocgx.sty).
+ %necessary for the OCG visibility referenced by the /OC entry to work as
+ %expected (if we place the animation on a PDF layer using ocgx2.sty).
\ifnum\@anim@method=\@ne\else%
- \ifdefined\fxocg@insert@OC%
- \ifthenelse{\equal{\fxocg@insert@OC}{}}{}{%
+ \ifdefined\ocgxii@insert@OC%
+ \ifthenelse{\equal{\ocgxii@insert@OC}{}}{}{%
\@anim@pdfannot{\@anim@animwidth}{\@anim@animheight}{\@anim@animdepth}{%
/Subtype/Widget/F 2%
}%
@@ -2048,7 +1952,7 @@
>>%
/AP <</N \@anim@apmk>>%
/MK <</TP 1/I \@anim@apmk/IF<</S/A/FB true>>>>%
- \ifdefined\fxocg@insert@OC\fxocg@insert@OC\fi%
+ \ifdefined\ocgxii@insert@OC\ocgxii@insert@OC\fi%
}%
\hbox to \@anim@animwidth\p@ {%
\vrule width 0pt height \@anim@animheight\p@ depth \@anim@animdepth\p@%
@@ -2083,8 +1987,8 @@
\fi%
\if@anim@js\@anim@upjscript{#1}{#2}\fi% JavaScript actions for ButtonUp events
\setlength{\@anim@tmpdima}{\@anim@btnsize}%
- \ifdefined\fxocg@insert@OC% put dummy widget below (for fixocgx compatibility)
- \ifthenelse{\equal{\fxocg@insert@OC}{}}{}{%
+ \ifdefined\ocgxii@insert@OC% put dummy widget below (for ocgx2 compatibility)
+ \ifthenelse{\equal{\ocgxii@insert@OC}{}}{}{%
\@anim@pdfannot{\strip@pt\@anim@tmpdima}{\strip@pt\@anim@tmpdima}{0}{%
/Subtype/Widget/F 2%
}%
@@ -2106,7 +2010,7 @@
/T (#1.#2)%
\@anim@tooltip%
\if@anim@js/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>\fi%
- \ifdefined\fxocg@insert@OC\fxocg@insert@OC\fi%
+ \ifdefined\ocgxii@insert@OC\ocgxii@insert@OC\fi%
}%
\if@anim@js%
\hbox to \@anim@tmpdima {%