diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-27 00:01:50 +0000 |
commit | 90ae413a94da014dbf7a6a8ab584f7c668483a5a (patch) | |
tree | 4e0528a2b2fb2004988e7fc804ea2f1354f1f5d5 /Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex | |
parent | 800cc56380d1edfe567a6a66bef13e8950eb2b0c (diff) |
pgf 3.0.0
git-svn-id: svn://tug.org/texlive/trunk@33057 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex index 9c3ef4832a8..770f0c89dc3 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-pgffor.tex @@ -148,7 +148,7 @@ automatically by \tikzname, but not by \pgfname: |\foreach \x in {9,...,3.5} {\x, }| yields \foreach \x in {9,...,3.5} {\x, } - There is a yet a further special case for the |...| statement, in that + There is a yet another special case for the |...| statement, in that it can indicate an alphabetic character sequence: |\foreach \x in {a,...,m} {\x, }| yields \foreach \x in {a,...,m} {\x, } @@ -185,22 +185,26 @@ automatically by \tikzname, but not by \pgfname: \medskip \textbf{Using the foreach-statement inside paths.} - \tikzname\ allows you to use a |\foreach| statement inside a path - construction. In such a case, the \meta{commands} must be path - construction commands. Here are two examples: + \tikzname\ allows you to use |foreach| and |\foreach| (both have the + same effect) inside a path construction. In such a case, the + \meta{commands} must be path construction commands. Here are two + examples: \begin{codeexample}[] \tikz \draw (0,0) - \foreach \x in {1,...,3} + foreach \x in {1,...,3} { -- (\x,1) -- (\x,0) } ; \end{codeexample} \begin{codeexample}[] -\tikz \draw \foreach \p in {1,...,3} {(\p,1)--(\p,3) (1,\p)--(3,\p)}; +\tikz \draw foreach \p in {1,...,3} {(\p,1)--(\p,3) (1,\p)--(3,\p)}; \end{codeexample} + Note that the |node| and |pic| path commands also support the + |foreach| statement in special ways. + \medskip \textbf{Multiple variables.} You will often wish to iterate over two variables at the same @@ -238,7 +242,7 @@ automatically by \tikzname, but not by \pgfname: \begin{codeexample}[] \begin{tikzpicture} % Define some coordinates: - \path[nodes={circle,fill=examplefill,draw}] + \path[nodes={circle,fill=yellow!80!black,draw}] (0,0) node(a) {a} (2,0.55) node(b) {b} (1,1.5) node(c) {c} @@ -264,7 +268,7 @@ automatically by \tikzname, but not by \pgfname: \begin{codeexample}[] \begin{tikzpicture}[line cap=round,line width=3pt] - \filldraw [fill=examplefill] (0,0) circle (2cm); + \filldraw [fill=yellow!80!black] (0,0) circle (2cm); \foreach \angle / \label in {0/3, 30/2, 60/1, 90/12, 120/11, 150/10, 180/9, @@ -295,7 +299,7 @@ automatically by \tikzname, but not by \pgfname: The keys described below can be used in the \meta{options} argument to the |\foreach| command. They all have the path |/pgf/foreach/|, however, the path is set automatically when \meta{options} are - parsed, so it does not have to explicitly stated. + parsed, so it does not have to be explicitly stated. \begin{key}{/pgf/foreach/var=\meta{variable}} This key provides an alternative way to specify variables: @@ -304,7 +308,7 @@ automatically by \tikzname, but not by \pgfname: \end{key} \begin{key}{/pgf/foreach/evaluate=\meta{variable}| |\opt{|as |\meta{macro}| using |\meta{formula}}} - By default list items are not evaluated: |1+2|, yields |1+2|, + By default, list items are not evaluated: |1+2|, yields |1+2|, not |3|. This key allows a variable to be evaluated using the mathematical engine. The variable must have been specified either using the |var| key or in the \meta{variables} argument of the |