diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex index ac0d0080b64..4a8874131de 100644 --- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex +++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-paths.tex @@ -94,24 +94,25 @@ which is described in the subsections of the present section. the path options (like filling and drawing the path due to a |fill| and a |draw| option somewhere in the \meta{specification}), the nodes are added in a post-processing step. +\end{command} - \begin{key}{/tikz/name=\meta{path name}} - Assigns a name to the path for reference (specifically, for reference - in animations; for reference in intersections, use the |name path| - command, which has a different purpose, see the |intersections| library - for details). Since the name is a ``high-level'' name (drivers never - know of it), you can use spaces, number, letters, or whatever you like - when naming a path, but the name may \emph{not} contain any punctuation - like a dot, a comma, or a colon. - \end{key} +\begin{key}{/tikz/name=\meta{path name}} + Assigns a name to the path for reference (specifically, for reference + in animations; for reference in intersections, use the |name path| + command, which has a different purpose, see the |intersections| library + for details). Since the name is a ``high-level'' name (drivers never + know of it), you can use spaces, number, letters, or whatever you like + when naming a path, but the name may \emph{not} contain any punctuation + like a dot, a comma, or a colon. +\end{key} - The following style influences scopes: +The following style influences scopes: +% +\begin{stylekey}{/tikz/every path (initially \normalfont empty)} + This style is installed at the beginning of every path. This can be + useful for (temporarily) adding, say, the |draw| option to everything + in a scope. % - \begin{stylekey}{/tikz/every path (initially \normalfont empty)} - This style is installed at the beginning of every path. This can be - useful for (temporarily) adding, say, the |draw| option to everything - in a scope. - % \begin{codeexample}[] \begin{tikzpicture} [fill=yellow!80!black, % only sets the color @@ -120,8 +121,8 @@ which is described in the subsections of the present section. \shade (2,0) rectangle +(1,1); \end{tikzpicture} \end{codeexample} - \end{stylekey} -\end{command} + % +\end{stylekey} \begin{key}{/tikz/insert path=\meta{path}} This key can be used inside an option to add something to the current path. @@ -820,7 +821,7 @@ cosine curve whose end points are not multiples of $\pi/2$. The |svg| operation can be used to extend the current path by a path given in the \textsc{svg} path data syntax. This syntax is described in detail in -Section 8.3 of the \textsc{svg 1.1} specification, please consult this +Section~8.3 of the \textsc{svg 1.1} specification, please consult this specification for details. \begin{pathoperation}{svg}{\opt{\oarg{options}}\marg{path data}} @@ -832,7 +833,7 @@ specification for details. \meta{options} apply locally to this path operation, typically you will use them to set up, say, some transformations. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{svg.path}}] \begin{tikzpicture} \filldraw [fill=red!20] (0,1) svg[scale=2] {h 10 v 10 h -10} node [above left] {upper left} -- cycle; @@ -918,8 +919,8 @@ path to be used instead of the straight line. To do so, you specify the nodes between the |to| keyword and the coordinate (if there are options to the |to| operation, these come first). The effect of |(a) to node {x} (b)| (typically) is the same as if you had written - |(a) -- node {x} (b)|, namely that the node is placed on the to. This can - be used to add labels to tos: + |(a) -- node {x} (b)|, namely that the node is placed on the |to|. This can + be used to add labels to |to|s: % \begin{codeexample}[] \begin{tikzpicture} @@ -1184,7 +1185,7 @@ not actually extend that path, but have different, mostly local, effects. and a $y$-part measured in \TeX\ points (|pt|). In particular, point registers do not store nodes or node names. Here is an example: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{calc}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); @@ -1224,7 +1225,7 @@ not actually extend that path, but have different, mostly local, effects. point. Naturally, using the \verb!|-! notation, this could be written much more compactly. % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{calc}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); @@ -1241,7 +1242,7 @@ not actually extend that path, but have different, mostly local, effects. operation. If you wish to access a computed coordinate outside the body, you must use a |coordinate| path operation: % -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{calc}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,2); @@ -1263,7 +1264,7 @@ not actually extend that path, but have different, mostly local, effects. For a more useful application of the let operation, let us draw a circle that touches a given line: % -\begin{codeexample}[] +\begin{codeexample}[pre={\pgfmathsetseed{1}},preamble={\usetikzlibrary{calc}}] \begin{tikzpicture} \draw [help lines] (0,0) grid (3,3); @@ -1336,7 +1337,7 @@ to the |node| operation and discussed in detail in Section~\ref{section-pics}. This causes an animation of \meta{animate attribute} to be added to the current path, see Section~\ref{section-tikz-animations} for details. % -\begin{codeexample}[width=2cm] +\begin{codeexample}[width=2cm,preamble={\usetikzlibrary{animations}}] \tikz \draw :xshift = {0s = "0cm", 30s = "-3cm", repeats} (0,0) circle (5mm); \end{codeexample} % @@ -1392,10 +1393,10 @@ experts and should only be used deep inside clever macros, not on normal paths. \subsection{Interacting with the Soft Path subsystem} During construction \tikzname\ stores the path internally as a \emph{soft -path}. Sometimes it is desirable to save a path during the stage of -construction, restore it elsewhere and continue using it. There are two keys -to facilitate this operation, which are explained below. To learn more about -the soft path subsystem, refer to section~\ref{section-soft-paths}. +path}. Sometimes it is desirable to save a path during the stage of +construction, restore it elsewhere and continue using it. There are two keys to +facilitate this operation, which are explained below. To learn more about the +soft path subsystem, refer to section~\ref{section-soft-paths}. \begin{key}{/tikz/save path=\meta{macro}} Save the current soft path into \meta{macro}. @@ -1405,7 +1406,7 @@ the soft path subsystem, refer to section~\ref{section-soft-paths}. Set the current path to the soft path stored in \meta{macro}. \end{key} -\begin{codeexample}[] +\begin{codeexample}[preamble={\usetikzlibrary{intersections}}] \begin{tikzpicture} \path[save path=\pathA,name path=A] (0,1) to [bend left] (1,0); \path[save path=\pathB,name path=B] |