Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add needed libraries to Lua examples as well (pgf-tikz#640 pgf-tikz#839) #882

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0043530
- adapted formatting in `pgf/text-en/pgfmanual-en-tikz-matrices.tex`
Mo-Gul May 30, 2020
cd43c1e
- adapted formatting in `pgfmanual-en-library-bbox.tex` and fixed a typo
Mo-Gul May 30, 2020
a094a64
added reference from `matrix` library to "basic" matrix section
Mo-Gul Jun 1, 2020
8bb074c
Merge remote-tracking branch 'remotes/upstream/master'
Mo-Gul Jun 5, 2020
b4e5e33
"improved" colors given in the `codeexample` of pull request #871
Mo-Gul Jun 5, 2020
4173bf6
added codeexample to `bbox` library manual as suggested in pull reque…
Mo-Gul Jun 12, 2020
286e2ac
removed braces as suggested in pull request #872
Mo-Gul Jun 12, 2020
17b1c58
added `codeexample` plus some text to the `decorations` library manua…
Mo-Gul Jun 12, 2020
b555dd5
Update doc/generic/pgf/text-en/pgfmanual-en-library-decorations.tex
Mo-Gul Jun 13, 2020
26fcd9e
Update doc/generic/pgf/text-en/pgfmanual-en-library-fpu.tex
Mo-Gul Jun 13, 2020
34b8955
followed @joulev's suggestion
Mo-Gul Jun 15, 2020
b0fee3f
Merge branch 'master' of https://github.com/Mo-Gul/pgf
Mo-Gul Jun 16, 2020
562bee9
Merge remote-tracking branch 'remotes/upstream/master'
Mo-Gul Jun 16, 2020
941de89
Merge remote-tracking branch 'remotes/upstream/master'
Mo-Gul Jun 16, 2020
f611fb1
Merge remote-tracking branch 'remotes/upstream/master'
Mo-Gul Jun 18, 2020
9fb67a7
added hints which libraries need to be loaded as well to make the exa…
Mo-Gul Jun 18, 2020
8e77219
corrected codeexample preamble entries
Mo-Gul Jun 18, 2020
239c7cb
added hints which libraries need to be loaded as well to make the exa…
Mo-Gul Jun 18, 2020
5574a34
Merge branch 'master' of https://github.com/Mo-Gul/pgf
Mo-Gul Jun 19, 2020
1e13bdf
add options to Lua (code) examples
Mo-Gul Jun 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/generic/pgf/text-en/pgfmanual-en-library-patterns.tex
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ \subsection{User-Defined Patterns}
The following settings can be used to reproduce the other |... lines|
patterns.
%
\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={horizontal lines},pattern color=orange]
(0,0) rectangle +(1,1);
Expand Down Expand Up @@ -315,7 +315,7 @@ \subsection{User-Defined Patterns}
The following settings can be used to reproduce the |grid| and
|crosshatch| patterns.
%
\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={grid},pattern color=orange]
(0,0) rectangle +(1,1);
Expand Down Expand Up @@ -363,7 +363,7 @@ \subsection{User-Defined Patterns}
The following settings can be used to reproduce the |dots| and
|crosshatch dots| patterns.
%
\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={dots},pattern color=orange]
(0,0) rectangle +(1,1);
Expand Down Expand Up @@ -413,7 +413,7 @@ \subsection{User-Defined Patterns}
Number of pointy ends of the stars.
\end{key}
%
\begin{codeexample}[preamble={\usetikzlibrary{patterns.meta}}]
\begin{codeexample}[preamble={\usetikzlibrary{patterns,patterns.meta}}]
\begin{tikzpicture}
\draw[pattern={fivepointed stars},pattern color=orange]
(0,0) rectangle +(1,1);
Expand Down
5 changes: 3 additions & 2 deletions doc/generic/pgf/text-en/pgfmanual-en-tikz-graphs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,9 @@ \subsubsection{Concept: Chain Groups}

As can be seen, the placement is not particularly nice by default, use the
algorithms from the graph drawing libraries to get a better layout. For
instance, adding |tree layout| to the above code results in the following
somewhat more pleasing rendering:
instance, adding |tree layout| to the above code (and
|\usetikzlibrary{graphdrawing}| as well as |\usegdlibrary{trees}| to the
preamble) results in the following somewhat more pleasing rendering:
%
\ifluatex
\medskip
Expand Down
8 changes: 4 additions & 4 deletions doc/generic/pgf/text-en/pgfmanual-en-tikz-matrices.tex
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ \subsubsection{Cell Styles and Options}
even odd column,
row,
even odd row,
cell
}
cell,
},
}
\end{codeexample}
%
Expand All @@ -581,8 +581,8 @@ \subsubsection{Cell Styles and Options}
column,
row,
cell,
/tikz/my style
}
/tikz/my style,
},
}
\end{codeexample}
%
Expand Down
7 changes: 5 additions & 2 deletions doc/generic/pgf/version-for-luatex/en/pgfmanual-test.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
\documentclass[a4paper]{ltxdoc}

