summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex256
1 files changed, 200 insertions, 56 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex
index 32bfa24386d..29199296250 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-animations.tex
@@ -32,7 +32,10 @@ a change of, say, the opacity of a path is also an animation. \pgfname\ allows
you to specify such animations using a set of commands and keys that are
documented in the following.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{opacity}{
whom = node, begin on = {click}, entry = {0s}{1}, entry = {2s}{0} }
@@ -47,16 +50,16 @@ the output that a certain attribute of a certain object should change over time
in some specific way when the object is displayed. It is the job of the
document viewer application to actually compute and display the animation.
Interestingly, this means that animations neither increase the size of the
-ouput files noticably nor does it put a special burden on \TeX. The hard and
+output files noticeably nor does it put a special burden on \TeX. The hard and
complicated calculations are done by the viewer application, not by \TeX\ and
\pgfname.
Only few viewer applications and formats are currently ``up to the job'' of
-displaying animations. In particular, the popular \textsc{pdf} format does
+displaying animations. In particular, the popular \textsc{pdf} format does
\emph{not} allow one to specify animations in this way (one can partly ``fake''
animations at the high price of including a great number of precomputed
pictures and using JavaScript in special viewers, but this is really not the
-same thing as what \pgfname\ does). Indeed, currently only the \textsc{svg}
+same thing as what \pgfname\ does). Indeed, currently only the \textsc{svg}
format allows one to specify animations in a sensible way. Thus, \pgfname's
animations will only be displayed when \textsc{svg} is used as output format.
@@ -65,7 +68,11 @@ printing and depicting animations in a sequential manner, \pgfname\ also allows
you to create ``snapshots'' of animations. As an example, the following code
shows how the same drawing is shown at different ``time snapshots'':
%
-\begin{codeexample}[width=3.9cm]
+\begin{codeexample}[
+ width=3.9cm,
+ preamble={\usetikzlibrary{animations}
+\def\pgfname{\textsc{pgf}}
+}]
\tikz [make snapshot of=0.5s] \scoped :rotate = { 0s = "0", 2s = "90" }
\node [draw=blue, very thick] {\pgfname};
\tikz [make snapshot of=1s] \scoped :rotate = { 0s = "0", 2s = "90" }
@@ -95,7 +102,10 @@ takes a to-be-animated attribute and options specifying the timeline:
keys are used, ``outside'' the specified timeline the animation has no
effect:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2,2.5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2,2.5},
+]
\tikz {
\pgfanimateattribute{opacity}{
whom = node, begin on = {click}, entry = {0s}{1}, entry = {2s}{0} }
@@ -226,7 +236,10 @@ takes a to-be-animated attribute and options specifying the timeline:
Assigns a name to the animation by which it can be referenced using the
|of| and |of next| keys in another animation.
%
-\begin{codeexample}[animation list={.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {end, of next = my move animation, delay = 1s},
@@ -257,7 +270,10 @@ key:
\meta{attribute} should have over time. At the \meta{time} specified, the
\meta{attribute} will have the value specified as \meta{value}:
%
-\begin{codeexample}[animation list={.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click},
@@ -318,7 +334,10 @@ key:
\begin{key}{/pgf/animations/exit control=\marg{time fraction}\marg{value fraction}}
Same as |/tikz/animate/options/exit control|.
%
-\begin{codeexample}[animation list={0.333/\frac{1}{3},0.666/\frac{2}{3},1,1.333/1\frac{1}{3},1.666/1\frac{2}{3}}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.333/\frac{1}{3},0.666/\frac{2}{3},1,1.333/1\frac{1}{3},1.666/1\frac{2}{3}},
+]
\tikz {
\foreach \i in {0,0.1,...,1} \draw (-0.9,.9-\i) -- ++(1.8,0);
\pgfanimateattribute{translate}{
@@ -346,7 +365,10 @@ key:
\begin{key}{/pgf/animations/stay}
Same as |/tikz/animate/options/stay|.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2,2.5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2,2.5},
+]
\tikz {
\foreach \i in {0,0.1,...,1} \draw (-0.9,.9-\i) -- ++(1.8,0);
\pgfanimateattribute{translate}{
@@ -365,7 +387,10 @@ key:
\begin{key}{/pgf/animations/jump}
Same as |/tikz/animate/options/jump|.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\foreach \i in {0,0.1,...,1} \draw (-0.9,.9-\i) -- ++(1.8,0);
\pgfanimateattribute{translate}{
@@ -392,7 +417,10 @@ can set this value directly:
the timeline is not active. This makes it easy to specify the value of an
attribute when the animation is ``not running''.
%
-\begin{codeexample}[animation list={-1,0,1,2,3}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={-1,0,1,2,3},
+]
\tikz {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click},
@@ -464,7 +492,7 @@ Let us start with creating a snapshot:
is used in a \TeX\ scope, no animation is created and no support by the
driver is needed (so, it works with \textsc{pdf}).
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{animations}}]
\tikz [make snapshot of=1s,
animate = { myself: = {
:rotate = { 0s = "0", 2s = "90" },
@@ -516,8 +544,8 @@ Let us start with creating a snapshot:
snapshots:
%
\begin{itemize}
- \item The |begin| and |begin on| keys have no effect (but |begin
- snapshot| has one.
+ \item The |begin| and |begin on| keys have no effect (but
+ |begin snapshot| has one.
\item The |end| and |end on| keys have no effect.
\item The |current value| may not be used in a timeline (since
\pgfname\ cannot really determine this value).
@@ -539,14 +567,14 @@ Let us start with creating a snapshot:
|\pgfsnapshot| will select the last value of the timeline while
|\pgfsnapshotafter| will not apply the animation any more:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usepgfmodule{animations}}]
\foreach \t in {0,1,2,3,4} {
\pgfsnapshot{\t}
\tikz :rotate = { 0s = "0", 2s = "90", 2s = "180", 4s = "270" }
\node [draw=blue, very thick] {f}; }
\end{codeexample}
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usepgfmodule{animations}}]
\foreach \t in {0,1,2,3,4} {
\pgfsnapshotafter{\t}
\tikz :rotate = { 0s = "0", 2s = "90", 2s = "180", 4s = "270" }
@@ -565,7 +593,10 @@ Let us start with creating a snapshot:
(stroking) color, respectively. To animate both the fill and draw color,
you need to create two animations, one for each.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{fill}{
whom = node.background, begin on = {click},
@@ -577,7 +608,10 @@ Let us start with creating a snapshot:
\end{animateattribute}
\begin{animateattribute}{draw}
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{draw}{
whom = node.background, begin on = {click},
@@ -592,7 +626,11 @@ in this scope'' for filling or stroking. However, when an object inside the
scope has its color set explicitly, this color overrules the color of the
scope:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2},animation bb={(1.5,-0.75) rectangle (3,0.75)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+ animation bb={(1.5,-0.75) rectangle (3,0.75)},
+]
\tikz {
\pgfanimateattribute{fill}{
whom = example, begin on = {click, of next=node},
@@ -622,7 +660,11 @@ of the node's scope's color has no effect on the text color. Instead, you must
choose \meta{name}|.text| as the target (or, if the node has more parts, use
the name of the part as the identifier type instead of |text|).
%
-\begin{codeexample}[animation list={0.5,1,1.5,2},animation bb={(1.1,-0.9) rectangle (2.9,0.9)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+ animation bb={(1.1,-0.9) rectangle (2.9,0.9)},
+]
\tikz {
\pgfanimateattribute{fill}{
whom = example, begin on = {click, of next=node},
@@ -631,7 +673,11 @@ the name of the part as the identifier type instead of |text|).
\node at (2,0) (example) [fill = blue!20, circle] {No effect}; }
\end{codeexample}
-\begin{codeexample}[animation list={0.5,1,1.5,2},animation bb={(1.1,-0.9) rectangle (2.9,0.9)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+ animation bb={(1.1,-0.9) rectangle (2.9,0.9)},
+]
\tikz {
\pgfanimateattribute{fill}{
whom = example.background, begin on = {click, of next=node},
@@ -640,7 +686,11 @@ the name of the part as the identifier type instead of |text|).
\node at (2,0) (example) [fill = blue!20, circle] {Effect}; }
\end{codeexample}
-\begin{codeexample}[animation list={0.5,1,1.5,2},animation bb={(1.1,-0.9) rectangle (2.9,0.9)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+ animation bb={(1.1,-0.9) rectangle (2.9,0.9)},
+]
\tikz {
\pgfanimateattribute{fill}{
whom = example.text, begin on = {click, of next=node},
@@ -654,7 +704,10 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
(opaque).
\begin{animateattribute}{fill opacity}
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{fill opacity}{
whom = node, begin on = {click}, entry = {0s}{1}, entry = {2s}{0} }
@@ -664,7 +717,10 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
\end{animateattribute}
\begin{animateattribute}{draw opacity}
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{draw opacity}{
whom = node, begin on = {click}, entry = {0s}{1}, entry = {2s}{0} }
@@ -680,7 +736,10 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
which it is applied as a transparency group. In essence, ``this attribute
does what you want'' at least in most situations.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{opacity}{
whom = node, begin on = {click}, entry = {0s}{1}, entry = {2s}{0} }
@@ -696,7 +755,10 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
rendered. The (only) two possible values for this attribute are |false| and
|true|.
%
-\begin{codeexample}[animation list={1,2,3,4}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4},
+]
\tikz {
\pgfanimateattribute{visible}{
whom = node, begin on = {click}, entry = {0s}{false}, entry = {2s}{false} }
@@ -714,7 +776,11 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
you explicitly set the ``stage attribute'' to |true| the object ``enters''
the stage and ``leaves'' once more when it is no longer ``on stage''.
%
-\begin{codeexample}[animation list={-1,0,1,2,3},animation bb={(1.3,-0.7) rectangle (2.7,0.7)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={-1,0,1,2,3},
+ animation bb={(1.3,-0.7) rectangle (2.7,0.7)},
+]
\tikz {
\pgfanimateattribute{stage}{
whom = example, begin on = {click, of next=node},
@@ -732,7 +798,10 @@ drawing. You specify the opacity using a number between 0 (transparent) and 1
You can animate the appearance of a path in the following ways:
\begin{animateattribute}{line width}
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{line width}{
whom = node, begin on = {click}, entry = {0s}{1pt}, entry = {2s}{5mm} }
@@ -744,7 +813,10 @@ You can animate the appearance of a path in the following ways:
\end{animateattribute}
\begin{animateattribute}{dash}
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{dash}{
whom = node, begin on = {click}, entry = {0s}{{{10pt}{1pt}}{0pt}},
@@ -753,7 +825,10 @@ You can animate the appearance of a path in the following ways:
}
\end{codeexample}
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{dash}{
whom = node, begin on = {click}, entry = {0s}{{{1cm}{1pt}}{0pt}},
@@ -778,7 +853,10 @@ You can animate the appearance of a path in the following ways:
\begin{animateattribute}{path}
You can animate the path itself:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz {
\pgfanimateattribute{path}{
whom = node.background.path, begin on = {click, of next=node},
@@ -802,8 +880,8 @@ You can animate the appearance of a path in the following ways:
path consists of appropriate Bézier curves.
Unlike the dash pattern, the to-be-animated object is, indeed, the path
- itself and not some special scope. This means that you can use the |current
- value| for the start path. However, this also means that you really must
+ itself and not some special scope. This means that you can use the
+ |current value| for the start path. However, this also means that you really must
pick \emph{the path object} as the target of the animation. In conjunction
with \tikzname, this will be an object of type |path| as in the above
example.
@@ -838,7 +916,11 @@ You can animate the appearance of a path in the following ways:
path values are specified (since the shortening is done immediately when a
path value is parsed).
%
-\begin{codeexample}[animation list={0,1,2,3,4},animation bb={(0.9,-0.1)rectangle(2.1,1.1)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0,1,2,3,4},
+ animation bb={(0.9,-0.1)rectangle(2.1,1.1)},
+]
\tikz {
\pgfanimateattribute{path}{
whom = p.path, begin on = {click, of next=node}, arrows = ->,
@@ -862,7 +944,11 @@ You can animate the appearance of a path in the following ways:
there is no active animation, \emph{will} use the arrow tips. As a result,
you can use this to animate a path with an arrow tip:
%
-\begin{codeexample}[animation list={0,1,2,3,4},animation bb={(0.9,-0.1)rectangle(2.1,1.1)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0,1,2,3,4},
+ animation bb={(0.9,-0.1)rectangle(2.1,1.1)},
+]
\tikz {
\pgfanimateattribute{path}{
whom = p.path, begin on = {click, of next=node}, arrows = ->,
@@ -887,7 +973,11 @@ You can animate the appearance of a path in the following ways:
tip). Just like the |arrows| key, this key must be given before the path
entries are specified.
%
-\begin{codeexample}[animation list={0,1,2,3,4},animation bb={(0.9,-0.1)rectangle(2.1,1.1)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0,1,2,3,4},
+ animation bb={(0.9,-0.1)rectangle(2.1,1.1)},
+]
\tikz {
\pgfanimateattribute{path}{
whom = p.path, begin on = {click, of next=node}, arrows = ->,
@@ -937,7 +1027,10 @@ transformation matrix directly:
\begin{animateattribute}{scale}
The |scale| attribute adds an animation of the scaling:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{scale}{
whom = node, begin on = {click},
@@ -954,7 +1047,10 @@ transformation matrix directly:
\begin{animateattribute}{rotate}
The |rotate| key adds an animation of the rotation:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click},
@@ -970,7 +1066,10 @@ transformation matrix directly:
The |xskew| and |yskew| keys (and also |skew x| and |skew y|, which are
aliases) add an animation of the skew (given in degrees, not as a slant):
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{xskew}{
whom = node, begin on = {click}, entry = {0s}{0}, entry = {2s}{45} }
@@ -996,7 +1095,10 @@ transformation matrix directly:
\begin{animateattribute}{translate}
The |translate| key adds an animation of the translation (shift):
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{translate}{
whom = node, begin on = {click},
@@ -1033,7 +1135,10 @@ For all of these attributes, the following key is of importance:
origin of the transformation directly. Internally, however, all this key
does is to create the above-mentioned scopes with the necessary shifts.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click},
@@ -1048,7 +1153,10 @@ For all of these attributes, the following key is of importance:
A second way of changing the canvas transformation matrix is to use the
|motion| attribute:
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{motion}{
whom = node, begin on = {click},
@@ -1070,7 +1178,10 @@ For all of these attributes, the following key is of importance:
reference the start point of the path, a value of |1| references the
end of the path and |0.5| referenced the point halfway along the path.
%
-\begin{codeexample}[animation list={0.25,0.5,0.75,1,1.25,1.5,1.75,2,2.25,2.5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.25,0.5,0.75,1,1.25,1.5,1.75,2,2.25,2.5},
+]
\tikz [very thick] {
\pgfanimateattribute{motion}{
whom = node, begin on = {click},
@@ -1085,7 +1196,10 @@ For all of these attributes, the following key is of importance:
When set to |true|, the |along| key additionally adds a rotation that
varies in such a way that a tangent to the path always points right.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0.5,1,1.5,2},
+]
\tikz [very thick] {
\pgfanimateattribute{motion}{
whom = node, begin on = {click},
@@ -1113,11 +1227,16 @@ The final method of changing the transformation matrix is to animate a
In order to use a view, you first need to create a view, which is done
using a |{pgfviewboxscope}|, see Section~\ref{section-base-view}, which is
- used by the |view| library internally. You can then animate the view using
+ used by the |views| library internally. You can then animate the view using
the |view| attribute. The values passed to the |entry| key must be two
\pgfname-points, each surrounded by parentheses.
%
-\begin{codeexample}[animation list={0.5,1,1.5,2},animation bb={(1.1,-0.9) rectangle (2.9,0.9)}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}
+\usetikzlibrary{views}},
+ animation list={0.5,1,1.5,2},
+ animation bb={(1.1,-0.9) rectangle (2.9,0.9)},
+]
\tikz [very thick] {
\pgfanimateattribute{view}{
whom = me.view, begin on = {click, of next=node}, freeze at end,
@@ -1133,7 +1252,11 @@ The final method of changing the transformation matrix is to animate a
}
\end{codeexample}
-\begin{codeexample}[width=2cm]
+\begin{codeexample}[
+ width=2cm,
+ preamble={\usepgfmodule{animations}
+\usetikzlibrary{views}},
+]
\tikz [very thick] {
\pgfanimateattribute{view}{
whom = me.view, begin on = {click, of next=n1}, freeze at end,
@@ -1189,7 +1312,7 @@ also the key |end|, allow you to specify answers to these questions.
will run, relative to the moment when the graphic is displayed from 3\,s to
4\,s.
%
-\begin{codeexample}[width=3cm]
+\begin{codeexample}[preamble={\usepgfmodule{animations}},width=3cm]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin = 2s, end = 4s,
@@ -1211,7 +1334,10 @@ following key governs what should happen:
``stays put''. When set to |false|, which is the initial value, once an
animation ends, its effect will be removed ``as if it never happened''.
%
-\begin{codeexample}[animation list={0,1,2,3,4}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0,1,2,3,4},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, freeze at end = false,
@@ -1219,7 +1345,10 @@ following key governs what should happen:
\node (node) [fill = blue!20, draw = blue, circle] {Here!}; }
\end{codeexample}
%
-\begin{codeexample}[animation list={0,1,2,3,4}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={0,1,2,3,4},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, freeze at end,
@@ -1271,7 +1400,10 @@ that the timeline should be repeated a certain number of times or indefinitely.
\begin{itemize}
\item Empty, in which case the timeline repeats forever.
%
-\begin{codeexample}[animation list={1,2,3,4,5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4,5},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, repeats,
@@ -1282,7 +1414,10 @@ that the timeline should be repeated a certain number of times or indefinitely.
\item A \meta{number} (like |2| or |3.25|), in which case the timeline
repeats \meta{number} times.
%
-\begin{codeexample}[animation list={1,2,3,4,5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4,5},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, repeats = 1.75,
@@ -1294,7 +1429,10 @@ that the timeline should be repeated a certain number of times or indefinitely.
which case the timeline repeats however often necessary so that it
stops exactly after \meta{time}.
%
-\begin{codeexample}[animation list={1,2,3,4,5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4,5},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, repeats = for 3.5s,
@@ -1319,7 +1457,10 @@ that the timeline should be repeated a certain number of times or indefinitely.
contrast, when the repeats are accumulating, the scope will move by
5\,cm over 5\,s in total.
%
-\begin{codeexample}[animation list={1,2,3,4,5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4,5},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, repeats = accumulating,
@@ -1327,7 +1468,10 @@ that the timeline should be repeated a certain number of times or indefinitely.
\node (node) [fill = blue!20, draw = blue, circle] {Click me!}; }
\end{codeexample}
%
-\begin{codeexample}[animation list={1,2,3,4,5}]
+\begin{codeexample}[
+ preamble={\usepgfmodule{animations}},
+ animation list={1,2,3,4,5},
+]
\tikz [very thick] {
\pgfanimateattribute{rotate}{
whom = node, begin on = {click}, repeats = 2 accumulating,