diff options
author | Karl Berry <karl@freefriends.org> | 2006-10-15 22:37:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-10-15 22:37:32 +0000 |
commit | 237df1eb06d422ff243a05b9a25501ba287681c1 (patch) | |
tree | 4cc4f2032474921cb986d1ca63b3cf9a267b480a /Master/texmf-dist/doc/generic/pgf/text-en/pgfmanual-en-tikz-scopes.tex | |
parent | 15e21b5bab66eca251ac48fdc052126505428d4e (diff) |
pgf/tikz 1.09 big update (13oct06)
git-svn-id: svn://tug.org/texlive/trunk@2332 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.tex | 74 |
1 files changed, 62 insertions, 12 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 5339e802d4a..0b0b5735c9f 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 @@ -1,9 +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 Styles] {Hierarchical Structures:\\ @@ -20,12 +22,12 @@ apply to everything within the environment. -\subsection{Loading the Package} +\subsection{Loading the Package and the Libraries} \begin{package}{tikz} This package does not have any options. - This will automatically load the \pgfname\ package and several other + This will automatically load the \pgfname\ package and some other stuff that \tikzname\ needs (like the |xkeyval| package). \pgfname\ needs to know what \TeX\ driver you are intending to use. In @@ -38,6 +40,28 @@ apply to everything within the environment. \end{package} +\begin{command}{\usetikzlibrary\marg{list of libraries}} + Once \tikzname\ has been loaded, you can 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, which is something Con\TeX t users will + like. If you try to load a library a second time, nothing will + happen. + + \example |\usetikzlibrary{arrows}| + + The above command will load a whole bunch of extra arrow tip + definitions. + + What this command does is to load the file + |pgflibrarytikz|\meta{library}|.code.tex| for each \meta{library} in + the \meta{list of libraries}. Thus, to write your own library file, + 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 + users can then use your library. +\end{command} + + \subsection{Creating a Picture} @@ -95,7 +119,7 @@ options are local to the |{tikzpicture}| to which they apply. The following option influences the baseline of the resulting picture: \begin{itemize} - \itemoption{baseline}\opt{|=|\meta{dimension}} + \itemoption{baseline}\opt{|=|\meta{dimension or coordinate}} 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 @@ -115,6 +139,25 @@ options are local to the |{tikzpicture}| to which they apply. $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 + $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 + to the $y$-coordinate of the resulting point. This makes it easy + to reference the $y$-coordinate of, say, the base line of nodes. +\begin{codeexample}[] +Hello +\tikz[baseline=(X.base)] + \node [cross out,draw] (X) {world.}; +\end{codeexample} + +\begin{codeexample}[] +Top align: +\tikz[baseline=(current bounding box.north)] + \draw (0,0) rectangle (1cm,1ex); +\end{codeexample} + \itemoption{execute at begin picture}|=|\meta{code} This option can be used to install some code that will be executed at the beginning of the picture. This option must be @@ -157,11 +200,16 @@ $A \mathbin{\tikz[baseline] \draw[->>] (0pt,.5ex) -- (3ex,.5ex);} B$ \end{itemize} \end{environment} -In plain \TeX, you should use instead the following commands: +In other \TeX\ format, you should use instead the following commands: \begin{plainenvironment}{{tikzpicture}\opt{\oarg{options}}} + This is the plain \TeX\ version of the environment. \end{plainenvironment} +\begin{contextenvironment}{{tikzpicture}\opt{\oarg{options}}} + This is the Con\TeX t version of the environment. +\end{contextenvironment} + \subsubsection{Creating a Picture Using a Command} @@ -259,12 +307,14 @@ chance of doing anything wrong. \end{itemize} \end{environment} - -In plain \TeX, you use the following commands instead: - \begin{plainenvironment}{{scope}\opt{\oarg{options}}} + Plain \TeX\ version of the environment. \end{plainenvironment} +\begin{contextenvironment}{{scope}\opt{\oarg{options}}} + Con\TeX t version of the environment. +\end{contextenvironment} + \subsection{Using Scopes Inside Paths} |