summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-10-29 00:31:31 +0000
committerKarl Berry <karl@freefriends.org>2010-10-29 00:31:31 +0000
commit6bc1f5497cfb2f56d65c80a4c36ea3bad6dc046c (patch)
treef7751da75030fb1e06653eeb44e579fcee09c65f /Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex
parented0c7c756e441b2d2ba3633da233fc24361ac0d3 (diff)
pgf 2.10 (28oct10)
git-svn-id: svn://tug.org/texlive/trunk@20236 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex70
1 files changed, 34 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex
index 85891e6d9de..063b4570a7e 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex
@@ -26,7 +26,7 @@ apply to everything within the environment.
\begin{package}{tikz}
This package does not have any options.
-
+
This will automatically load the \pgfname\ and the |pgffor| package.
\pgfname\ needs to know what \TeX\ driver you are intending to use. In
@@ -35,7 +35,7 @@ apply to everything within the environment.
situation where \pgfname\ cannot know the driver ``by itself'' is when
you use plain \TeX\ or Con\TeX t together with |dvipdfm|. In this case,
you have to write |\def\pgfsysdriver{pgfsys-dvipdfm.def}|
- \emph{before} you input |tikz.tex|.
+ \emph{before} you input |tikz.tex|.
\end{package}
@@ -45,7 +45,7 @@ apply to everything within the environment.
libraries separated by commas. Instead of curly braces, you can also
use square brackets, which is something Con\TeX t users will
like. If you try to load a library a second time, nothing will
- happen.
+ happen.
\example |\usetikzlibrary{arrows}|
@@ -66,7 +66,7 @@ apply to everything within the environment.
\subsubsection{Creating a Picture Using an Environment}
-The ``outermost'' scope of \tikzname\ is the |{tikzpicture}|
+The ``outermost'' scope of \tikzname\ is the |{tikzpicture}|
environment. You may give drawing commands only inside this
environment, giving them outside (as is possible in many other
packages) will result in chaos.
@@ -79,7 +79,7 @@ filenames of temporary files written while plotting functions using an
external program. The graphic options are specified in \emph{key
lists}, see Section~\ref{section-graphic-options} below for
details. All graphic options are local to the |{tikzpicture}| to which
-they apply.
+they apply.
\begin{environment}{{tikzpicture}\opt{\oarg{options}}}
All \tikzname\ commands should be given inside this
@@ -87,7 +87,7 @@ they apply.
packages, it is not possible to use, say, |\pgfpathmoveto| outside
this environment and doing so will result in chaos. For \tikzname,
commands like |\path| are only defined inside this environment, so
- there is little chance that you will do something wrong here.
+ there is little chance that you will do something wrong here.
When this environment is encountered, the \meta{options} are
parsed, see Section~\ref{section-graphic-options}. All options given
@@ -108,7 +108,7 @@ they apply.
then resizes the picture box such that the box has this size. To ``make its
guess,'' everytime \pgfname\ encounters a coordinate, it updates the
bounding box's size such that it encompasses all these
- coordinates. This will usually give a good
+ coordinates. This will usually give a good
approximation of the bounding box, but will not always be
accurate. First, the line thickness of diagonal lines is not taken
into account correctly. Second, controls points of a curve often lie far
@@ -117,7 +117,7 @@ they apply.
The following key influences the baseline of the resulting
picture:
- \begin{key}{/tikz/baseline=\meta{dimension or coordinate} (default 0pt)}
+ \begin{key}{/tikz/baseline=\meta{dimension or coordinate or \texttt{default}} (default 0pt)}
Normally, the lower end of the picture is put on the baseline of
the surrounding text. For example, when you give the code
|\tikz\draw(0,0)circle(.5ex);|, \pgfname\ will find out that the
@@ -137,7 +137,7 @@ $A \mathbin{\tikz[baseline] \draw[->>] (0pt,.5ex) -- (3ex,.5ex);} B$
\end{codeexample}
Instead of a \meta{dimension} you can also provide a coordinate in
- parantheses. Then the effect is to put the baseline on the
+ parentheses. Then the effect is to put the baseline on the
$y$-coordinate that the give \meta{coordinate} has \emph{at the
end of the picture}. This means that, at the end of the picture,
the \meta{coordinate} is evaluated and then the baseline is set
@@ -154,6 +154,8 @@ Top align:
\tikz[baseline=(current bounding box.north)]
\draw (0,0) rectangle (1cm,1ex);
\end{codeexample}
+
+ Use |baseline=default| to reset the |baseline| option to its initial configuration.
\end{key}
\begin{key}{/tikz/execute at begin picture=\meta{code}}
@@ -222,25 +224,23 @@ In other \TeX\ format, you should use instead the following commands:
\subsubsection{Creating a Picture Using a Command}
-The following two commands are used for ``small'' graphics.
-
-\begin{command}{\tikz\opt{\oarg{options}}\marg{commands}}
- This command places the \meta{commands} inside a
- |{tikzpicture}| environment and adds a semicolon at the end. This is
- just a convenience.
+The following command is an alternative to |{tikzpicture}| that is
+particular useful for graphics consisting of a single or few
+commands.
- The \meta{commands} may not contain a paragraph (an empty
- line). This is a precaution to ensure that users really use this
- command only for small graphics.
-
- \example |\tikz{\draw (0,0) rectangle (2ex,1ex)}| yields
- \tikz{\draw (0,0) rectangle (2ex,1ex);}
-\end{command}
+\begin{command}{\tikz\opt{\oarg{options}}\marg{path commands}}
+ This command places the \meta{path commands} inside a
+ |{tikzpicture}| environment. The \meta{path commands} may
+ contain paragraphs and fragile material (like verbatim text).
+ If there is only one path command, it need not be surrounded by
+ curly braces, if there are several, you need to add them (this is
+ similar to the |\foreach| statement and also to the rules in
+ programming languages like Java or C concerning the placement of
+ curly braces).
-\begin{command}{\tikz\opt{\oarg{options}}\meta{text}|;|}
- If the \meta{text} does not start with an opening brace, the end of
- the \meta{text} is the next semicolon that is encountered.
+ \example |\tikz{\draw (0,0) rectangle (2ex,1ex);}| yields
+ \tikz{\draw (0,0) rectangle (2ex,1ex);}
\example |\tikz \draw (0,0) rectangle (2ex,1ex);| yields
\tikz \draw (0,0) rectangle (2ex,1ex);
@@ -259,7 +259,7 @@ some other kind of decoration.
Since backgrounds are often not needed at all, the definition of
styles for adding backgrounds has been put in the library package
|backgrounds|. This package is documented in
-Section~\ref{section-tikz-backgrounds}.
+Section~\ref{section-tikz-backgrounds}.
\subsection{Using Scopes to Structure a Picture}
@@ -291,7 +291,7 @@ chance of doing anything wrong.
\end{scope}
\end{tikzpicture}
\end{codeexample}
-
+
The following style influences scopes:
\begin{stylekey}{/tikz/every scope (initially \normalfont empty)}
This style is installed at the beginning of every scope.
@@ -309,7 +309,7 @@ chance of doing anything wrong.
This option installs some code that will be executed
at the end of the current scope. Using this option multiple times
will cause the code to accumulate. This option must also be given
- in the optional argument of the |{scope}| environment.
+ in the optional argument of the |{scope}| environment.
Again, the effect applies only to the current scope, not to subscopes.
\end{key}
@@ -329,7 +329,7 @@ chance of doing anything wrong.
There is a small library that makes using scopes a bit easier:
\begin{tikzlibrary}{scopes}
This library defines a shorthand for starting and ending |{scope}|
- environments.
+ environments.
\end{tikzlibrary}
When this library is loaded, the following happens: At certain places
inside a \tikzname\ picture, it is allowed to start a scope just using
@@ -353,7 +353,7 @@ square brackets:
\end{tikzpicture}
\end{codeexample}
-In the above example, |{ [thick]| actually causes a
+In the above example, |{ [thick]| actually causes a
|\begin{scope}[thick]| to be inserted, and the corresponding closing
|}| causes an |\end{scope}| to be inserted.
@@ -481,7 +481,7 @@ used in different pictures. In this case, we have to use the
|\tikzset| command somewhere at the beginning.
\begin{codeexample}[]
\tikzset{help lines/.style={blue!50,very thin}}
-% ...
+% ...
\begin{tikzpicture}
\draw (0,0) grid +(2,2);
\draw[help lines] (2,0) grid +(2,2);
@@ -504,7 +504,7 @@ In the above example, the option |blue!50| is appended to the style
last one will ``win.'' There also exists a handler called
|/.prefix style| that adds something at the beginning of the style.
-Just as normal keys, styles can be parametrized. This means that you
+Just as normal keys, styles can be parameterized. This means that you
write \meta{style}|=|\meta{value} when you use the style instead of
just \meta{style}. In this case, all occurrences of |#1| in
\meta{style} are replaced by \meta{value}. Here is an example that
@@ -517,7 +517,7 @@ shows how this can be used.
\end{tikzpicture}
\end{codeexample}
-For parametrized styles you can also set a \emph{default} value using
+For parameterized styles you can also set a \emph{default} value using
the |/.default| handler:
\begin{codeexample}[]
@@ -529,6 +529,4 @@ the |/.default| handler:
\end{codeexample}
For more details on using and setting styles, see also
-Section~\ref{section-keys}.
-
-
+Section~\ref{section-keys}.