summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex')
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex18
1 files changed, 12 insertions, 6 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex
index c46b8ed5f5..7d83ccb75f 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-library-lsystems.tex
@@ -25,7 +25,10 @@ executed.
In \pgfname, L-systems can be used to create simple 2-dimensional fractal
patterns\ldots
%
-\begin{codeexample}[pre={\expandafter\let\csname pgf@lsystem@Koch curve\endcsname=\relax}]
+\begin{codeexample}[
+ preamble={\usetikzlibrary{lindenmayersystems}},
+ pre={\expandafter\let\csname pgf@lsystem@Koch curve\endcsname=\relax},
+]
\begin{tikzpicture}
\pgfdeclarelindenmayersystem{Koch curve}{
\rule{F -> F-F++F-F}
@@ -39,7 +42,7 @@ patterns\ldots
%
\noindent\ldots and ``plant like'' patterns\ldots
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{lindenmayersystems}}]
\begin{tikzpicture}
\draw [green!50!black, rotate=90]
[l-system={rule set={F -> FF-[-F+F]+[+F-F]}, axiom=F, order=4, step=2pt,
@@ -239,7 +242,10 @@ command:
case |A| and |B|, do not have to have code associated with them. They
simply control the growth of the system.
%
-\begin{codeexample}[pre={\nullfont\expandafter\let\csname pgf@lsystem@Hilbert curve\endcsname=\relax}]
+\begin{codeexample}[
+ preamble={\usetikzlibrary{lindenmayersystems}},
+ pre={\nullfont\expandafter\let\csname pgf@lsystem@Hilbert curve\endcsname=\relax},
+]
\pgfdeclarelindenmayersystem{Hilbert curve}{
\symbol{X}{\pgflsystemdrawforward}
\symbol{+}{\pgflsystemturnright} % Explicitly define + and - symbols.
@@ -268,7 +274,7 @@ The following command is used to run an L-system in \pgfname:
This origin will be where the L-system starts. In addition, the relevant
keys should be set appropriately.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{lindenmayersystems}}]
\begin{tikzpicture}
\draw [help lines] grid (3,2);
\pgfset{lindenmayer system/.cd, angle=60, step=2pt}
@@ -352,7 +358,7 @@ not have to keep repeating this path:
drawing (empty symbols can still be used to control the growth of the
system). The rules in \meta{list} should be separated by commas.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{lindenmayersystems}}]
\tikz[rotate=65]\draw [green!60!black] l-system
[l-system={rule set={F -> F[+F]F[-F]}, axiom=F, order=4, angle=25,step=3pt}];
\end{codeexample}
@@ -365,7 +371,7 @@ not have to keep repeating this path:
inside a special (rectangle) node which can be positioned using
\meta{anchor}.
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{lindenmayersystems}}]
\begin{tikzpicture}[l-system={step=1.75pt, order=5, angle=60}]
\pgfdeclarelindenmayersystem{Sierpinski triangle}{
\symbol{X}{\pgflsystemdrawforward}