summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
committerNorbert Preining <norbert@preining.info>2019-12-20 03:00:48 +0000
commit18d9ec0eba21e6b8c55cdd50afb91c56e02ce7bf (patch)
tree56de5f55a6575a68557d5a384f57e3e8566c536d /graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex
parent3b24b0599bb35e1a3338fa33bfb24044a6125ba4 (diff)
CTAN sync 201912200300
Diffstat (limited to 'graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex')
-rw-r--r--graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex31
1 files changed, 18 insertions, 13 deletions
diff --git a/graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex b/graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex
index 961f1e1076..633df75b88 100644
--- a/graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex
+++ b/graphics/pgf/base/doc/text-en/pgfmanual-en-gd-usage-pgf.tex
@@ -45,7 +45,7 @@ The documentation of the \pgfname\ part of the graph drawing system that is
presented in the following includes only those macros that other \TeX\ packages
could conceivably call in order to use the graph drawing system without using
\tikzname; for instance, for efficiency reasons. (The internal callback
-functions defined in the graph drawing library that are part of the binding
+functions defined in the |graphdrawing| library that are part of the binding
between \pgfname\ and the graph drawing system are not documented, should not
be called, and may change in the future.)
@@ -72,7 +72,8 @@ independently of \TeX.
Let us have a look at a simple example to see what happens when a graph is
specified:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing}
+\usegdlibrary{trees}}]
\tikz[tree layout]
\graph {root [as=Hello] -> World[fill=blue!20]};
\end{codeexample}
@@ -84,8 +85,8 @@ the next call of |\pgfgdendscope|, all nodes that are created actually get
passed down to the graph drawing engine. This is implemented on the lowest
layer, namely by directly intercepting nodes freshly created using |\pgfnode|.
In our example, this happens in two places: For the |root| node and for the
-|World| node. The |graph| library and \tikzname\ internally call the |\pgfnode|
-macro for these two nodes (after a large number of internal syntax
+|World| node. The |graphs| library and \tikzname\ internally call the
+|\pgfnode| macro for these two nodes (after a large number of internal syntax
translations, but the graph drawing system does not care about them).
Note that the node boxes will have been fully created before they are passed
@@ -110,7 +111,7 @@ An overview of what happens is illustrated by the following call graph:
\begin{tikzpicture}[
class name/.style={draw,minimum size=20pt, fill=blue!20},
object node/.style={draw,minimum size=15pt, fill=yellow!20},
- p/.style={->,>=spaced stealth'},
+ p/.style={->,>={Stealth[round,sep]}},
livespan/.style={very thick},
xscale=0.8,
]
@@ -259,10 +260,10 @@ Graph drawing scopes are created using the following commands:
\item If the |graphs| library has been loaded, the default positioning
mechanisms of this library are switched off, leaving the
positioning to the graph drawing engine. Also, when an edge is
- created by the |graphs| library, this is signalled to the graph
- drawing library. (To be more precise: The keys |new ->| and so on
- are redefined so that they call |\pgfgdedge| instead of creating an
- edge.
+ created by the |graphs| library, this is signalled to the
+ |graphdrawing| library. (To be more precise: The keys |new ->| and
+ so on are redefined so that they call |\pgfgdedge| instead of
+ creating an edge.
\item The |edge| path command is modified so that it also calls
|\pgfgdedge| instead of immediately creating any edges.
\item The |edge from parent| path command is modified so that is also
@@ -533,7 +534,8 @@ of layout keys inside a picture will only open sublayouts.
|{tikzpicture}|, to |\scoped|, to |{scope}|, to |graph|, and to |{graph}|.
For instance, the |tree layout| option can be used in the following ways:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing}
+\usegdlibrary{trees}}]
\tikz [tree layout] \graph {1 -> {b,c}};
\tikz \graph [tree layout] {2 -> {b,c}};
\tikz \path graph [tree layout] {3 -> {b,c}};
@@ -555,7 +557,8 @@ of layout keys inside a picture will only open sublayouts.
particular, to typeset a tree given in the |child| syntax somewhere inside
a |{tikzpicture}|, you must prefix it with the |\scoped| command:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{graphdrawing}
+\usegdlibrary{trees}}]
\begin{tikzpicture}
\scoped [tree layout]
\node {root}
@@ -566,7 +569,8 @@ of layout keys inside a picture will only open sublayouts.
%
Naturally, the above could have been written more succinctly as
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{graphdrawing}
+\usegdlibrary{trees}}]
\tikz [tree layout]
\node {root}
child { node {left child} }
@@ -575,7 +579,8 @@ of layout keys inside a picture will only open sublayouts.
%
Or even more succinctly:
%
-\begin{codeexample}[]
+\begin{codeexample}[preamble={\usetikzlibrary{graphs,graphdrawing}
+\usegdlibrary{trees}}]
\tikz \graph [tree layout] { root -- {left child, right child} };
\end{codeexample}
%