Skip to content

Commit 0408293

Browse files
committed
Hadn't realized the codeexample environment only allowed a single \tikz command. Now using a tikzpicture.
1 parent ca999ac commit 0408293

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,10 +1104,12 @@ \subsection{Repeating Things: For-Loops}
11041104
rounding errors:
11051105
%
11061106
\begin{codeexample}[]
1107-
\tikz \foreach \x in {-1,-0.5,...,1}
1108-
\draw (\x cm,-1pt) -- (\x cm,1pt);
1109-
\tikz \foreach \x in {-1,-0.8,...,1}
1110-
\draw (\x cm,-7pt) -- (\x cm,-5pt);
1107+
\begin{tikzpicture}
1108+
\foreach \x in {-1,-0.5,...,1}
1109+
\draw (\x cm,-1pt) -- (\x cm,1pt);
1110+
\foreach \x in {-1,-0.8,...,1}
1111+
\draw (\x cm,-7pt) -- (\x cm,-5pt);
1112+
\end{tikzpicture}
11111113
\end{codeexample}
11121114

11131115
We can also nest loops to create interesting effects:

0 commit comments

Comments
 (0)