summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex68
1 files changed, 48 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex
index ceb90cb8adf..9d8e999a863 100644
--- a/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex
+++ b/Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-base-scopes.tex
@@ -41,7 +41,7 @@ The \pgfname\ system consists of several layers:
The basic layer is documented in the present part.
\item[Frontend layer.]
- The frontend layer is not loaded by a single packages. Rather,
+ The frontend layer is not loaded by a single package. Rather,
different packages, like \tikzname\ or \textsc{pgfpict2e}, are
different frontends to the basic layer.
@@ -101,7 +101,7 @@ apply. In essence, the following scoping mechanisms are available:
keep changes of the graphic state local to that environment.
The effect of commands that change the graphic state are local to
- the current |{pgfscope}| but not always to the current \TeX\
+ the current |{pgfscope}|, but not always to the current \TeX\
group. Thus, if you open a \TeX\ group (some text in curly braces)
inside a |{pgfscope}|, and if you change, for example, the dash
pattern, the effect of this changed dash pattern will persist till
@@ -133,7 +133,7 @@ apply. In essence, the following scoping mechanisms are available:
The |\pgftext| command can be used to create a scope in which \TeX\
``escapes back'' to normal \TeX\ mode. The text passed to the
|\pgftext| is ``heavily guarded'' against having any effect on the
- scope in which it is used. For example, it is possibly to use
+ scope in which it is used. For example, it is possible to use
another |{pgfpicture}| environment inside the argument of
|\pgftext|.
\end{enumerate}
@@ -154,6 +154,7 @@ rules:
+
\subsection{The Hierarchical Structure of the Package}
Before we come to the structuring commands provided by \pgfname\ to
@@ -212,9 +213,9 @@ The following package is just a convenience.
What this command does is to load the file
|pgfmodule|\meta{module}|.code.tex| for each \meta{module} in
- the \meta{module names}. Thus, to write your own module,
+ the list of \meta{module names}. Thus, to write your own module,
all you need to do is to place a file of the appropriate name
- somewhere where \TeX\ can find it. \LaTeX, plain \TeX, and Con\TeX t
+ somewhere \TeX\ can find it. \LaTeX, plain \TeX, and Con\TeX t
users can then use your library.
\end{command}
@@ -294,7 +295,7 @@ environment.
``mentioned'' despite the fact that you will not ``see'' them in
your code.
- Once the \meta{environment contents} has been parsed completely, a
+ Once the \meta{environment contents} have been parsed completely, a
\TeX\ box is created whose size is the size of the computed bounding
box and this box is inserted at the current position.
@@ -366,7 +367,7 @@ Rectangles \begin{pgfpicture}
In order to make \pgfname\ ``remember'' a picture, the \TeX-if
|\||ifpgfrememberpicturepositiononpage| should be set to |true|. It
is only important that this \TeX-if is |true| at the end of the
- |{pgfpicture}|-environment, so you can switch it on inside the
+ |{pgfpicture}|-en\-vi\-ron\-ment, so you can switch it on inside the
environment. However, you can also just switch it on globally, then
the positions of all pictures are remembered.
@@ -401,7 +402,7 @@ Rectangles \begin{pgfpicture}
If this option is set to true of a picture, \pgfname\ will attempt
to record the position of the picture on the page. (This attempt
- will fail with most drivers and when it works it typically requires
+ will fail with most drivers and when it works, it typically requires
two runs of \TeX.) The position is not directly accessible. Rather,
the nodes mechanism will use this position if you access a node from
another picture. See Sections~\ref{section-cross-pictures-pgf}
@@ -417,16 +418,25 @@ Rectangles \begin{pgfpicture}
picture has been typeset completely, \pgfname\ must decide at which
height the baseline of the picture should lie. Normally, the
baseline is set to the $y$-coordinate of the bottom of the picture,
- but it is often desirable to use another height.
+ but it is often desirable to use a different height.
\begin{codeexample}[]
-Text \tikz{\pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}},
- \tikz{\pgfsetbaseline{0pt}
- \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}},
- \tikz{\pgfsetbaseline{.5ex}
- \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}},
- \tikz{\pgfsetbaseline{-1ex}
- \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}}.
+Text
+\begin{pgfpicture}
+ \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}
+\end{pgfpicture},
+\begin{pgfpicture}
+ \pgfsetbaseline{0pt}
+ \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}
+\end{pgfpicture},
+\begin{pgfpicture}
+ \pgfsetbaseline{.5ex}
+ \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}
+\end{pgfpicture},
+\begin{pgfpicture}
+ \pgfsetbaseline{-1ex}
+ \pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}
+\end{pgfpicture}.
\end{codeexample}
\end{command}
@@ -443,11 +453,11 @@ Text \tikz{\pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}},
\begin{codeexample}[]
Hello
-\tikz{
+\begin{pgfpicture}
\pgfsetbaselinepointlater{\pgfpointanchor{X}{base}}
% Note: no shape X, yet
- \node [cross out,draw] (X) {world.};
-}
+ \pgfnode{cross out}{center}{world.}{X}{\pgfusepath{stroke}}
+\end{pgfpicture}
\end{codeexample}
\end{command}
@@ -637,7 +647,7 @@ a shading into a |{pgfpicture}|.
This command will typeset \meta{text} in normal \TeX\ mode and
insert the resulting box into the |{pgfpicture}|. The bounding box
of the graphic will be updated so that all of the text box is
- inside. Be default, the text box is centered at the origin, but this
+ inside. By default, the text box is centered at the origin, but this
can be changed either by giving appropriate \meta{options} or by
applying an appropriate coordinate transformation beforehand.
@@ -737,3 +747,21 @@ a shading into a |{pgfpicture}|.
\end{key}
\end{command}
+
+
+\subsection{Error Messages and Warnings}
+
+Sometimes, a command inside \pgfname\ may fail. In this case, two
+commands are useful to communicate with the author:
+
+\begin{command}{\pgferror\marg{message}}
+ Stops the processing of the current document and prints out the
+ \meta{message}. In \LaTeX, this will be done using |\PackageError|,
+ otherwise |\errmessage| is used directly.
+\end{command}
+
+\begin{command}{\pgfwarning\marg{message}}
+ Prints the \meta{message} on the output, but does not interrupt the
+ processing. In \LaTeX, this will be done using |\PackageWarning|,
+ otherwise a write to stream $17$ is used.
+\end{command}