Skip to content

Commit

Permalink
Fix missing preamble in control/doc.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
hansonchar committed Jun 20, 2024
1 parent b22692c commit 4c582fc
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions tex/generic/pgf/graphdrawing/lua/pgf/gd/control/doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,17 @@ example
anchor node=y, anchor at={(2,0)}] { x -> {y,z} };
]]

example
[[
\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
example({
options = [[ preamble=\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{layered} ]],
code = [[
\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}
]]
\graph [layered layout, anchor node=c, edges=rounded corners]
{ a -- {b [x=1,y=1], c [x=1,y=1] } -- d -- a};
\end{tikzpicture}
]]
})
--------------------------------------------------------------------


Expand All @@ -209,15 +211,17 @@ 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);
example({
options = [[ preamble=\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{layered} ]],
code = [[
\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}
]]
\graph [layered layout, edges=rounded corners, anchor at={(1,2)}]
{ a -- {b, c [anchor here] } -- d -- a};
\end{tikzpicture}
]]
})
--------------------------------------------------------------------


Expand All @@ -239,13 +243,15 @@ In the example, |c| is placed at the origin since this is the
default |anchor at| position.
]]

example
[[
\begin{tikzpicture}
\draw [help lines] (0,0) grid (2,2);
example({
options = [[ preamble=\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{layered} ]],
code = [[
\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}
]]
\graph [layered layout, edges=rounded corners]
{ a -- {b, c [anchor here] } -- d -- a};
\end{tikzpicture}
]]
})
--------------------------------------------------------------------

0 comments on commit 4c582fc

Please sign in to comment.