summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-28 23:18:13 +0000
committerKarl Berry <karl@freefriends.org>2008-03-28 23:18:13 +0000
commit4a5db5d8d926c666fb1665962a14118ed967ebb6 (patch)
tree2145c04efa87bcd4ddfa3932f333502f1b86e5cc /Master
parent047de128c28ad2e92c3c27a20974622d439e5757 (diff)
animate update (26mar08)
git-svn-id: svn://tug.org/texlive/trunk@7209 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/animate/README13
-rw-r--r--Master/texmf-dist/doc/latex/animate/doc/animate.pdfbin1314317 -> 1315622 bytes
-rw-r--r--Master/texmf-dist/doc/latex/animate/doc/animate.tex19
-rw-r--r--Master/texmf-dist/tex/latex/animate/animate.sty125
4 files changed, 95 insertions, 62 deletions
diff --git a/Master/texmf-dist/doc/latex/animate/README b/Master/texmf-dist/doc/latex/animate/README
index 96465dcfd14..ba97e38b990 100644
--- a/Master/texmf-dist/doc/latex/animate/README
+++ b/Master/texmf-dist/doc/latex/animate/README
@@ -41,10 +41,14 @@ Description:
command options. Please refer to the documentation `animate.pdf' in the
`doc/' directory for details and examples.
- Keywords: include portable PDF animation animating embed animated
- graphics LaTeX pdfLaTeX PSTricks pgf TikZ MetaPost LaTeX-picture
- inline graphics vector graphics animated GIF LaTeX dvips ps2pdf
- JavaScript Adobe Reader
+ Keywords: include portable PDF animated PDF animation animating
+ embed animated
+ graphics LaTeX pdfLaTeX PSTricks pgf TikZ MetaPost
+ LaTeX-picture
+ inline graphics vector graphics animated GIF LaTeX
+ dvips ps2pdf
+ JavaScript Adobe Reader
+
Usage:
@@ -79,6 +83,7 @@ Usage:
Requirements:
+ e-TeX
pdfTeX, version >= 1.20
Ghostscript, version >= 8.31 or Adobe Distiller
Adobe Reader, version >= 6, but not 8
diff --git a/Master/texmf-dist/doc/latex/animate/doc/animate.pdf b/Master/texmf-dist/doc/latex/animate/doc/animate.pdf
index ac3d7dda27a..e265ea3e808 100644
--- a/Master/texmf-dist/doc/latex/animate/doc/animate.pdf
+++ b/Master/texmf-dist/doc/latex/animate/doc/animate.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/animate/doc/animate.tex b/Master/texmf-dist/doc/latex/animate/doc/animate.tex
index 4d54878d528..76305195f24 100644
--- a/Master/texmf-dist/doc/latex/animate/doc/animate.tex
+++ b/Master/texmf-dist/doc/latex/animate/doc/animate.tex
@@ -31,7 +31,7 @@
\makeatother
\fi
-\def\keywords{include portable PDF animation animating embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf JavaScript Adobe Reader}
+\def\keywords{include portable PDF animation animated PDF animating embed animated graphics LaTeX pdfLaTeX PSTricks pgf TikZ LaTeX-picture MetaPost inline graphics vector graphics animated GIF LaTeX dvips ps2pdf JavaScript Adobe Reader}
\hypersetup{
bookmarksnumbered,linktocpage,breaklinks,
pdftitle={The animate Package},
@@ -75,6 +75,7 @@ The `animate' package relies on Optional Content Groups (OCG), also known as PDF
\section{Requirements}
\begin{trivlist}
+\item $\varepsilon$-\TeX
\item pdf\TeX{}, version $\ge1.20$ for direct PDF output
\item Ghostscript, version $\ge8.31$ or Adobe Distiller for PS to PDF conversion
\item Adobe Reader, version $\ge6$, but not $8$
@@ -108,7 +109,7 @@ poster[=first | none | last]
\end{verbatim}
The same options (among others) are also available as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all animations in the document. In turn, command options locally override global settings.
-If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, the `graphicx' package is required. \emph{Important:} The \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-X 2400 -Y 2400+' \emph{after} `\verb+-Ppdf+' on the command line.
+If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, the `graphicx' package is required. \emph{Important:} The \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-X 2400 -Y 2400+' \emph{after} `\verb+-Ppdf+' on the command line. Sometimes, if the same animation sequence made from graphics files is to be embedded multiple times into the document, more compact PDF output may be obtained by passing option `\verb+-dMaxInlineImageSize=0+' to \verb+ps2pdf+.
\section{The user interface}
Package `animate' provides the command
@@ -280,7 +281,7 @@ and
\normalsize
In the first example, transparency No. 0 appears in the foreground throughout the animation; it will never be obscured by other transparencies' content. In the second example it is put to the background, because it is the first transparency specification in the file, and stays there for the rest of the animation.
-When designing the timeline, care should be taken not to include a transparency more than once into the \emph{same} animation frame. Besides the useless redundancy, this may slow down the animation speed in the Reader, because the graphical objects of a multiply included transparency have to be rendered unnecessarily often at the same time. `animate' is smart enough to detect multiple inclusion and issues a warning message along with the transparency ID and the frame number if it occurs. Also, `animate' finds and lists transparencies that have never been used in an animation timeline in order to avoid dead code in the final PDF. Here is an example of a poorly designed timeline:
+When designing the timeline, care should be taken not to include a transparency more than once into the \emph{same} animation frame. Besides the useless redundancy, this may slow down the animation speed in the Reader, because the graphical objects of a multiply included transparency have to be rendered unnecessarily often at the same time. `animate' is smart enough to detect multiple inclusion and issues a warning message along with the transparency ID and the frame number if it occurs. Also, `animate' finds and lists transparencies that have never been used in an animation timeline. This may help to avoid dead code in the final PDF. Here is an example of a poorly designed timeline:
\small
\begin{verbatim}
::0
@@ -298,13 +299,13 @@ When designing the timeline, care should be taken not to include a transparency
The stack-like concept of animations, where transparencies are always put on top such that they overprint the content of previously deposited transparencies, can be inconvenient in certain situations. For example, it might be desirable to allow for changing the background image in the middle of an animation without affecting objects that are located in the foreground. For this purpose, transparency specifications can be grouped into \emph{layers} using the semicolon (\verb+;+) as a separator instead of the comma. This is best illustrated by an example:
\small
\begin{verbatim}
- ::0x49;2x0,3x0
- :: ;4x0,5x0
+ ::0x49;2x0,3x0 % first background image, transparency `0', used in
+ :: ;4x0,5x0 % the first 49 frames
:: ;6x0,7x0
...
:: ;98x0,99x0
- ::1x0;100x0,101x0
- :: ;102x0,103x0
+ ::1x0;100x0,101x0 % new background image, transparency `1', until end
+ :: ;102x0,103x0 % of animation
:: ;104x0,105x0
...
\end{verbatim}
@@ -569,8 +570,8 @@ Fig.~\ref{fig:torus} is an inline graphics example adapted from \cite{gilg05}.
\item Animations do not work if the PDF has been produced with Ghostscript versions older than 8.31. This applies to all versions of ESP Ghostscript that comes with many Linux distributions.
- \item Animations with complex graphics, many frames or complicated timelines may cause \LaTeX{} to fail with a `\verb+TeX capacity exceeded+' error. The following steps should fix most of the memory related problems.
-
+ \item Animations with complex graphics and/or many frames may cause \LaTeX{} to fail with a `\verb+TeX capacity exceeded+' error. The following steps should fix most of the memory related problems.
+
MiK\TeX:
\begin{enumerate}
\item Open a command line window.
diff --git a/Master/texmf-dist/tex/latex/animate/animate.sty b/Master/texmf-dist/tex/latex/animate/animate.sty
index 615c110d35c..4d87f51dd5d 100644
--- a/Master/texmf-dist/tex/latex/animate/animate.sty
+++ b/Master/texmf-dist/tex/latex/animate/animate.sty
@@ -13,7 +13,18 @@
% Supports LaTeX->dvips->ps2pdf or pdfLaTeX workflows.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{animate}[2008/03/18]
+\ProvidesPackage{animate}[2008/03/26]
+
+%test for e-TeX
+\ifx\eTeXversion\@undefined%
+ \PackageError{animate}{%
+ Missing support for e-TeX; abandoning...%
+ }{%
+ Use a TeX compiler that supports e-TeX and enable e-TeX %
+ in the format.%
+ }%
+\fi%
+
\RequirePackage{keyval}
\RequirePackage{ifthen}
\RequirePackage{ifpdf}
@@ -24,6 +35,14 @@
%(package options will be processed near end of this file)
\ifpdf
+ %test for correct pdfTeX version
+ \ifnum\pdftexversion<120
+ \PackageError{animate}{%
+ pdfTeX, version >= 1.20, required%
+ }{%
+ Install a newer version!%
+ }%
+ \fi
%load MP to PDF converter
\ifx\convertMPtoPDF\@undefined%
\InputIfFileExists{supp-pdf}{}{}%
@@ -55,17 +74,6 @@
}
\fi%
-%testing for correct pdfTeX version
-\ifpdf
- \ifnum\pdftexversion<120
- \PackageError{animate}{%
- pdfTeX, version >= 1.20, required%
- }{%
- Install a newer version!%
- }%
- \fi
-\fi
-
%\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
@@ -161,13 +169,13 @@
%tests whether file is already known (and embedded), if so it returns identifier
%of xobj, otherwise returns `!'
-\def\@anim@fileknown#1#2{% #1 file name, #2 page No.
+\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%
}
-\def\@anim@makefileknown#1#2#3{% #1 file name, #2 page No, #3 Form XObj ID
- \@anim@newkey{file:\pdfmdfivesum file {#1}.#2}{#3}%
+\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
}
\ifpdf
@@ -199,21 +207,39 @@
\fi
%create Form XObject from graphics file
-\def\@anim@ximage#1#2#3#4{%#1:@anim@num, #2:@anim@curframe@zb, #3:filename,
- %#4: page number of multipage pdf
- \ifthenelse{\equal{\@anim@fileknown{#3}{#4}}{!}}{% new file to be embedded
- \@anim@filebox{#3}{#4}% store file in a box
- \@anim@xinline{#1}{#2}{\@anim@box}{!}% delegate Form XObject creation
- \ifx\@anim@gropts\@empty\if@anim@multipdf\message{<#4>}\fi\fi%
- \@anim@makefileknown{#3}{#4}{\@anim@lastxform}% keep form xobject number
- }{% file known, re-use existing form xobject
- \ifnum#2=0
- \@anim@filebox{#3}{#4}% for size determination of first frame
- \@anim@xinline{#1}{#2}{\@anim@box}{\@anim@fileknown{#3}{#4}}%
- \else%
- \@anim@xinline{#1}{#2}{}{\@anim@fileknown{#3}{#4}}%
- \fi%
- }%
+\ifthenelse{\boolean{pdf}}{
+ \def\@anim@ximage#1#2#3#4{%#1:@anim@num, #2:@anim@curframe@zb, #3:filename,
+ %#4: page number of multipage pdf
+ \ifthenelse{\equal{\@anim@fileknown{#3}{#4}}{!}}{% new file to be embedded
+ \@anim@filebox{#3}{#4}% store file in a box
+ \@anim@xinline{#1}{#2}{\@anim@box}{!}% delegate Form XObject creation
+ \ifx\@anim@gropts\@empty\if@anim@multipdf\message{<#4>}\fi\fi%
+ \@anim@makefileknown{#3}{#4}{\@anim@lastxform}% keep form xobject number
+ }{% file known, re-use existing form xobject
+ \ifnum#2=0
+ \@anim@filebox{#3}{#4}% for size determination of first frame
+ \@anim@xinline{#1}{#2}{\@anim@box}{\@anim@fileknown{#3}{#4}}%
+ \else%
+ \@anim@xinline{#1}{#2}{}{\@anim@fileknown{#3}{#4}}%
+ \fi%
+ }%
+ }
+}{
+ \def\@anim@ximage#1#2#3#4{%#1:@anim@num, #2:@anim@curframe@zb, #3:filename,
+ %#4: not used
+ \ifthenelse{\equal{\@anim@fileknown{#3}{#1}}{!}}{%file is new to current
+ \@anim@filebox{#3}{}% store file in a box animation
+ \@anim@xinline{#1}{#2}{\@anim@box}{!}% delegate Form XObject creation
+ \@anim@makefileknown{#3}{#1}{\@anim@lastxform}% keep form xobject ref
+ }{%file already used in the current animation, re-use existing form xobject
+ \ifnum#2=0
+ \@anim@filebox{#3}{}% for size determination of first frame
+ \@anim@xinline{#1}{#2}{\@anim@box}{\@anim@fileknown{#3}{#1}}%
+ \else%
+ \@anim@xinline{#1}{#2}{}{\@anim@fileknown{#3}{#1}}%
+ \fi%
+ }%
+ }
}
\newboolean{@anim@timeline} %true if `timeline' option was set
@@ -233,7 +259,7 @@
\fi%
\ifthenelse{\equal{#4}{!}}{%
%put graphics into XObject
- \setbox\@anim@box=\hbox{%
+ \global\setbox\@anim@box=\hbox{%
\raisebox{-\dp#3}[\@anim@animheight\p@][\@anim@animdepth\p@]{\box#3}%
}%
\immediate\pdfxform\@anim@box%
@@ -261,20 +287,20 @@
\fi%
\ifthenelse{\equal{#4}{!}}{%
\begingroup%
- \setlength{\unitlength}{1pt}%
- %mark BBox of the graphics
- \begin{picture}(0,0)%
- \put(0,-\@anim@animdepth){%
- \special{ps:
- currentpoint /frame@lly exch def /frame@llx exch def
+ \setlength{\unitlength}{1pt}%
+ %mark BBox of the graphics
+ \begin{picture}(0,0)%
+ \put(0,-\@anim@animdepth){%
+ \special{ps:
+ currentpoint /frame@lly exch def /frame@llx exch def
+ }%
}%
- }%
- \put(\@anim@animwidth,\@anim@animheight){%
- \special{ps:
- currentpoint /frame@ury exch def /frame@urx exch def
+ \put(\@anim@animwidth,\@anim@animheight){%
+ \special{ps:
+ currentpoint /frame@ury exch def /frame@urx exch def
+ }%
}%
- }%
- \end{picture}%
+ \end{picture}%
\endgroup%
%distill graphics into XObject
\special{ps:
@@ -1073,7 +1099,7 @@
%
\@anim@checkmultipdf{\@anim@base}%test for multipage pdf
\@anim@curframe=\@anim@first%
- \@anim@curframe@zb=0%
+ \global\@anim@curframe@zb=0%
%
\if@anim@draft%
\if@anim@multipdf%
@@ -1122,7 +1148,7 @@
}{1}%
\fi%
\advance\@anim@curframe by \@anim@every%
- \advance\@anim@curframe@zb by \@ne%
+ \global\advance\@anim@curframe@zb by \@ne%
\repeat%
\xdef\@anim@frames{\the\@anim@curframe@zb}% total number
%build timeline from optional timeline file
@@ -1554,7 +1580,6 @@
\the\@anim@end%
\end{lrbox}%
\ifnum\@anim@skipfram=0
- \if@anim@draft\else\message{< a#1, fr#2}\fi%
%determine size of graphics
\ifnum #2=0
\xdef\@anim@animwidth{\strip@pt\wd\@anim@box}%
@@ -1579,7 +1604,9 @@
\if@anim@draft\@anim@draftbox{\@anim@box}\fi%
\fi%
%now create Form XObject of box contents
- \if@anim@draft\else\@anim@xinline{#1}{#2}{\@anim@box}{!}\message{>}\fi%
+ \if@anim@draft\else%
+ \@anim@xinline{#1}{#2}{\@anim@box}{!}\message{<a#1,fr#2>}%
+ \fi%
\fi%
\global\advance\@anim@skipfram by \@ne%
\ifnum\@anim@skipfram=\@anim@every
@@ -1663,7 +1690,7 @@
%process input line
\expandafter\@anim@parseline\@anim@inputline\@nil%
%combine the layers of the current frame
- \@anim@curlayer=0%
+ \global\@anim@curlayer=0%
\loop\ifnum\@anim@curlayer>\@anim@maxlayer\else%
\@anim@newkey{frmcontent@\the\@anim@curframe@zb}{%
\@anim@getkeyval{frmcontent@\the\@anim@curframe@zb}%
@@ -1672,7 +1699,7 @@
}%
\@anim@newkey{%
layercontent@\the\@anim@curframe@zb.\the\@anim@curlayer}{}%
- \advance\@anim@curlayer by \@ne%
+ \global\advance\@anim@curlayer by \@ne%
\repeat%
%detect multiple inclusion of the same transp. in the current frame
\edef\@anim@trlst{%