diff options
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.tex | 127 |
1 files changed, 123 insertions, 4 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 c527b42415e..d6841908568 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 @@ -1,8 +1,11 @@ -% Copyright 2003 by Till Tantau <tantau@cs.tu-berlin.de>. +% Copyright 2006 by Till Tantau % -% This program can be redistributed and/or modified under the terms -% of the LaTeX Project Public License Distributed from CTAN -% archives in directory macros/latex/base/lppl.txt. +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. \section[Hierarchical Structures: Package, Environments, Scopes, and Text] @@ -244,6 +247,29 @@ core): +\subsubsection{The Library Packages} + +There is a special command for loading library packages. + +\begin{command}{\usepgflibrary\marg{list of libraries}} + Use this command to load further libraries. The list of libraries + should contain the names of libraries separated by commas. Instead + of curly braces, you can also use square brackets. If you try to + load a library a second time, nothing will happen. + + \example |\usepgflibrary{arrows}| + + This command causes the the file + |pgflibrary|\meta{library}|.code.tex| to be loaded for each \meta{library} in + the \meta{list of libraries}. This means that in order to write your + own library file, place a file of the appropriate name somewhere + where \TeX\ can find it. \LaTeX, plain \TeX, and Con\TeX t + users can then use your library. + + You should also consider adding a \tikzname\ library that simply + includes your \pgfname\ library. +\end{command} + \subsection{The Hierarchical Structure of the Graphics} @@ -335,6 +361,33 @@ Rectangles \begin{pgfpicture} cases, you need to place the text inside a |\pgftext| command. This will ``escape back'' to normal \TeX\ mode, see Section~\ref{section-text-command} for details. + + \medskip + \textbf{Remembering a picture position for later reference.} + After a picture has been typset, its position on the page is + normally forgotten by \pgfname\ and also by \TeX. This means that is + not possible to reference a node in this picture later on. In + particular, it is normally impossible to draw lines between nodes in + different pictures automatically. + + 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 + environment. However, you can also just switch it on globally, then + the positions of all pictures are remembered. + + There are several reasons why the remembering is not switched on by + default. First, it does not work for all backend drivers (currently, it + works only for pdf\TeX). Second, it requires two passes of \TeX\ + over the file; on the first pass all positions will be wrong. Third, + for every remembered picture a line is added to the |.aux|-file, + which may result in a large number of extra lines. + + Despite all these ``problems,'' for documents that are processed + with pdf\TeX\ and in which there is only a small number of pictures + (less than a hundred or so), you can switch on this option globally, + it will not cause any significant slowing of \TeX. \end{environment} \begin{plainenvironment}{{pgfpicture}} @@ -342,6 +395,28 @@ Rectangles \begin{pgfpicture} version, also, a \TeX\ group is created around the environment. \end{plainenvironment} +\begin{contextenvironment}{{pgfpicture}} + This is the Con\TeX t version of the environment. +\end{contextenvironment} + + +{\let\ifpgfrememberpicturepositiononpage=\relax +\begin{command}{\ifpgfrememberpicturepositiononpage} + Determines whether the position of pictures on the page should be + recorded. The value of this \TeX-if at the end of a |{pgfpicture}| + environment is important, not the value at the beginning. + + 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 + 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} + and~\ref{section-cross-picture-tikz} for more details. +\end{command} +} + + \makeatletter \begin{command}{\pgfsetbaseline\marg{dimension}} This command specifies a $y$-coordinate of the picture that should @@ -362,6 +437,29 @@ Text \tikz{\pgfpathcircle{\pgfpointorigin}{1ex}\pgfusepath{stroke}}, \end{codeexample} \end{command} +\begin{command}{\pgfsetbaselinepointnow\marg{point}} + This command specifies the baseline indirectly, namely as the + $y$-coordinate that the given \meta{point} has when the command is + called. +\end{command} + +\begin{command}{\pgfsetbaselinepointlater\marg{point}} + This command also specifies the baseline indirectly, but the + $y$-coordinate of the given \meta{point} is only computed at the end + of the picture. + +\begin{codeexample}[] +Hello +\tikz{ + \pgfsetbaselinepointlater{\pgfpointanchor{X}{base}} + % Note: no shape X, yet + \node [cross out,draw] (X) {world.}; +} +\end{codeexample} +\end{command} + + + \subsubsection{Graphic Scope Environments} Inside a |{pgfpicture}| environment you can substructure your picture @@ -437,6 +535,10 @@ using the following environment: Plain \TeX\ version of the |{pgfscope}| environment. \end{plainenvironment} +\begin{contextenvironment}{{pgfscope}} + This is the Con\TeX t version of the environment. +\end{contextenvironment} + The following scopes also encapsulate certain properties of the graphic state. However, they are typically not used directly by the @@ -463,6 +565,15 @@ user. indeed, be dangerous in the middle of a path construction. \end{environment} +\begin{plainenvironment}{{pgfinterruptpath}} + Plain \TeX\ version of the environment. +\end{plainenvironment} + +\begin{contextenvironment}{{pgfinterruptpath}} + Con\TeX t version of the environment. +\end{contextenvironment} + + \begin{environment}{{pgfinterruptpicture}} This environment can be used to temporarily interrupt a |{pgfpicture}|. However, the environment is intended only to be used @@ -490,6 +601,14 @@ user. \end{codeexample} \end{environment} +\begin{plainenvironment}{{pgfinterruptpicture}} + Plain \TeX\ version of the environment. +\end{plainenvironment} + +\begin{contextenvironment}{{pgfinterruptpicture}} + Con\TeX t version of the environment. +\end{contextenvironment} + \subsubsection{Inserting Text and Images} |