summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua37
1 files changed, 15 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
index c7adfab830e..2d8317bd72d 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
@@ -30,7 +30,6 @@ documentation
Now, when you set this key for a single node of a graph,
then, by shifting the graph around, this ``wish'' can obviously
always be fulfill:
-%
\begin{codeexample}[]
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
@@ -40,7 +39,6 @@ always be fulfill:
};
\end{tikzpicture}
\end{codeexample}
-%
\begin{codeexample}[]
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
@@ -50,7 +48,6 @@ always be fulfill:
};
\end{tikzpicture}
\end{codeexample}
-%
Since the key's name is a bit long and since the many braces and
parentheses are a bit cumbersome, there is a special support for
this key inside a |graph|: The standard |/tikz/at| key is redefined
@@ -60,7 +57,6 @@ specify an |at| position for a node whose position it to be computed
by a graph drawing algorithm.) A nice side effect of this is that
you can use the |x| and |y| keys (see
Section~\ref{section-graphs-xy}) to specify desired positions:
-%
\begin{codeexample}[]
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
@@ -70,7 +66,6 @@ Section~\ref{section-graphs-xy}) to specify desired positions:
};
\end{tikzpicture}
\end{codeexample}
-%
\begin{codeexample}[]
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
@@ -80,7 +75,7 @@ Section~\ref{section-graphs-xy}) to specify desired positions:
};
\end{tikzpicture}
\end{codeexample}
-
+
A problem arises when two or more nodes have this key set, because
then your ``desires'' for placement and the positions computed by
the graph drawing algorithm may clash. Graph drawing algorithms are
@@ -88,10 +83,10 @@ the graph drawing algorithm may clash. Graph drawing algorithms are
ignore these desired positions since they will be taken care of in
the so-called post-anchoring phase, see below. However, for some
algorithms it makes a lot of sense to fix the positions of some
-nodes and only compute the positions of the other nodes relative
-to these nodes. For instance, for a |spring layout| it makes perfect
-sense that some nodes are ``nailed to the canvas'' while other
-nodes can ``move freely''.
+nodes and only compute the positions
+of the other nodes relative to these nodes. For instance, for a
+|spring layout| it makes perfect sense that some nodes are
+``nailed to the canvas'' while other nodes can ``move freely''.
]]
example
@@ -139,21 +134,19 @@ key "anchor node"
summary
[[
This option can be used with a graph to specify a node that
-should be used for anchoring the whole graph.
+should be used for anchoring the whole graph.
]]
documentation
[[
When this option is specified, after the layout has been computed, the
whole graph will be shifted in such a way that the \meta{node name} is
-either
-%
+either
\begin{itemize}
- \item at the current value of |anchor at| or
- \item at the position that is specified in the form of a
- |desired at| for the \meta{node name}.
+\item at the current value of |anchor at| or
+\item at the position that is specified in the form of a
+ |desired at| for the \meta{node name}.
\end{itemize}
-%
Note how in the last example |c| is placed at |(1,1)| rather than
|b| as would happen by default.
]]
@@ -170,7 +163,7 @@ example
[[
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
-
+
\graph [layered layout, anchor node=c, edges=rounded corners]
{ a -- {b [x=1,y=1], c [x=1,y=1] } -- d -- a};
\end{tikzpicture}
@@ -185,15 +178,15 @@ key "anchor at"
summary
[[
-The coordinate at which the graph should be anchored when no
-explicit anchor is given for any node. The initial value is the origin.
+The coordinate at which the graph should be anchored when no
+explicit anchor is given for any node. The initial value is the origin.
]]
example
[[
\begin{tikzpicture}
\draw [help lines] (0,0) grid (2,2);
-
+
\graph [layered layout, edges=rounded corners, anchor at={(1,2)}]
{ a -- {b, c [anchor here] } -- d -- a};
\end{tikzpicture}
@@ -223,7 +216,7 @@ example
[[
\begin{tikzpicture}
\draw [help lines] (0,0) grid (2,2);
-
+
\graph [layered layout, edges=rounded corners]
{ a -- {b, c [anchor here] } -- d -- a};
\end{tikzpicture}