summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-03 15:12:31 +0000
committerKarl Berry <karl@freefriends.org>2009-10-03 15:12:31 +0000
commit2a8ca7fa0023e5f7eef054101f1a5ce6dfbd7ea2 (patch)
tree08bf64c1a39e3b5eab9baf8ee952ce0f123d6d44 /Master/texmf-dist/tex/latex/animate
parentd646a9d0c41dda68491f734312a6218b09d60378 (diff)
animate update (2oct09)
git-svn-id: svn://tug.org/texlive/trunk@15608 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, 68 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 3f32912c67e..74629f7be74 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{2009/09/24}
+\def\@anim@version{2009/10/02}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -95,34 +95,6 @@
\begingroup%
\@anim@document%
}
- %determine DVI resolution and output warning message if too big
- \AtBeginDocument{%
- \special{ps:
- Resolution 1200 gt VResolution 1200 gt or {%
- (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\string\n%
- @@\ \ \ \ Warning: DVI resolution greater than 1200 dpi!%
- \ \ \ \ \ @@\string\n%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\string\n%
- @@\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ @@\string\n%
- @@ Animations may be distorted or invisible.\ \ \ \ \ \ \ \ \ \ \ \ %
- \ @@\string\n%
- @@ Dvips should be called either without option `-Ppdf':\ @@%
- \string\n @@\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ @@\string\n%
- @@ \ \ dvips \jobname\string\n @@\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ @@\string\n @@ or with a different resolution setting: \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ @@\string\n @@\ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ @@\string\n @@ \ \ dvips -Ppdf -D1200\ %
- \jobname\string\n @@\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ %
- @@\string\n%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) %
- (\%stderr) (w) file exch writestring} if
- }%
- }
%define `?pdfmark' operator as in file hdvips.def from package `hyperref'
\AtBeginDvi{%
\expandafter\ifx\csname pdfmark\endcsname\relax%
@@ -138,9 +110,38 @@
}%
\fi%
}
+ %determine DVI resolution and output warning message if too big
+ \AtBeginDocument{%
+ \special{ps:\@anim@dpiwarning}%
+ }
\fi
\fi
+\catcode`\%=11\catcode`\#=14
+\edef\@anim@catcode{\the\catcode`\_}\catcode`\_=13
+\begingroup\let_\space
+\xdef\@anim@dpiwarning{#
+ {Resolution 1200 gt VResolution 1200 gt or product (Ghostscript)
+ search {pop pop pop true}{pop false}ifelse and {#
+ (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\string\n#
+ @@____Warning:_DVI_resolution_greater_than_1200_dpi!_____@@\string\n#
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\string\n#
+ @@_______________________________________________________@@\string\n#
+ @@_Animations_may_be_distorted_or_invisible._____________@@\string\n#
+ @@_Dvips_should_be_called_either_without_option_`-Ppdf':_@@\string\n#
+ @@_______________________________________________________@@\string\n#
+ @@___dvips_\jobname\string\n
+ @@_______________________________________________________@@\string\n#
+ @@_or_with_a_different_resolution_setting:_______________@@\string\n#
+ @@_______________________________________________________@@\string\n#
+ @@___dvips_-Ppdf_-D1200_\jobname\string\n
+ @@_______________________________________________________@@\string\n#
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\string\n)
+ (%stderr) (w) file exch writestring} if} ?pdfmark
+}
+\endgroup
+\catcode`\%=14\catcode`\#=6\catcode`\_=\@anim@catcode
+
%\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
@@ -1835,7 +1836,7 @@
/BS <</W 0>>%
/H/I%
/AP <</N \@anim@getkeyval{btn#3}>>%
- /T (btn@#1@#2)%
+ /T (#1.#2)%
\@anim@tooltip%
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
}%
@@ -1858,7 +1859,7 @@
/BS <</W 0>>%
/H/I%
/AP <</N @btn#3>>%
- /T (btn@#1@#2)%
+ /T (#1.#2)%
\@anim@tooltip%
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
>>%
@@ -1897,7 +1898,7 @@
/BS <</W 0>>
/H/I
/AP <</N {btn#3}>>%
- /T (btn@#1@#2)%
+ /T (#1.#2)%
\@anim@tooltip%
/A <</S/JavaScript/JS (\@anim@upjscriptstring)>>%
/ANN pdfmark
@@ -2272,6 +2273,19 @@
\fi%
}%
+\edef\@anim@catcode{\the\catcode`\_}\catcode`\_=13
+\begingroup\let_\space
+\xdef\@anim@nusewarning{%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak%
+ @_There_were_unused_animation_transparencies._______@\MessageBreak%
+ @_See_the_transcript_file___________________________@\MessageBreak%
+ @___``\jobname.log''\MessageBreak%
+ @_for_additional_information!_______________________@\MessageBreak%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
+}
+\endgroup
+\catcode`\_=\@anim@catcode
+
%building timeline from timeline file
\newread\@anim@@tmlnfile
\newboolean{@anim@eof}
@@ -2387,20 +2401,7 @@
}%
\ifcsname @anim@nusewarned\endcsname\else%
\AtEndDocument{%
- \PackageWarningNoLine{animate}{%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak%
- @ There were unused animation transparencies.\space See\space\space%
- \space @\MessageBreak%
- @ the transcript file\space\space\space\space\space\space\space%
- \space\space\space\space\space\space\space\space\space\space\space%
- \space\space\space\space\space\space\space\space\space\space\space%
- \space\space @\MessageBreak%
- @ ``\jobname.log''\MessageBreak%
- @ for additional information!\space\space\space\space\space%
- \space\space\space\space\space\space\space\space\space\space%
- \space\space\space\space\space\space\space\space @\MessageBreak%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
- }%
+ \PackageWarningNoLine{animate}{\@anim@nusewarning}%
}%
\gdef\@anim@nusewarned{}%
\fi%
@@ -2531,6 +2532,22 @@
}%
}
+\edef\@anim@catcode{\the\catcode`\_}\catcode`\_=13
+\begingroup\let_\space
+\xdef\@anim@multwarning{%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\MessageBreak%
+ @_In_certain_animation_frames,_transparencies_were__@\MessageBreak%
+ @_multiply_included._This_may_considerably_slow_____@\MessageBreak%
+ @_down_animation_speed._Revise_the_timeline_file_of_@\MessageBreak%
+ @_the_corresponding_animation!_See_the_transcript___@\MessageBreak%
+ @_file______________________________________________@\MessageBreak%
+ @___``\jobname.log''\MessageBreak%
+ @_for_additional_information!_______________________@\MessageBreak%
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
+}%
+\endgroup
+\catcode`\_=\@anim@catcode
+
%detects multiple inclusion of the same transparency
\def\@anim@findmult#1.#2,#3\@nil{%
\ifthenelse{\equal{#2}{}}{}{%
@@ -2544,23 +2561,7 @@
}%
\ifcsname @anim@multwarned\endcsname\else%
\AtEndDocument{%
- \PackageWarningNoLine{animate}{%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
- \MessageBreak%
- @ In certain animation frames, transparencies were%
- \space\space @\MessageBreak%
- @ multiply included. This may considerably slow\space%
- \space\space\space\space @\MessageBreak%
- @ down animation speed. Revise the timeline file of\space @%
- \MessageBreak%
- @ the corresponding animation! See the transcript\space\space%
- \space @\MessageBreak%
- @ file ``\jobname.log''\MessageBreak%
- @ for additional information!\space\space\space\space\space%
- \space\space\space\space\space\space\space\space\space\space%
- \space\space\space\space\space\space\space\space @\MessageBreak%
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
- }%
+ \PackageWarningNoLine{animate}{\@anim@multwarning}%
}%
\gdef\@anim@multwarned{}%
\fi%
@@ -3059,6 +3060,7 @@
a#1.btn[ocgName[1]].state=ocg[i].initState;%
}else{% frame ocg
\fi\fi
+ %get array of animation frames
a#1.fr[ocgName[1]]=ocg[i];%
%set basic frame state
a#1.fr[ocgName[1]].state=ocg[i].initState;%
@@ -3068,12 +3070,9 @@
}%
}%
\else
- %get array of Field objects belonging to the current animation
- for(i=0;i<this.numFields;i++){%
- var fldName=this.getNthFieldName(i).split('.');%
- if(fldName[0]==#1){%
- a#1.fr[fldName[1]]=this.getField(this.getNthFieldName(i));%
- }%
+ %get array of animation frames
+ for(i=0;i<=\@anim@maxframe;i++){%
+ a#1.fr[i]=this.getField('#1.'+i);%
}%
\if@anim@controls\if@anim@step\else
var ocg=this.getOCGs(this.pageNum);%
@@ -3081,7 +3080,6 @@
var ocgName=ocg[i].name.split('.');%
if(ocgName[0]==#1){%
a#1.btn[ocgName[1]]=ocg[i];%
- %set basic button state
a#1.btn[ocgName[1]].state=ocg[i].initState;%
}%
}%