summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua142
1 files changed, 72 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
index c5019a56e23..9d9621e6da4 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
@@ -35,57 +35,57 @@ local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
--
-- The default method for placing the different components works as
-- follows:
--- %
+--
-- \begin{enumerate}
--- \item For each component, a layout is determined and the component is
--- oriented as described
--- Section~\ref{subsection-library-graphdrawing-standard-orientation}
--- on the orientation of graphs.
--- \item The components are sorted as prescribed by the
--- |component order| key.
--- \item The first component is now placed (conceptually) at the
--- origin. (The final position of this and all other components will be
--- determined later, namely in the anchoring phase, but let us imagine
--- that the first component lies at the origin at this point.)
--- \item The second component is now positioned relative to the first
--- component. The ``direction'' in which the next component is placed
--- relative to the first one is determined by the |component direction|
--- key, so components can be placed from left to right or up to down or
--- in any other direction (even something like $30^\circ$). However,
--- both internally and in the following description, we assume that the
--- components are placed from left to right; other directions are
--- achieved by doing some (clever) rotating of the arrangement achieved
--- in this way.
+-- \item For each component, a layout is determined and the component is
+-- oriented as described
+-- Section~\ref{subsection-library-graphdrawing-standard-orientation}
+-- on the orientation of graphs.
+-- \item The components are sorted as prescribed by the
+-- |component order| key.
+-- \item The first component is now placed (conceptually) at the
+-- origin. (The final position of this and all other components will be
+-- determined later, namely in the anchoring phase, but let us imagine
+-- that the first component lies at the origin at this point.)
+-- \item The second component is now positioned relative to the first
+-- component. The ``direction'' in which the next component is placed
+-- relative to the first one is determined by the |component direction|
+-- key, so components can be placed from left to right or up to down or
+-- in any other direction (even something like $30^\circ$). However,
+-- both internally and in the following description, we assume that the
+-- components are placed from left to right; other directions are
+-- achieved by doing some (clever) rotating of the arrangement achieved
+-- in this way.
--
--- So, we now wish to place the second component to the right of the
--- first component. The component is first shifted vertically according
--- to some alignment strategy. For instance, it can be shifted so that
--- the topmost node of the first component and the topmost node of the
--- second component have the same vertical position. Alternatively, we
--- might require that certain ``alignment nodes'' in both components
--- have the same vertical position. There are several other strategies,
--- which can be configured using the |component align| key.
+-- So, we now wish to place the second component to the right of the
+-- first component. The component is first shifted vertically according
+-- to some alignment strategy. For instance, it can be shifted so that
+-- the topmost node of the first component and the topmost node of the
+-- second component have the same vertical position. Alternatively, we
+-- might require that certain ``alignment nodes'' in both components
+-- have the same vertical position. There are several other strategies,
+-- which can be configured using the |component align| key.
--
--- One the vertical position has been fixed, the horizontal position is
--- computed. Here, two different strategies are available: First, image
--- rectangular bounding boxed to be drawn around both components. Then
--- we shift the second component such that the right border of the
--- bounding box of the first component touches the left border of the
--- bounding box of the second component. Instead of having the bounding
--- boxes ``touch'', we can also have a padding of |component sep|
--- between them. The second strategy is more involved and also known as
--- a ``skyline'' strategy, where (roughly) the components are
--- ``moved together as near as possible so that nodes do not touch''.
--- \item
--- After the second component has been placed, the third component is
--- considered and positioned relative to the second one, and so on.
--- \item
--- At the end, as hinted at earlier, the whole arrangement is rotate so
--- that instead of ``going right'' the component go in the direction of
--- |component direction|. Note, however, that this rotation applies only
--- to the ``shift'' of the components; the components themselves are
--- not rotated. Fortunately, this whole rotation process happens in the
--- background and the result is normally exactly what you would expect.
+-- One the vertical position has been fixed, the horizontal position is
+-- computed. Here, two different strategies are available: First, image
+-- rectangular bounding boxed to be drawn around both components. Then
+-- we shift the second component such that the right border of the
+-- bounding box of the first component touches the left border of the
+-- bounding box of the second component. Instead of having the bounding
+-- boxes ``touch,'' we can also have a padding of |component sep|
+-- between them. The second strategy is more involved and also known as
+-- a ``skyline'' strategy, where (roughly) the components are
+-- ``moved together as near as possible so that nodes do not touch''.
+-- \item
+-- After the second component has been placed, the third component is
+-- considered and positioned relative to the second one, and so on.
+-- \item
+-- At the end, as hinted at earlier, the whole arrangement is rotate so
+-- that instead of ``going right'' the component go in the direction of
+-- |component direction|. Note, however, that this rotation applies only
+-- to the ``shift'' of the components; the components themselves are
+-- not rotated. Fortunately, this whole rotation process happens in the
+-- background and the result is normally exactly what you would expect.
-- \end{enumerate}
--
-- In the following, we go over the different keys that can be used to
@@ -95,33 +95,35 @@ local declare = require "pgf.gd.interface.InterfaceToAlgorithms".declare
---
-
+
declare {
key = "componentwise",
type = "boolean",
- summary = [["
- For algorithms that also support drawing unconnected graphs, use
- this key to enforce that the components of the graph are,
- nevertheless, laid out individually. For algorithms that do not
- support laying out unconnected graphs, this option has no effect;
- rather it works as if this option were always set.
+ summary = [["
+ For algorithms that also support drawing unconnected graphs, use
+ this key to enforce that the components of the graph are,
+ nevertheless, laid out individually. For algorithms that do not
+ support laying out unconnected graphs, this option has no effect;
+ rather it works as if this option were always set.
"]],
- examples = {[["
- \tikz \graph [simple necklace layout]
- {
- a -- b -- c -- d -- a,
- 1 -- 2 -- 3 -- 1
- };
- "]],[[",
- \tikz \graph [simple necklace layout, componentwise]
- {
- a -- b -- c -- d -- a,
- 1 -- 2 -- 3 -- 1
- };
- "]]
+ examples = {
+ [["
+ \tikz \graph [simple necklace layout]
+ {
+ a -- b -- c -- d -- a,
+ 1 -- 2 -- 3 -- 1
+ };
+ "]],
+ [[",
+ \tikz \graph [simple necklace layout, componentwise]
+ {
+ a -- b -- c -- d -- a,
+ 1 -- 2 -- 3 -- 1
+ };
+ "]]
}
-}
-
+}
+