summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-10-09 00:45:07 +0000
committerKarl Berry <karl@freefriends.org>2009-10-09 00:45:07 +0000
commit99b5028b97aa7142fb382e4d76a5f324689572dc (patch)
treed0f0c362319cc053418647620d2d70043067a983 /Master/texmf-dist/tex
parent7b1e8f210045f442816f74107cd5b934ed70c69c (diff)
animate update (8oct09)
git-svn-id: svn://tug.org/texlive/trunk@15709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty77
1 files changed, 37 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 74629f7be74..9103489d91e 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/10/02}
+\def\@anim@version{2009/10/08}
\ProvidesPackage{animate}
[\@anim@version\space PDF animations from files and inline graphics]
@@ -1373,33 +1373,31 @@
}%
\if@anim@multipage%
\@anim@filebox{#1\@anim@ext}{1}%
+ \@anim@curframe=\pdflastximagepages%
+ \advance\@anim@curframe by -\@ne%since \pdfximagepages is 1-based
+ \edef\@anim@lastpage{\the\@anim@curframe}%
\ifx\@anim@first\@empty%
- \global\@anim@curframe=\@ne%
+ \gdef\@anim@first{0}%
\else%
\ifnum\@anim@first<\z@\gdef\@anim@first{0}\fi%
- \global\@anim@curframe=\@anim@first%
- \global\advance\@anim@curframe by \@ne%since pdfximage pages are 1-based
- \ifnum\@anim@curframe>\pdflastximagepages%
- \global\@anim@curframe=\pdflastximagepages% correct wrong user input
+ \ifnum\@anim@first>\@anim@lastpage%
+ \xdef\@anim@first{\@anim@lastpage}%
\fi%
\fi%
- \xdef\@anim@first{\the\@anim@curframe}%
\ifx\@anim@last\@empty%
- \global\@anim@curframe=\pdflastximagepages%
+ \xdef\@anim@last{\@anim@lastpage}%
\else%
\ifnum\@anim@last<\z@\gdef\@anim@last{0}\fi%
- \global\@anim@curframe=\@anim@last%
- \global\advance\@anim@curframe by \@ne%
- \ifnum\@anim@curframe>\pdflastximagepages%
- \global\@anim@curframe=\pdflastximagepages%
+ \ifnum\@anim@last>\@anim@lastpage%
+ \xdef\@anim@last{\@anim@lastpage}%
\fi%
\fi%
- \ifnum\@anim@first>\@anim@curframe%
- \xdef\@anim@last{\@anim@first}%
- \xdef\@anim@first{\the\@anim@curframe}%
- \else%
- \xdef\@anim@last{\the\@anim@curframe}%
- \fi%
+ \@anim@curframe=\@anim@first%
+ \advance\@anim@curframe by \@ne%
+ \xdef\@anim@first{\the\@anim@curframe}%
+ \@anim@curframe=\@anim@last%
+ \advance\@anim@curframe by \@ne%
+ \xdef\@anim@last{\the\@anim@curframe}%
\fi%
}%
\else
@@ -1410,33 +1408,31 @@
\gdef\@anim@ext{.pdf}%
}{}%
\if@anim@multipage%
+ \@anim@curframe=\XeTeXpdfpagecount "#1.pdf"%
+ \advance\@anim@curframe by -\@ne%since XeTeXpdfpagecount is 1-based
+ \edef\@anim@lastpage{\the\@anim@curframe}%
\ifx\@anim@first\@empty%
- \global\@anim@curframe=\@ne%
+ \gdef\@anim@first{0}%
\else%
\ifnum\@anim@first<\z@\gdef\@anim@first{0}\fi%
- \global\@anim@curframe=\@anim@first%
- \global\advance\@anim@curframe by \@ne%\XeTeXpdfpagecount is 1-based
- \ifnum\@anim@curframe>\XeTeXpdfpagecount "#1.pdf"\relax%
- \global\@anim@curframe=\XeTeXpdfpagecount "#1.pdf"%
+ \ifnum\@anim@first>\@anim@lastpage%
+ \xdef\@anim@first{\@anim@lastpage}%
\fi%
\fi%
- \xdef\@anim@first{\the\@anim@curframe}%
\ifx\@anim@last\@empty%
- \global\@anim@curframe=\XeTeXpdfpagecount "#1.pdf"%
+ \xdef\@anim@last{\@anim@lastpage}%
\else%
\ifnum\@anim@last<\z@\gdef\@anim@last{0}\fi%
- \global\@anim@curframe=\@anim@last%
- \global\advance\@anim@curframe by \@ne%
- \ifnum\@anim@curframe>\XeTeXpdfpagecount "#1.pdf"\relax%
- \global\@anim@curframe=\XeTeXpdfpagecount "#1.pdf"%
+ \ifnum\@anim@last>\@anim@lastpage%
+ \xdef\@anim@last{\@anim@lastpage}%
\fi%
\fi%
- \ifnum\@anim@first>\@anim@curframe%
- \xdef\@anim@last{\@anim@first}%
- \xdef\@anim@first{\the\@anim@curframe}%
- \else%
- \xdef\@anim@last{\the\@anim@curframe}%
- \fi%
+ \@anim@curframe=\@anim@first%
+ \advance\@anim@curframe by \@ne%
+ \xdef\@anim@first{\the\@anim@curframe}%
+ \@anim@curframe=\@anim@last%
+ \advance\@anim@curframe by \@ne%
+ \xdef\@anim@last{\the\@anim@curframe}%
\fi%
}%
\else
@@ -1491,16 +1487,17 @@
Missing frame number in \protect\animategraphics\space command%
}{}%
}{}%
- \ifnum\@anim@first>\@anim@last%
- \edef\@anim@temp{\@anim@first}\edef\@anim@first{\@anim@last}%
- \edef\@anim@last{\@anim@temp}%
- \fi%
\ifthenelse{\@anim@first<\z@\OR\@anim@last<\z@}{%
\PackageError{animate}{%
Negative frame numbers not allowed%
}{}%
}{}%
\fi%
+ \def\@anim@relop{>}%
+ \ifnum\@anim@first>\@anim@last%
+ \edef\@anim@every{-\@anim@every}%
+ \def\@anim@relop{<}%
+ \fi%
\global\@anim@curframe=\@anim@first%
\global\@anim@curframe@zb=\z@%
%
@@ -1537,7 +1534,7 @@
\xdef\@anim@nfps{#2}%
%
%read all frames of the sequence
- \loop\ifnum\@anim@curframe>\@anim@last\else%
+ \loop\ifnum\@anim@curframe\@anim@relop\@anim@last\else%
\if@anim@multipage%
%embed graphics
\@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{%