pgf icon indicating copy to clipboard operation
pgf copied to clipboard

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

Open jasperhabicht opened this issue 3 years ago • 3 comments

Version

3.1.9a

Details

The fourth example on page 268 (section 19 "Specifying Graphs", subsection "19.1" Overview) can only be reproduced using the graphs.standard library, but not using the graphs library as the code suggests. There seems to be a mistake in the code example.

The provided code example is:

\usetikzlibrary {graphs}
    \tikz
        \graph [nodes={draw, circle}, clockwise, radius=.75cm, empty nodes, n=8] {
            subgraph C_n [name=inner] <->[shorten <=1pt, shorten >=1pt]
            subgraph C_n [name=outer]
    };

It should be:

\usetikzlibrary {graphs.standard}
    \tikz
        \graph [nodes={draw, circle}, clockwise, radius=.75cm, empty nodes, n=8] {
            subgraph C_n [name=inner] <->[shorten <=1pt, shorten >=1pt]
            subgraph C_n [name=outer]
    };

jasperhabicht avatar Oct 06 '22 12:10 jasperhabicht

duplicate of #971, which was marked as duplicate of the more general #640

muzimuzhi avatar Oct 07 '22 04:10 muzimuzhi

@muzimuzhi, true, but I think nonetheless this issue should be fixed, because it is quite easy to do.

There are also some other wrong instances left. But they can be found easily. It just needs to be checked if examples containing subgraph have the library graphs.standard listed (at least for the non-Lua parts of the manual). Shall I propose a PR or do you want to do that?

Mo-Gul avatar Oct 07 '22 06:10 Mo-Gul

Shall I propose a PR or do you want to do that?

@Mo-Gul Please feel free to go ahead.

muzimuzhi avatar Oct 07 '22 09:10 muzimuzhi