Skip to content

docs: correct/add subgraph preamble comments (fixes #1194) - #1198

Open
Mo-Gul wants to merge 2 commits into
pgf-tikz:masterfrom
Mo-Gul:GraphsStandardCodeExamples
Open

docs: correct/add subgraph preamble comments (fixes #1194)#1198
Mo-Gul wants to merge 2 commits into
pgf-tikz:masterfrom
Mo-Gul:GraphsStandardCodeExamples

Conversation

@Mo-Gul

@Mo-Gul Mo-Gul commented Oct 8, 2022

Copy link
Copy Markdown
Contributor

Motivation for this change

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:


Remaining instances are

example
[[
\tikz {
\graph [FMMMLayout, node sep=1cm] { subgraph C_n[n=6]; };
\draw [red, ultra thick, |-|] (1.south) -- ++(down:1cm);
}
]]
example
[[
\tikz {
\graph [FMMMLayout, node sep=5mm] { subgraph C_n[n=6]; };
\draw [red, ultra thick, |-|] (1.south) -- ++(down:5mm);
}
]]

but since these are not part of the current manual and I couldn't make this part of the manual run, I decided not to fix them.

@Mo-Gul
Mo-Gul force-pushed the GraphsStandardCodeExamples branch from ece8796 to 179110c Compare October 8, 2022 07:44
Signed-off-by: Stefan Pinnow <Mo-Gul@gmx.net>
@Mo-Gul
Mo-Gul force-pushed the GraphsStandardCodeExamples branch from 179110c to af40f01 Compare October 8, 2022 10:50
@Mo-Gul

Mo-Gul commented Oct 8, 2022

Copy link
Copy Markdown
Contributor Author

sorry, missed one file ...

"]]
examples = {
{
options = [["preamble={\usetikzlibrary{graphs.standard,graphdrawing} \usegdlibrary{circular}}"]],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether I merged the support for this new syntax yet. I have to check that before merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you had. At least it seems to work in the currently available first example of

examples = {
{
options = [["preamble={\usetikzlibrary{graphs,graphdrawing} \usegdlibrary{force}}"]],
code = [["
\tikz \graph [spring electrical layout, horizontal=0 to 1]
{ 0 [electric charge=1] -- subgraph C_n [n=10] };
"]]
},{
code = [["
\tikz \graph [spring electrical layout, horizontal=0 to 1]
{ 0 [electric charge=5] -- subgraph C_n [n=10] };
"]]
},{
code = [["
\tikz \graph [spring electrical layout, horizontal=0 to 1]
{ [clique] 1 [electric charge=5], 2, 3, 4 };
"]]
}
}

which shows as

https://pgf-tikz.github.io/pgf/pgfmanual.pdf#page=477

@hmenke

hmenke commented Jun 16, 2026

Copy link
Copy Markdown
Member

On 2026-06-15 a more comprehensive testsuite was introduced for PGF/TikZ. This tests all new contributions against the examples extracted from the manual and checks whether anything has changed to avoid regressions. Since this pull request was opened before that, these tests were not run automatically. I have run l3build check on the result of the merge of this pull request branch into master. The result can be found below.

Tip

Your pull request might have failed some tests. This does not mean that your contribution will be rejected. In fact, depending on the changes you propose, it might even be expected that some tests fail, however, this needs to be evaluated carefully.

All tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Example for subgraph C_n (page 268, version 3.1.9a) not reproducible

3 participants