summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/animate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-20 18:13:37 +0000
committerKarl Berry <karl@freefriends.org>2008-03-20 18:13:37 +0000
commitbdf0114f2477439183299c09c220d78a8ffe4e36 (patch)
tree65c4536058e0db2b01ac1ae3767578c731dca553 /Master/texmf-dist/doc/latex/animate
parentc7529bba4b9ee042b3afac75519d193644572dbd (diff)
animate update (18mar08)
git-svn-id: svn://tug.org/texlive/trunk@7046 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/animate')
-rw-r--r--Master/texmf-dist/doc/latex/animate/README8
-rw-r--r--Master/texmf-dist/doc/latex/animate/doc/animate.pdfbin1312926 -> 1314317 bytes
-rw-r--r--Master/texmf-dist/doc/latex/animate/doc/animate.tex124
3 files changed, 76 insertions, 56 deletions
diff --git a/Master/texmf-dist/doc/latex/animate/README b/Master/texmf-dist/doc/latex/animate/README
index 47ea71bba1d..96465dcfd14 100644
--- a/Master/texmf-dist/doc/latex/animate/README
+++ b/Master/texmf-dist/doc/latex/animate/README
@@ -41,10 +41,10 @@ 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 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:
diff --git a/Master/texmf-dist/doc/latex/animate/doc/animate.pdf b/Master/texmf-dist/doc/latex/animate/doc/animate.pdf
index 1220a360889..ac3d7dda27a 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 259c1851b18..4d54878d528 100644
--- a/Master/texmf-dist/doc/latex/animate/doc/animate.tex
+++ b/Master/texmf-dist/doc/latex/animate/doc/animate.tex
@@ -259,6 +259,7 @@ Note that the order in which transparency specifications appear in the timeline
%The animation may be thought of as a pile of transparencies. Transparencies are always put on top of that pile, possibly overdrawing objects that are on previously deposited transparencies. Once on the pile, each transparency remains at its place for the specified number of frames and is removed afterwards. That is, for a transparency to appear always on top it must be put to the rightmost end of each line in the timeline file.
Consider the two timelines
+\small
\begin{verbatim}
::1,0 % zeroth transparency always in the foreground
::2,0
@@ -266,7 +267,9 @@ Consider the two timelines
::4,0
...
\end{verbatim}
+\normalsize
and
+\small
\begin{verbatim}
::0x0,1 % zeroth transparency put to the background
::2
@@ -274,10 +277,26 @@ and
::4
...
\end{verbatim}
+\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:
+\small
+\begin{verbatim}
+ ::0
+ ::1x0
+ ::2
+ ::3
+ ::4,2
+ ::5,1 % bad: transparency `1' included twice
+ ::6
+ ...
+\end{verbatim}
+\normalsize
+
\emph{Grouping objects into layers using `{\tt;}'}\\[0.8\parskip]
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
@@ -289,9 +308,10 @@ The stack-like concept of animations, where transparencies are always put on top
:: ;104x0,105x0
...
\end{verbatim}
-In this timeline, the transparencies are grouped into two layers. One is reserved for the background images, transparencies No. 0 \& 1, to be exchanged after 49 frames, and another one for the foreground objects that are successively added to the scene. As can be seen in this example, layers need not be explicitly populated; the leading semicolons just ensure the proper relationship between transparencies and animation layers. Note that without setting up two layers, the foreground objects on transparencies 2 through 99 that have been added during the first 49 frames would be overprinted by the new background image, transparency 1, from frame 50 onward.
+\normalsize
+In this timeline, the transparencies are grouped into two layers. One is reserved for the background images, transparencies No. 0 \& 1, to be exchanged after 49 frames, and another one for the foreground objects that are successively added to the scene. As can be seen in this example, layers need not be explicitly populated; the leading semicolons just ensure the proper relationship between transparencies and animation layers. Note that \emph{without} setting up two layers, the foreground objects on transparencies 2 through 99 that have been added during the first 49 frames would be overprinted by the new background image, transparency 1, from frame 50 onward.
-See the second animation in Section~\ref{sect:examples} for a working example that makes use of the timeline and the layer concept.
+See the second animation, Fig.~\ref{fig:scarab}, in Section~\ref{sect:examples} for a working example that makes use of the timeline and the layer concept.
\section{Examples}
\subsection[Animations from sets of files, using `animategraphics' command]{Animations from sets of files, using {\tt \string\animategraphics} command}\label{sect:examples}
@@ -320,15 +340,15 @@ The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~
Contents of file `timeline.txt':
\small
\begin{verbatim}
-::0x0 % coordinate system & y=e^x, repeated until last frame
-::1 % one blue curve per frame
-::2
-::3
-::4
-::5
-::6
-::7
-::8
+ ::0x0 % coordinate system & y=e^x, repeated until last frame
+ ::1 % one blue curve per frame
+ ::2
+ ::3
+ ::4
+ ::5
+ ::6
+ ::7
+ ::8
\end{verbatim}
\normalsize
@@ -339,6 +359,39 @@ Contents of file `timeline.txt':
\end{figure}
The second, somewhat more complex example, Fig.~\ref{fig:scarab}, animates the geometric construction of a scarabaeus. In addition to the use of a timeline, it introduces the layer concept. This example is adapted from Maxime Chupin's original \MP{} source file \cite{chupin}. The present version separates stationary from moving parts of the drawing and saves them into different files. A total of 254 files, scarab\_0.mps through scarab\_253.mps, is written out by running `\verb+mpost --tex=latex+' on the source file `scarab.mp'. Files 0 through 100 contain the red line segments that make up the growing scarabaeus. Files 101 through 201 contain the moving construction lines and files 202 through 252 contain the gray lines which represent intermediate stages of the construction. The last file, No. 253, contains the coordinate axes, two stationary construction lines and the labels which do not move. A timeline file is written on-the-fly during the \LaTeX{} run. It arranges the animation into three layers, forcing the gray lines into the background, the coordinate axes into the intermediate layer and the scarabaeus along with the moving construction lines into the foreground. The final animation consists of 101 individual frames.
+\begin{figure}[t]
+\centering
+\newcounter{scarab}
+\setcounter{scarab}{0}
+\newcounter{blueline}
+\setcounter{blueline}{101}
+\newcounter{grayline}
+\setcounter{grayline}{202}
+%
+\newwrite\TimeLineFile
+\immediate\openout\TimeLineFile\jobname.tln
+\whiledo{\thescarab<101}{
+ \ifthenelse{\intcalcMod{\thescarab}{2}=0}{
+ \immediate\write\TimeLineFile{::\thegrayline x0;253;\thescarab x0,\theblueline}
+ \stepcounter{grayline}
+ }{
+ \immediate\write\TimeLineFile{::;253;\thescarab x0,\theblueline}
+ }
+ \stepcounter{scarab}
+ \stepcounter{blueline}
+}
+\immediate\closeout\TimeLineFile
+%
+\animategraphics[
+ width=0.8\linewidth,
+ controls,
+ loop,
+ timeline=\jobname.tln
+]{12}{scarab_}{0}{253}
+%
+\caption{}\label{fig:scarab}
+\end{figure}
+
\small
\begin{verbatim}
\documentclass{article}
@@ -372,6 +425,7 @@ The second, somewhat more complex example, Fig.~\ref{fig:scarab}, animates the g
\immediate\closeout\TimeLineFile
\begin{document}
+
\begin{center}
\animategraphics[
width=0.8\linewidth,
@@ -379,41 +433,9 @@ The second, somewhat more complex example, Fig.~\ref{fig:scarab}, animates the g
timeline=\jobname.tln
]{12}{scarab_}{0}{253}
\end{center}
+
\end{document}
\end{verbatim}
-\begin{figure}
-\centering
-\newcounter{scarab}
-\setcounter{scarab}{0}
-\newcounter{blueline}
-\setcounter{blueline}{101}
-\newcounter{grayline}
-\setcounter{grayline}{202}
-
-\newwrite\TimeLineFile
-\immediate\openout\TimeLineFile\jobname.tln
-\whiledo{\thescarab<101}{
- \ifthenelse{\intcalcMod{\thescarab}{2}=0}{
- \immediate\write\TimeLineFile{::\thegrayline x0;253;\thescarab x0,\theblueline}
- \stepcounter{grayline}
- }{
- \immediate\write\TimeLineFile{::;253;\thescarab x0,\theblueline}
- }
- \stepcounter{scarab}
- \stepcounter{blueline}
-}
-\immediate\closeout\TimeLineFile
-
-\animategraphics[
- width=0.8\linewidth,
- controls,
- loop,
- timeline=\jobname.tln
-]{12}{scarab_}{0}{253}
-
-\caption{}\label{fig:scarab}
-\end{figure}
-
\normalsize
\subsection[Animating PSTricks graphics, using `animateinline' environment]{Animating PSTricks graphics, using `{\tt animateinline}' environment}
Fig.~\ref{fig:torus} is an inline graphics example adapted from \cite{gilg05}.
@@ -461,13 +483,12 @@ Fig.~\ref{fig:torus} is an inline graphics example adapted from \cite{gilg05}.
\torus{\thetorusangle}%
}
\end{animateinline}%
-
\end{center}
\end{document}
\end{verbatim}
-
\normalsize
+
\begin{figure}
\centering
\newcommand{\torus}[1]{% #1: angle of the torus sector
@@ -550,26 +571,25 @@ Fig.~\ref{fig:torus} is an inline graphics example adapted from \cite{gilg05}.
\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.
- MiKTeX:
+ MiK\TeX:
\begin{enumerate}
\item Open a command line window.
\item\label{item:firststep} At the DOS prompt, enter\\
{\tt initexmf -{}-edit-config-file=latex}
- \item Insert\\
- {\tt main\_memory=8000000}\\
- {\tt save\_size=80000}\\
+ \item Type\\
+ {\tt main\_memory=10000000}\\
into the editor window that opens, save the file and quit the editor.
\item\label{item:laststep} To rebuild the format, enter\\
{\tt initexmf -{}-dump=latex}
\item Repeat steps \ref{item:firststep}--\ref{item:laststep} with config file `{\tt pdflatex}'
\end{enumerate}
- TeX-Live:
+ \TeX\ Live:
\begin{enumerate}
\item Find the configuration file `texmf.cnf' by means of\\
{\tt kpsewhich texmf.cnf}\\
at the shell prompt in a terminal.
- \item As Root, open the file in your favourite text editor, scroll to the entries `{\tt main\_memory}' \& `{\tt save\_size}' and change them to the values given above; save and quit.
+ \item As Root, open the file in your favourite text editor, scroll to the `{\tt main\_memory}' entry and change it to the value given above; save and quit.
\item Rebuild the formats by\\
{\tt fmtutil-sys -{}-byfmt latex}\\
{\tt fmtutil-sys -{}-byfmt pdflatex}