Skip to content

Commit

Permalink
Hadn't realized the codeexample environment only allowed a single `…
Browse files Browse the repository at this point in the history
…\tikz` command. Now using a `tikzpicture`.
  • Loading branch information
3geek14 committed Sep 20, 2021
1 parent ca999ac commit 0408293
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions doc/generic/pgf/text-en/pgfmanual-en-tutorial.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,12 @@ \subsection{Repeating Things: For-Loops}
rounding errors:
%
\begin{codeexample}[]
\tikz \foreach \x in {-1,-0.5,...,1}
\draw (\x cm,-1pt) -- (\x cm,1pt);
\tikz \foreach \x in {-1,-0.8,...,1}
\draw (\x cm,-7pt) -- (\x cm,-5pt);
\begin{tikzpicture}
\foreach \x in {-1,-0.5,...,1}
\draw (\x cm,-1pt) -- (\x cm,1pt);
\foreach \x in {-1,-0.8,...,1}
\draw (\x cm,-7pt) -- (\x cm,-5pt);
\end{tikzpicture}
\end{codeexample}

We can also nest loops to create interesting effects:
Expand Down

0 comments on commit 0408293

Please sign in to comment.