summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-16 22:56:21 +0000
committerKarl Berry <karl@freefriends.org>2010-09-16 22:56:21 +0000
commit686537a61a3af954e7240f3e5c5c02475118005e (patch)
tree646ff4ec6b9f351be89d18eaf3a9fdc8f2d8af90 /Master/texmf-dist/tex/latex/animate
parent62f7010f710bd9d6df2db1a7f47f9361c7b96136 (diff)
animate update (16sep10)
git-svn-id: svn://tug.org/texlive/trunk@19764 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/animate')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty51
1 files changed, 33 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index d72030e5fe7..fd58e228b00 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{2010/08/31}
+\def\@anim@version{2010/09/16}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -149,7 +149,7 @@
%on their MD5 digest (in order to avoid multiple inclusion); if it is not
%available, hashing will be based on the file name
\expandafter\ifx\csname pdfmdfivesum\endcsname\relax
- \def\pdfmdfivesum file #1{#1}
+ \def\pdfmdfivesum file#1{#1}
\fi
%creating and using global definitions
@@ -285,11 +285,11 @@
%of xobj, otherwise returns `!'
\def\@anim@fileknown#1#2{% #1 file name, pdf: #2 page No. ps: #2 @anim@num
%identify file by md5sum
- \ifcsname file:\pdfmdfivesum file {#1}.#2\endcsname%
- \@anim@getkeyval{file:\pdfmdfivesum file {#1}.#2}\else!\fi%
+ \ifcsname file:\pdfmdfivesum file{#1}.#2\endcsname%
+ \@anim@getkeyval{file:\pdfmdfivesum file{#1}.#2}\else!\fi%
}
\def\@anim@makefileknown#1#2#3{%#1 file name, pdf: #2 page No. ps: #2 @anim@num,
- \@anim@newkey{file:\pdfmdfivesum file {#1}.#2}{#3}% #3 Form XObj ID
+ \@anim@newkey{file:\pdfmdfivesum file{#1}.#2}{#3}% #3 Form XObj ID
}
%helper macro that typesets graphics file into savebox
@@ -1187,7 +1187,7 @@
%determines file type of the sequence
\ifpdf
- \def\@anim@getext#1{%
+ \def\@anim@getpath#1{%
\gdef\@anim@ext{.pdf}% we start with `pdf'
\IfFileExists{#1\@anim@ext}{}{%
\gdef\@anim@ext{.mps}%
@@ -1224,10 +1224,12 @@
Wrong file type? Mis-spelled file name?%
}{}%
}}}}}}}}}}%
+ \edef\@filef@und{\@filef@und\space}%
+ \xdef\@anim@pathtofile{\expandafter\zap@space\@filef@und\@empty}%
}%
\else
\if@anim@@dvipdfmx %XeLaTeX, dvipdfmx
- \def\@anim@getext#1{%
+ \def\@anim@getpath#1{%
\gdef\@anim@ext{.pdf}% we start with `pdf'
\IfFileExists{#1\@anim@ext}{}{%
\gdef\@anim@ext{.mps}%
@@ -1258,9 +1260,11 @@
Wrong file type? Mis-spelled file name?%
}{}%
}}}}}}}}%
+ \edef\@filef@und{\@filef@und\space}%
+ \xdef\@anim@pathtofile{\expandafter\zap@space\@filef@und\@empty}%
}%
\else %dvips
- \def\@anim@getext#1{%
+ \def\@anim@getpath#1{%
\gdef\@anim@ext{.eps}% we start with `eps'
\IfFileExists{#1\@anim@ext}{}{%
\gdef\@anim@ext{.mps}%
@@ -1276,6 +1280,8 @@
Wrong file type? Mis-spelled file name?%
}{}%
}}}%
+ \edef\@filef@und{\@filef@und\space}%
+ \xdef\@anim@pathtofile{\expandafter\zap@space\@filef@und\@empty}%
}%
\fi
\fi
@@ -1369,7 +1375,9 @@
}%
}%
\if@anim@multipage%
- \@anim@filebox{#1\@anim@ext}{1}%
+ \edef\@filef@und{\@filef@und\space}%
+ \xdef\@anim@pathtofile{\expandafter\zap@space\@filef@und\@empty}%
+ \@anim@filebox{\@anim@pathtofile}{1}%
\@anim@curframe=\pdflastximagepages%
\advance\@anim@curframe by -\@ne%since \pdfximagepages is 1-based
\edef\@anim@lastpage{\the\@anim@curframe}%
@@ -1405,7 +1413,9 @@
\gdef\@anim@ext{.pdf}%
}{}%
\if@anim@multipage%
- \@anim@curframe=\XeTeXpdfpagecount "#1.pdf"%
+ \edef\@filef@und{\@filef@und\space}%
+ \xdef\@anim@pathtofile{\expandafter\zap@space\@filef@und\@empty}%
+ \@anim@curframe=\XeTeXpdfpagecount "\@anim@pathtofile"%
\advance\@anim@curframe by -\@ne%since XeTeXpdfpagecount is 1-based
\edef\@anim@lastpage{\the\@anim@curframe}%
\ifx\@anim@first\@empty%
@@ -1477,6 +1487,11 @@
\def\@anim@first{#4}%
\def\@anim@last{#5}%
%
+ \begingroup% make use of graphic[xs] search path
+ \ifcsname Ginput@path\endcsname%
+ \let\input@path\Ginput@path%
+ \fi%
+ %
\@anim@checkmultipage{\@anim@base}%test for multipage file
\if@anim@multipage\else% cope with wrong user input
\ifthenelse{\equal{#4}{}\OR\equal{#5}{}}{%
@@ -1501,11 +1516,11 @@
\if@anim@draft%
\if@anim@multipage%
%store file in a box
- \@anim@filebox{\@anim@base\@anim@ext}{\@anim@first}%
+ \@anim@filebox{\@anim@pathtofile}{\@anim@first}%
\else%
%get file name extension
- \@anim@getext{\@anim@base\@anim@first}%
- \@anim@filebox{\@anim@base\@anim@first\@anim@ext}{1}%
+ \@anim@getpath{\@anim@base\@anim@first}%
+ \@anim@filebox{\@anim@pathtofile}{1}%
\fi%
\@anim@getsize{\@anim@box}%
\@anim@scale{\@anim@box}%
@@ -1535,16 +1550,15 @@
\if@anim@multipage%
%embed graphics
\@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{%
- \@anim@base\@anim@ext}{\the\@anim@curframe}%
+ \@anim@pathtofile}{\the\@anim@curframe}%
\else%
- %get file name extension of current file
- \@anim@getext{%
+ %get path to current file end its extension
+ \@anim@getpath{%
\@anim@base\@anim@pad{\@anim@first}{\the\@anim@curframe}%
}%
%embed graphics
\@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{%
- \@anim@base\@anim@pad{\@anim@first}{\the\@anim@curframe}\@anim@ext%
- }{1}%
+ \@anim@pathtofile}{1}%
\fi%
\global\advance\@anim@curframe by \@anim@every%
\global\advance\@anim@curframe@zb by \@ne%
@@ -1559,6 +1573,7 @@
\@anim@insertwidgets{\the\@anim@num}{%
\@anim@getkeyval{btncol:\@anim@bgcolour:\@anim@fgcolour}}%
\fi%
+ \endgroup%
\global\advance\@anim@num by \@ne%
\catcode`\:=\@anim@colon\catcode`\;=\@anim@semicolon%
\catcode`\*=\@anim@star\catcode`\,=\@anim@comma%