% pgf version is defined in \pgfversion in file
% generic/pgf/utilities/pgfrcs.code.tex
% generic/pgf/utilities/pgfrcs.code.tex

\input{../pgfmanual-luatex.cfg}
\input{../../text-en/pgfmanual-en-main-preamble.tex}

\begin{document}

\include{pgfmanual-en-library-patterns}
%\include{pgfmanual-en-library-patterns}

\include{pgfmanual-en-gd-phylogenetics}
%\includeluadocumentationof{pgf.gd.pedigrees.library}

\end{document}
99 changes: 71 additions & 28 deletions tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentAlign.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,18 @@ declare {
than one node of a component, the node encountered first in the
component is used.
"]],
examples = [["
\tikz \graph [binary tree layout, nodes={draw}]
{ a, b -- c[align here], d -- e[second, align here] -- f };
"]]
examples = {{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [binary tree layout, nodes={draw}]
{ a, b -- c[align here], d -- e[second, align here] -- f };
"]],
}}
}

---
Expand Down Expand Up @@ -200,11 +208,19 @@ declare {
suggest, the components will be placed left-to-right and they are
aligned such that their top nodes are in a line.
"]],
examples = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go right top aligned]
{ a, "high\\node" -- b};
"]]
examples = {{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go right top aligned]
{ a, "high\\node" -- b};
"]]
}}
}

---
Expand All @@ -222,11 +238,19 @@ declare {
This means that the components will be aligned with their bounding
boxed being top-aligned.
"]],
examples = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go right absolute top aligned]
{ a, "high\\node" -- b};
"]]
examples = {{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go right absolute top aligned]
{ a, "high\\node" -- b};
"]]
}}
}

---
Expand Down Expand Up @@ -295,11 +319,19 @@ declare {

summary = "See the other |components go ...| keys.",

examples = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go left top aligned]
{ a, "high\\node" -- b};
"]]
examples = {{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go left top aligned]
{ a, "high\\node" -- b};
"]]
}}
}

---
Expand Down Expand Up @@ -381,15 +413,26 @@ declare {
},
summary = "See the other |components go ...| keys.",

examples = {[["
\tikz \graph [tree layout, nodes={draw, align=center},
components go down left aligned]
{ a, hello -- {world,s} };
"]],[["
\tikz \graph [tree layout, nodes={draw, align=center},
components go up absolute left aligned]
{ a, hello -- {world,s}};
"]]
examples = {
{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go down left aligned]
{ a, hello -- {world,s} };
"]]
},{
code = [["
\tikz \graph [tree layout, nodes={draw, align=center},
components go up absolute left aligned]
{ a, hello -- {world,s}};
"]]
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,32 @@ declare {
by this option in any way. You can use the |grow| option or |orient|
options to orient individual components.
"]],
examples = {[["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=left]
{ a, b, c -- d -- e, f -- g };
"]],[["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=10]
{ a, b, c -- d -- e, f -- g };
"]],[["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=up]
{ a, b, c [grow=right] -- d -- e, f[grow=45] -- g };
"]]
examples = {
{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=left]
{ a, b, c -- d -- e, f -- g };
"]]
},{
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=10]
{ a, b, c -- d -- e, f -- g };
"]]
},{
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component direction=up]
{ a, b, c [grow=right] -- d -- e, f[grow=45] -- g };
"]]
}
}
}

Expand Down
47 changes: 33 additions & 14 deletions tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentOrder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,26 @@ declare {
As above, but in decreasing order.
\end{itemize}
"]],
examples = {[["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component order=by first specified node]
{ a, b, c, f -- g, c -- d -- e };
"]],[["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component order=increasing node number]
{ a, b, c -- d -- e, f -- g };
"]]
examples = {
{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component order=by first specified node]
{ a, b, c, f -- g, c -- d -- e };
"]]
},{
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
component order=increasing node number]
{ a, b, c -- d -- e, f -- g };
"]]
}
}
}

Expand Down Expand Up @@ -94,11 +105,19 @@ declare {
summary = [["
A shorthand for |component order=decreasing node number|.
"]],
examples = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
large components first]
{ a, b, c -- d -- e, f -- g };
"]]
examples = {{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
},
"]],
code = [["
\tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
large components first]
{ a, b, c -- d -- e, f -- g };
"]]
}}
}


Expand Down
37 changes: 24 additions & 13 deletions tex/generic/pgf/graphdrawing/lua/pgf/gd/control/Components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,30 @@ declare {
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 = {
{
options = [["
preamble={
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{circular}
},
"]],
code = [["
\tikz \graph [simple necklace layout]
{
a -- b -- c -- d -- a,
1 -- 2 -- 3 -- 1
};
"]]
},{
code = [[",
\tikz \graph [simple necklace layout, componentwise]
{
a -- b -- c -- d -- a,
1 -- 2 -- 3 -- 1
};
"]]
}
}
}

Expand Down
Loading