summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
committerNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
commit18d9ec0eba21e6b8c55cdd50afb91c56e02ce7bf (patch)
tree56de5f55a6575a68557d5a384f57e3e8566c536d /graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex
parent3b24b0599bb35e1a3338fa33bfb24044a6125ba4 (diff)
CTAN sync 201912200300
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex')
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex23
1 files changed, 11 insertions, 12 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex
index 81be7f5fc9..68a1e2097c 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-base-decorations.tex
@@ -31,7 +31,7 @@ could be as simple as extending a path with a ``zigzagged'' line\ldots
\ldots but could also be as complex as typesetting text along a path:
%
{\catcode`\|12
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.text}}]
\tikz \path decorate [decoration={text along path,
text={Some text along a path}}]
{ (0,2) .. controls (2,2) and (1,0) .. (3,0) };
@@ -255,7 +255,7 @@ command describes the decoration automaton.
decoration will produce an output path, that is, it extends the
preexisting path. Here is an example:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations}}]
\pgfdeclaredecoration{example}{initial}
{
\state{initial}[width=10pt]
@@ -285,7 +285,7 @@ command describes the decoration automaton.
parts of the rest of the output path for the following
invocation. Here is an example:
%
-\begin{codeexample}[]
+\begin{codeexample}[pre={\pgfmathsetseed{1}},preamble={\usetikzlibrary{decorations,shapes.geometric}}]
\pgfdeclaredecoration{stars}{initial}{
\state{initial}[width=15pt]
{
@@ -306,7 +306,6 @@ command describes the decoration automaton.
.. controls (0,-5) and (3,-5) .. (3,-3);
\end{codeexample}
%
-
\item After the \meta{code} has been executed (possibly more than
once, if the |repeat state| option is used), the state switches
to whatever state has been specified inside the \meta{options}
@@ -334,8 +333,8 @@ command describes the decoration automaton.
\begin{key}{/pgf/decoration automaton/width=\meta{dimension}}
First, this option causes an immediate switch to the state |final|
if the remaining distance on the input path is less than
- \meta{dimension}. The effect is the same as if you had said |switch
- if less than=|\meta{dimension}| to final| just before the |width|
+ \meta{dimension}. The effect is the same as if you had said
+ |switch if less than=|\meta{dimension}| to final| just before the |width|
option.
If no switch occurs, this option tells \pgfname\ the width of the
@@ -474,7 +473,7 @@ command describes the decoration automaton.
The following example shows how these options can be used:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations}}]
\pgfdeclaredecoration{complicated example decoration}{initial}
{
\state{initial}[width=5pt,next state=up]
@@ -604,7 +603,7 @@ Once a decoration has been declared, it can be used.
\meta{before code} is executed. After the decoration automaton has
finished, \meta{after code} is executed.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.pathmorphing}}]
\begin{tikzpicture}[decoration={segment length=5pt}]
\draw [help lines] grid (3,2);
\begin{pgfdecoration}{{curveto}{1cm},{zigzag}{2cm},{curveto}{1cm}}
@@ -622,7 +621,7 @@ Once a decoration has been declared, it can be used.
path. Thus, it is possible to specify lengths like
|\pgfdecoratedpathlength/3|.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.pathmorphing}}]
\begin{tikzpicture}[decoration={segment length=5pt}]
\draw [help lines] grid (3,2);
\begin{pgfdecoration}{
@@ -653,7 +652,7 @@ Once a decoration has been declared, it can be used.
This means that if decorations do not use their own path, it is possible to
do something with them and continue from the correct place.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.pathmorphing}}]
\begin{tikzpicture}
\draw [help lines] grid (3,2);
\begin{pgfdecoration}{
@@ -764,7 +763,7 @@ minute transformation''.
Note when applying multiple decorations, this will be reset between
decorations, so it needs to be specified for each segment.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.pathmorphing}}]
\begin{tikzpicture}
\draw [help lines] grid (3,2);
\begin{pgfdecoration}{
@@ -906,7 +905,7 @@ decorations, a meta-decoration must be declared before it can be used.
Here is a complete example of a meta-decoration:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{decorations,decorations.pathmorphing}}]
\pgfdeclaremetadecoration{arrows}{initial}{
\state{initial}[width=0pt, next state=arrow]
{