diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-05 22:40:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-05 22:40:38 +0000 |
commit | 22536bb2b5257046d271b1eaa11b4a275d5ec041 (patch) | |
tree | 2500eaf5c26b11e00ebd33a64fccfa332cd5a66c /Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs | |
parent | cf794f0e2db6857972a9d48d4466a4f03a7057a0 (diff) |
pgf (5jan19)
git-svn-id: svn://tug.org/texlive/trunk@49607 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs')
2 files changed, 427 insertions, 431 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex index 3f17447fdda..27f0ed4aba5 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex @@ -8,14 +8,14 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.code.tex,v 1.44 2015/06/05 12:41:59 tantau Exp $ +\ProvidesFileRCS{tikzlibrarygraphs.code.tex} -% -% Interface keys +% +% Interface keys % -\def\tikzgraphsset{\pgfqkeys{/tikz/graphs}} +\def\tikzgraphsset{\pgfqkeys{/tikz/graphs}}% \tikzgraphsset{ new ->/.code n args={4}{% @@ -40,18 +40,18 @@ edge[#3] #4 (#2\tikzgraphrightanchor); } -} +}% \def\tikz@lib@graph@store@anchor#1#2{% - \def\tikz@temp{#1} + \def\tikz@temp{#1}% \ifx\tikz@temp\pgfutil@empty% \let#2\tikz@temp% \else% - \def\tikz@temp{.#1} + \def\tikz@temp{.#1}% \let#2\tikz@temp% - \fi% -} + \fi% +}% \tikzgraphsset{ default edge kind/.initial=--, @@ -65,17 +65,17 @@ right anchor/.code=\tikz@lib@graph@store@anchor{#1}{\tikzgraphrightanchor}, left anchor=, right anchor= -} +}% % % Keys for using nodes declared outside a graph inside a graph as if % it were declared there -% +% \tikzgraphsset{ use existing nodes/.is if=tikz@lib@graph@all -} +}% \tikzset{ new set/.code={ @@ -88,13 +88,13 @@ \expandafter\expandafter\expandafter\pgfutil@g@addto@macro\expandafter\pgf@temp\expandafter{\expandafter\tikz@lg@do\expandafter{\tikz@fig@name}}% }% },% -} +}% \newif\iftikz@lib@graph@all -% -% Simple versus multi graphs +% +% Simple versus multi graphs % \tikzgraphsset{ simple/.code={ @@ -108,7 +108,7 @@ multi/.code={ \tikz@lib@graph@simplefalse% } -} +}% \newif\iftikz@lib@graph@simple @@ -118,17 +118,17 @@ % #3 = to % #4 = options % #5 = edge nodes - % + % % Ok, first, test, whether edge exists: \ifcsname tikz@lg@e@#3@#2\endcsname% \expandafter\global\expandafter\let\csname tikz@lg@e@#3@#2\endcsname\relax% reset \fi% \expandafter\gdef\csname tikz@lg@e@#2@#3\endcsname{\tikz@lib@graph@make@simple@edge{#1}{#2}{#3}{#4}{#5}}% -} +}% \def\tikz@lib@graph@make@simple@edge#1#2#3#4#5{% \pgfqkeys{/tikz/graphs}{new #1={#2}{#3}{#4}{#5}}% -} +}% \def\tikz@lib@graph@simple@done{% @@ -137,26 +137,26 @@ \let\tikz@lg@do\tikz@lib@graph@simple@node% \tikz@lib@graph@node@list }% -} +}% \def\tikz@lib@graph@simple@node#1{% {% \def\tikz@lib@graph@simple@from@node{#1}% \let\tikz@lg@do\tikz@lib@graph@simple@other@node% \tikz@lib@graph@node@list% - }% -} + }% +}% \def\tikz@lib@graph@simple@other@node#1{% \ifcsname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname% \csname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname% \expandafter\global\expandafter\let\csname tikz@lg@e@\tikz@lib@graph@simple@from@node @#1\endcsname\relax% \fi% -} +}% -% -% Basic options +% +% Basic options % \tikzgraphsset{ @@ -172,7 +172,7 @@ @operators/.initial=, operator/.style={/tikz/graphs/@operators/.append={#1}}, @extra group options/.style=, -} +}% \def\tikzgraphinvokeoperator#1{% @@ -184,16 +184,16 @@ }% \tikz@lib@graph@temp% \global\let\tikz@lib@graph@temp\relax% -} +}% -% -% The parser +% +% The parser % \def\tikz@lib@graph@parser{% \pgfutil@ifnextchar[{\tikz@lib@graph@parser@}{\tikz@lib@graph@parser@[]}%] -} +}% \def\tikz@lib@graph@parser@[#1]{% \setbox\tikz@whichbox=\hbox\bgroup% @@ -208,7 +208,7 @@ \else% \expandafter\tikz@lib@graphs@normal@main% \fi% -} +}% \long\def\tikz@lib@graphs@normal@main#1{% \pgfkeysgetvalue{/tikz/graphs/@operators}\tikz@lib@graph@outer@operators% @@ -220,11 +220,11 @@ \tikz@lib@graph@start@hint@group% \tikz@lib@graph@parse@group{#1}% \tikz@lib@graph@end@hint@group - \tikz@lib@graph@outer@operators% + \tikz@lib@graph@outer@operators% \let\tikz@lg@do=\tikz@lib@graph@cleanup% \tikz@lib@graph@node@list% \tikz@lib@graph@main@done% -} +}% \def\tikz@lib@graph@main@done{% \endgroup% @@ -234,7 +234,7 @@ \egroup% \egroup% \tikz@lib@graph@parser@done% -} +}% @@ -245,13 +245,13 @@ \pgfkeyssetvalue{/tikz/graphs/placement/local width}{0}% \pgfkeyssetvalue{/tikz/graphs/placement/chain count}{0}% \pgfkeyssetvalue{/tikz/graphs/placement/element count}{0}% -} +}% \def\tikz@lib@graph@end@hint@group{% % Get local depth and width outside \xdef\tikz@lib@graph@group@depth{\pgfkeysvalueof{/tikz/graphs/placement/local depth}} \xdef\tikz@lib@graph@group@width{\pgfkeysvalueof{/tikz/graphs/placement/local width}} -} +}% \def\tikz@lib@graph@hint@aftergroup{% \pgfkeysgetvalue{/tikz/graphs/placement/width}\tikz@temp@h% @@ -263,13 +263,13 @@ \pgfkeyslet{/tikz/graphs/placement/width}\tikz@temp@h% \pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh% \pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw% - % + % \pgfkeysgetvalue{/tikz/graphs/placement/element count}\tikz@temp% \c@pgf@counta=\tikz@temp\relax% \advance\c@pgf@counta by1\relax% \edef\tikz@temp{\the\c@pgf@counta}% - \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp% -} + \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp% +}% \def\tikz@lib@graph@placement@update{% \pgfkeys{/tikz/graphs/placement/logical node depth/.expand once=\tikz@lib@graph@name} @@ -286,13 +286,13 @@ \pgfkeyslet{/tikz/graphs/placement/width}\tikz@temp@h% \pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh% \pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw% - % + % \pgfkeysgetvalue{/tikz/graphs/placement/element count}\tikz@temp% \c@pgf@counta=\tikz@temp\relax% \advance\c@pgf@counta by1\relax% \edef\tikz@temp{\the\c@pgf@counta}% - \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp% -} + \pgfkeyslet{/tikz/graphs/placement/element count}\tikz@temp% +}% \def\tikz@lib@graph@placement@after@chain@update{% \pgfkeysgetvalue{/tikz/graphs/placement/depth}\tikz@temp@w% @@ -304,18 +304,18 @@ \pgfkeyslet{/tikz/graphs/placement/depth}\tikz@temp@w% \pgfkeyslet{/tikz/graphs/placement/local width}\tikz@temp@lh% \pgfkeyslet{/tikz/graphs/placement/local depth}\tikz@temp@lw% - % + % \pgfkeysgetvalue{/tikz/graphs/placement/chain count}\tikz@temp% \c@pgf@counta=\tikz@temp\relax% \advance\c@pgf@counta by1\relax% \edef\tikz@temp{\the\c@pgf@counta}% - \pgfkeyslet{/tikz/graphs/placement/chain count}\tikz@temp% -} + \pgfkeyslet{/tikz/graphs/placement/chain count}\tikz@temp% +}% % % Parse a group -% +% \long\def\tikz@lib@graph@parse@group#1{ \let\tikz@lib@graph@group@qa\pgfutil@empty% @@ -324,16 +324,16 @@ \let\tikz@lib@graph@group@cont\pgfutil@empty% \let\tikz@lib@graph@group@conta\pgfutil@empty% \tikz@lib@graph@group@check#1\par\pgf@stop@eogroup% -} +}% -% -% Start of a group +% +% Start of a group % \def\tikz@lib@graph@group@check{% \pgfutil@ifnextchar[\tikz@lib@graph@group@opt{\tikz@lib@graph@group@opt[]}%] -} +}% \def\tikz@lib@graph@group@opt[#1]{% \let\tikz@lib@graph@parse@extras\pgfutil@empty% @@ -344,38 +344,38 @@ @extra group options/.style=,% #1}% \expandafter\tikz@lib@graph@par\tikz@lib@graph@parse@extras% -} +}% \tikzgraphsset{ parse/.code={\expandafter\def\expandafter\tikz@lib@graph@parse@extras\expandafter{\tikz@lib@graph@parse@extras#1}}, -} +}% -% -% Remove \par +% +% Remove \par % \def\tikz@lib@graph@par{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@par@@}{\tikz@lib@graph@par@}% -} +}% \long\def\tikz@lib@graph@par@#1\par{% \pgfutil@ifnextchar\pgf@stop@eogroup{% \expandafter\tikz@lib@graph@quotes\tikz@lib@graph@group@c#1"}{% \expandafter\def\expandafter\tikz@lib@graph@group@c\expandafter{\tikz@lib@graph@group@c#1}% \tikz@lib@graph@par% }% -} +}% \long\def\tikz@lib@graph@par@@#1{% \expandafter\def\expandafter\tikz@lib@graph@group@c\expandafter{\tikz@lib@graph@group@c{#1}}% \tikz@lib@graph@par -} +}% -% +% % Replace ..."..."... by ..."{...}"... -% +% \def\tikz@lib@graph@quotes{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@quotes@@}{\tikz@lib@graph@quotes@}% }% @@ -386,30 +386,30 @@ \expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q#1"}% \tikz@lib@graph@quotes@cont% }% -} +}% \def\tikz@lib@graph@quotes@cont#1"#2"{% \pgfutil@ifnextchar\pgf@stop@eogroup{% \tikz@lib@graph@passon{{#1}"#2}}{% \expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q{#1}"#2"}% \tikz@lib@graph@quotes@cont}% -} +}% \def\tikz@lib@graph@quotes@@#1{% \expandafter\def\expandafter\tikz@lib@graph@group@q\expandafter{\tikz@lib@graph@group@q{#1}}% \tikz@lib@graph@quotes% -} +}% -% +% % Replace ..."..."... by ..."{...}"... (active version) % -{ +{% \catcode`\"=13\relax \gdef\tikz@lib@graph@passon#1{\expandafter\tikz@lib@graph@quotesactive\tikz@lib@graph@group@q#1"}% - + \gdef\tikz@lib@graph@quotesactive{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@quotesactive@@}{\tikz@lib@graph@quotesactive@}% }% @@ -420,27 +420,27 @@ \expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa#1"}% \tikz@lib@graph@quotesactive@cont% }% - } - + }% + \gdef\tikz@lib@graph@quotesactive@cont#1"#2"{% \pgfutil@ifnextchar\pgf@stop@eogroup{% \expandafter\tikz@lib@graph@encloser\tikz@lib@graph@group@qa{#1}"#2[}{% \expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa{#1}"#2"}% \tikz@lib@graph@quotesactive@cont}% - } - + }% + \gdef\tikz@lib@graph@quotesactive@@#1{% \expandafter\def\expandafter\tikz@lib@graph@group@qa\expandafter{\tikz@lib@graph@group@qa{#1}}% \tikz@lib@graph@quotesactive% - } -} + }% +}% -% +% % Replace ...[...]... by ...[{...}]... -% +% \def\tikz@lib@graph@encloser{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@encloser@@}{\tikz@lib@graph@encloser@}% }% @@ -451,45 +451,45 @@ \expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont#1[}%] \tikz@lib@graph@encloser@cont% }% -} +}% \def\tikz@lib@graph@encloser@cont#1]#2[{% \pgfutil@ifnextchar\pgf@stop@eogroup{% \expandafter\tikz@lib@graph@semi\tikz@lib@graph@group@cont{#1}]#2;}{% \expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont{#1}]#2[}% \tikz@lib@graph@encloser@cont}% -} +}% \def\tikz@lib@graph@encloser@@#1{% \expandafter\def\expandafter\tikz@lib@graph@group@cont\expandafter{\tikz@lib@graph@group@cont{#1}}% \tikz@lib@graph@encloser% -} +}% -% -% Replace ; by , +% +% Replace ; by , % \def\tikz@lib@graph@semi{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@semi@@}{\tikz@lib@graph@semi@}% -} +}% \def\tikz@lib@graph@semi@#1;{% \pgfutil@ifnextchar\pgf@stop@eogroup{% \expandafter\tikz@lib@graph@main@parser\tikz@lib@graph@group@conta#1,}{% \expandafter\def\expandafter\tikz@lib@graph@group@conta\expandafter{\tikz@lib@graph@group@conta#1,}% \tikz@lib@graph@semi% }% -} +}% \def\tikz@lib@graph@semi@@#1{% \expandafter\def\expandafter\tikz@lib@graph@group@conta\expandafter{\tikz@lib@graph@group@conta{#1}}% \tikz@lib@graph@semi% -} +}% -% -% Main parse +% +% Main parse % \def\tikz@lib@graph@main@parser{% @@ -499,23 +499,23 @@ \let\tikz@lib@graph@stored@actions\pgfutil@empty% \let\tikz@lib@graph@node@list\pgfutil@empty% reset \tikz@lib@graph@main@parser@start% -} +}% \def\tikz@lib@graph@main@parser@start{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@protect@group}{\tikz@lib@graph@main@parser@cont}% -} +}% \def\tikz@lib@graph@protect@group#1{% skip space \pgfutil@ifnextchar\relax{\tikz@lib@graph@main@parser@cont{{#1}}}{\tikz@lib@graph@main@parser@cont{{#1}}}% -} +}% -\def\tikz@lib@graph@main@parser@cont{\tikz@lib@graph@check@quotes\tikz@lib@graph@main@parser@cont@normal} +\def\tikz@lib@graph@main@parser@cont{\tikz@lib@graph@check@quotes\tikz@lib@graph@main@parser@cont@normal}% \def\tikz@lib@graph@main@parser@cont@normal#1,{% \tikz@lib@graph@parse@one#1-\pgf@stop@eodashes% -} +}% \def\tikz@lib@graph@parse@one{% \pgfutil@ifnextchar\bgroup\tikz@lib@graph@scope\tikz@lib@graph@node% -} +}% @@ -524,50 +524,50 @@ \def\tikz@lib@graph@check@quotes#1{% \let\tikz@lib@graph@cont@quote#1% \pgfutil@ifnextchar"{\begingroup\pgfkeys@temptoks{}\pgfutil@empty\tikz@lib@graph@quote@parser}{\tikz@lib@graph@check@quotes@active}% -} -{ +}% +{% \catcode`\"=13\relax \gdef\tikz@lib@graph@check@quotes@active{% \pgfutil@ifnextchar"{\begingroup\pgfkeys@temptoks{}\pgfutil@empty\tikz@lib@graph@quote@parser@active}{\tikz@lib@graph@cont@quote}% - } + }% \gdef\tikz@lib@graph@quote@parser@active"#1"{% \pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks #1}% \pgfutil@ifnextchar"{\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks "}\tikz@lib@graph@quote@parser@active}{\tikz@lib@graph@quote@parser@done}% - } -} + }% +}% \def\tikz@lib@graph@quote@parser"#1"{% \pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks #1}% \pgfutil@ifnextchar"{\pgfkeys@temptoks\expandafter{\the\pgfkeys@temptoks "}\tikz@lib@graph@quote@parser}{\tikz@lib@graph@quote@parser@done}% -} +}% \def\tikz@lib@graph@quote@parser@done{% {\expandafter\scantokens\expandafter{% \expandafter\expandafter\expandafter\tikzlibgraphactivations\expandafter\expandafter\expandafter\tikzlibgraphdoedef\expandafter{\the\pgfkeys@temptoks}% }}% - {\expandafter\scantokens\expandafter{\expandafter\tikzlibgraphactivationsbrace\expandafter\xdef\expandafter\tikzlibgraphreplaced\expandafter<\tikzlibgraphreplaced>\catcode`\}=2\relax}}% + {\expandafter\scantokens\expandafter{\expandafter\tikzlibgraphactivationsbrace\expandafter\xdef\expandafter\tikzlibgraphreplaced\expandafter<\tikzlibgraphreplaced>\catcode`\}=2\relax}}% \edef\tikzlibgraphreplaced{\expandafter\detokenize\expandafter{\tikzlibgraphreplaced}} \pgfutil@ifnextchar/\tikz@lib@graph@quotes@slash\tikz@lib@graph@quotes@no@slash% -} +}% \def\tikz@lib@graph@quotes@no@slash{% \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter% \tikz@smuggle\expandafter\expandafter\expandafter{\expandafter\tikzlibgraphreplaced\expandafter/\expandafter{\the\pgfkeys@temptoks}}% \expandafter\endgroup\expandafter\tikz@lib@graph@cont@quote\tikz@smuggle% -} +}% \def\tikz@lib@graph@quotes@slash/{% \pgfutil@ifnextchar/% Ah, double slash... {\tikz@lib@graph@quotes@no@slash/}{\expandafter\endgroup\expandafter\tikz@lib@graph@cont@quote\tikzlibgraphreplaced/}% -} -\def\tikzlibgraphdoedef{\xdef\tikzlibgraphreplaced} +}% +\def\tikzlibgraphdoedef{\xdef\tikzlibgraphreplaced}% \def\tikz@lib@prepare@active#1#2#3{% {% \catcode`#1=13\relax% \scantokens{\gdef\tikzlibgraphactivator{\def#2{@#3@}}}% - } - \pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`#1=13\relax} - \expandafter\pgfutil@g@addto@macro\expandafter\tikzlibgraphactivations\expandafter{\tikzlibgraphactivator} -} + }% + \pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`#1=13\relax}% + \expandafter\pgfutil@g@addto@macro\expandafter\tikzlibgraphactivations\expandafter{\tikzlibgraphactivator}% +}% \let\tikzlibgraphactivations\pgfutil@empty @@ -575,7 +575,7 @@ % Remove \outer from \+ for plain TeX % -\outer\def\tikz@lib@outer@test{\tabalign} +\outer\def\tikz@lib@outer@test{\tabalign}% \ifx\+\tikz@lib@outer@test \def\+{\tabalign} \fi @@ -612,69 +612,69 @@ \tikz@lib@prepare@active{\#}{#}{NUMBER SIGN} } -\pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`\\=13\relax} -{ +\pgfutil@g@addto@macro\tikzlibgraphactivations{\catcode`\\=13\relax}% +{% \catcode`\|=0\relax \catcode`\\=13\relax - |pgfutil@g@addto@macro|tikzlibgraphactivations{|def\{@REVERSE SOLIDUS@}} -} -{ - \gdef\tikzlibgraphscommercialat{@COMMERCIAL AT@} - \let\g=\pgfutil@g@addto@macro + |pgfutil@g@addto@macro|tikzlibgraphactivations{|def\{@REVERSE SOLIDUS@}}% +}% +{% + \gdef\tikzlibgraphscommercialat{@COMMERCIAL AT@}% + \let\g=\pgfutil@g@addto@macro \catcode`\@=13\relax - \g\tikzlibgraphactivations{\catcode`\@=13\relax\let@=\tikzlibgraphscommercialat} -} + \g\tikzlibgraphactivations{\catcode`\@=13\relax\let@=\tikzlibgraphscommercialat}% +}% \def\tikzlibgraphactivationsbrace{% \catcode`\{=13\relax% \catcode`\}=13\relax% \catcode`\<=1\relax% \catcode`\>=2\relax% -} -{ +}% +{% \catcode`\{=13\relax% \catcode`\}=13\relax% \catcode`\<=1\relax% \catcode`\>=2\relax% \pgfutil@g@addto@macro\tikzlibgraphactivationsbrace<\def{<@LEFT CURLY BRACE@>> %} \pgfutil@g@addto@macro\tikzlibgraphactivationsbrace<\def}<@RIGHT CURLY BRACE@>> %{ -> +>% % A normal node % First, check for special quote syntax: -\def\tikz@lib@graph@node{\tikz@lib@graph@check@quotes\tikz@lib@graph@node@normal} +\def\tikz@lib@graph@node{\tikz@lib@graph@check@quotes\tikz@lib@graph@node@normal}% \def\tikz@lib@graph@node@normal#1-{% % Detect trailing < \tikz@lib@graph@@node#1<\pgf@stop% -} +}% \def\tikz@lib@graph@@node#1<#2\pgf@stop% { - % + % % #1 will be a node (not a group) - % + % % Syntax: node name [options] - % + % % Grab node name \tikz@lib@graph@grab@name#1\pgf@stop% \tikz@lib@graph@stored@actions% \pgfutil@ifnextchar\pgf@stop@eodashes{% \tikz@lib@graph@graph@done% }{% - % - % Now, get arrow kind - % - \def\pgf@test{#2}% + % + % Now, get arrow kind + % + \def\pgf@test{#2}% \ifx\pgf@test\pgfutil@empty% \expandafter\tikz@lib@graph@no@back@arrow% \else% \expandafter\tikz@lib@graph@back@arrow% \fi% }% -} +}% \def\tikz@lib@graph@no@back@arrow{% \pgfutil@ifnextchar>\tikz@lib@graph@forward@arrow{% @@ -685,52 +685,52 @@ }% }% }% -} +}% \def\tikz@lib@graph@undirected@arrow-{% \def\tikz@lib@graph@arrow@type{--}% \tikz@lib@graph@after@arrow% -} +}% \def\tikz@lib@graph@forward@arrow>{% \def\tikz@lib@graph@arrow@type{->}% \tikz@lib@graph@after@arrow% -} +}% \def\tikz@lib@graph@bi@arrow>{% \def\tikz@lib@graph@arrow@type{<->}% \tikz@lib@graph@after@arrow% -} +}% \def\tikz@lib@graph@no@arrow!-{% \def\tikz@lib@graph@arrow@type{-!-}% \tikz@lib@graph@after@arrow% -} +}% \def\tikz@lib@graph@back@arrow{% \pgfutil@ifnextchar>{\tikz@lib@graph@bi@arrow}{% \def\tikz@lib@graph@arrow@type{<-}% \tikz@lib@graph@after@arrow% }% -} +}% \def\tikz@lib@graph@after@arrow{% \pgfutil@ifnextchar[{\tikz@lib@graph@after@arrow@opt}{\tikz@lib@graph@after@arrow@opt[]}%] -} +}% \def\tikz@lib@graph@after@arrow@opt[#1]{% - % - % Ok, first recolor + % + % Ok, first recolor % \tikzgraphinvokeoperator{recolor source by=source''} \tikzgraphinvokeoperator{recolor target by=target'} % Save action for next node \expandafter\def\expandafter\tikz@lib@graph@stored@actions\expandafter{% \expandafter\tikz@lib@graph@joiner\expandafter{\tikz@lib@graph@arrow@type}{#1}}% - % + % \tikzgdeventgroupcallback{descendants}% \tikz@lib@graph@parse@one% -} +}% \def\tikz@lib@graph@joiner#1#2{% \tikzgraphinvokeoperator{recolor source by=source'} @@ -749,35 +749,35 @@ \pgf@temp% }% \tikzgraphinvokeoperator{not source',not target'} -} +}% \def\tikz@lib@graph@unknown@edge@option#1{% \def\tikz@temp{/tikz/graphs/@edges styling/.append=} \expandafter\expandafter\expandafter\pgfkeys% \expandafter\expandafter\expandafter{\expandafter\tikz@temp\expandafter{\expandafter,\pgfkeyscurrentname={#1}}} -} +}% \def\tikz@lib@graph@graph@done\pgf@stop@eodashes{% % Get local depth and width outside \xdef\tikz@lib@graph@chain@depth{\pgfkeysvalueof{/tikz/graphs/placement/local depth}} \xdef\tikz@lib@graph@chain@width{\pgfkeysvalueof{/tikz/graphs/placement/local width}} % Get node list outside... - \expandafter% + \expandafter% \endgroup% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@graph@node@list% \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}% % Compute new local depth and width of group... \tikz@lib@graph@placement@after@chain@update - % + % \pgfutil@ifnextchar\pgf@stop@eogroup% \tikz@lib@graph@graph@group@done% \tikz@lib@graph@main@parser% -} +}% \def\tikz@lib@graph@graph@group@done\pgf@stop@eogroup{% \pgfkeysvalueof{/tikz/graphs/@operators}% -} +}% @@ -786,14 +786,14 @@ % \def\tikz@lib@graph@grab@name{% \pgfutil@ifnextchar\foreach\tikz@lib@graph@do@foreach\tikz@lib@graph@parse@node@text% -} +}% \def\tikz@lib@graph@do@foreach\foreach#1in{% \pgfutil@ifnextchar\bgroup{\tikz@lib@graph@do@foreach@normal{#1}}{\def\tikz@temp{#1}\tikz@lib@graph@do@foreach@macro}% -} +}% \def\tikz@lib@graph@do@foreach@macro#1{% \expandafter\expandafter\expandafter\tikz@lib@graph@do@foreach@normal\expandafter\tikz@temp\expandafter{#1}% -} +}% \def\tikz@lib@graph@do@foreach@normal#1#2#3\pgf@stop{% % Ok, we do a parse on a foreach loop. @@ -823,13 +823,13 @@ % TODO: Need to also save hints! \global\let\tikz@lib@graph@node@list@saved\tikz@lib@graph@node@list% }% - \expandafter% + \expandafter% \endgroup% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@graph@node@list% - \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list@saved}% + \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list@saved}% \expandafter\tikz@lib@graph@setup@placement\tikz@lib@graph@saved@placement% -} +}% \def\tikz@lib@graph@setup@placement#1#2#3#4#5#6{% \pgfkeyssetvalue{/tikz/graphs/placement/local depth}{#1}% @@ -838,15 +838,15 @@ \pgfkeyssetvalue{/tikz/graphs/placement/element count}{#4}% \pgfkeyssetvalue{/tikz/graphs/placement/width}{#5}% \pgfkeyssetvalue{/tikz/graphs/placement/depth}{#6}% -} +}% \def\tikz@lib@graph@parse@node@text#1\pgf@stop{% - % - % Ok, first test whether #1 contains "//" - % + % + % Ok, first test whether #1 contains "//" + % \pgfutil@in@{//}{#1 } \ifpgfutil@in@% - % Ok, a layout node: + % Ok, a layout node: \tikz@lib@parse@layout@node#1\pgf@stop% \else% \tikz@lib@graph@fake@nodefalse @@ -854,7 +854,7 @@ \def\tikz@lib@graph@empty@node@parsed{\tikzgdeventcallback{node}{}}% \tikz@lib@parse@normal@node#1[\pgf@stop% \fi% -} +}% \newif\iftikzgraphsautonumbernodes \newcount\tikz@lib@auto@number @@ -865,16 +865,16 @@ \edef\tikz@lib@graph@name@only{\tikz@lib@graph@name@only\tikz@lib@auto@sep\the\tikz@lib@auto@number}% \global\advance\tikz@lib@auto@number by1\relax% \fi% -} +}% -% -% Parse the normal part of a node (name and, possibly, text after slash) -% +% +% Parse the normal part of a node (name and, possibly, text after slash) +% \def\tikz@lib@parse@normal@node#1[{ - % - % Test whether #1 contains "/" or "__" - % + % + % Test whether #1 contains "/" or "__" + % \pgfutil@in@{/}{#1}% \ifpgfutil@in@% \tikz@lib@parse@node@with@slash#1\pgf@stop% @@ -888,25 +888,25 @@ \edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}% \fi% \fi% - \tikz@lib@graph@handle@node@cont% -} + \tikz@lib@graph@handle@node@cont% +}% \def\tikz@lib@parse@node@with@slash#1/{ \pgfkeys@spdef\tikz@lib@graph@name@only{#1}% \ifx\tikz@lib@graph@name@only\pgfutil@empty% \global\advance\tikz@fig@count by1\relax \edef\tikz@lib@graph@name@only{tikz@f@\the\tikz@fig@count}% - \fi% + \fi% \edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}% \pgfutil@ifnextchar"\tikz@lg@slash@quote{\pgfutil@ifnextchar\tikz@active@quotes@token\tikz@lg@slash@quote@active\tikz@lg@slash@cont} -} +}% \def\tikz@lg@slash@quote"#1"#2\pgf@stop{% \iftikz@handle@active@nodes% \def\tikz@lib@graph@node@text{\scantokens{#1}}% \else \def\tikz@lib@graph@node@text{#1}% \fi% -} +}% {\catcode`\"=13\relax \gdef\tikz@lg@slash@quote@active"#1"#2\pgf@stop{% \iftikz@handle@active@nodes% @@ -914,27 +914,27 @@ \else \def\tikz@lib@graph@node@text{#1}% \fi% - } -} + }% +}% \def\tikz@lg@slash@cont#1\pgf@stop{% \iftikz@handle@active@nodes% \def\tikz@lib@graph@node@text{\scantokens{#1}}% \else \def\tikz@lib@graph@node@text{#1}% \fi% -} +}% -\def\tikz@lib@parse@node@with@doubleunder#1__{\tikz@lib@parse@node@with@slash{#1}/} +\def\tikz@lib@parse@node@with@doubleunder#1__{\tikz@lib@parse@node@with@slash{#1}/}% \def\tikz@lg@find@fresh@name{% \edef\tikz@lib@graph@name@only{\tikz@lib@graph@name@only'}% \edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}% \tikz@lg@if@local@node{\tikz@lib@graph@name}{\tikz@lg@find@fresh@name}{}% -} +}% -% -% We have now parsed everything up to the opening "[". We continue +% +% We have now parsed everything up to the opening "[". We continue % \def\tikz@lib@graph@handle@node@cont{% @@ -952,22 +952,22 @@ \expandafter\tikz@lib@graph@node@opt\expandafter[\expandafter]\expandafter[% \fi% }{\tikz@lib@graph@node@opt[}% -} +}% \def\tikzgraphnodeas@default{% \tikz@lib@graph@typesetter% -} +}% \let\tikz@lib@graph@empty@node@parsed\relax% \def\tikz@lib@graph@node@opt[#1]#2[\pgf@stop{% \tikz@lib@graph@node@parsed{#1}% -} +}% -\def\tikz@lib@graph@node@empty@done\pgf@stop{\tikz@lib@graph@empty@node@parsed} +\def\tikz@lib@graph@node@empty@done\pgf@stop{\tikz@lib@graph@empty@node@parsed}% -% -% Parse a layout node +% +% Parse a layout node % \def\tikz@lib@parse@layout@node#1//{% @@ -975,33 +975,33 @@ \let\tikz@lib@graph@node@parsed\tikz@lib@layout@node@parsed% \let\tikz@lib@graph@empty@node@parsed\tikz@lib@graph@empty@layout@node@parsed \tikz@lib@parse@normal@node#1[\pgf@stop% -} +}% \newif\ifpgf@lib@graph@empty@layout@node \def\tikz@lib@layout@node@parsed{% \tikz@lib@layout@parse@rest% -} +}% \def\tikz@lib@graph@empty@layout@node@parsed{% \pgf@lib@graph@empty@layout@nodetrue \tikz@lib@layout@parse@rest{}% -} +}% \def\tikz@lib@layout@parse@rest#1{% \def\tikz@lib@layout@node@options{#1}% \pgfutil@ifnextchar[{\tikz@lib@layout@node@opt}{\tikz@lib@layout@node@opt[]}%} -} +}% \def\tikz@lib@layout@node@parsed#1{% \def\tikz@lib@layout@node@options{#1}% \pgfutil@ifnextchar[{\tikz@lib@layout@node@opt}{\tikz@lib@layout@node@opt[]}%} -} +}% \def\tikz@lib@layout@node@opt[#1]{% \def\tikz@lib@layout@options{#1}% \pgfutil@ifnextchar\bgroup{\tikz@lib@layout@start}{\tikzerror{Opening brace at beginning of sublayout expected}}% -} +}% % @@ -1029,7 +1029,7 @@ \c@pgf@counta=\tikz@temp\relax% \advance\c@pgf@counta by1\relax% \edef\tikz@temp{\the\c@pgf@counta}% - \pgfkeyslet{/tikz/graphs/placement/level}\tikz@temp% + \pgfkeyslet{/tikz/graphs/placement/level}\tikz@temp% \tikzgraphsset{ level/.try=\pgfkeysvalueof{/tikz/graphs/placement/level}, level \pgfkeysvalueof{/tikz/graphs/placement/level}/.try @@ -1059,7 +1059,7 @@ /tikz/graphs/@nodes styling,% #1}% \pgfkeysgetvalue{/tikz/graphs/@operators}\tikz@lib@graph@op@save% - \global\let\tikz@lib@graph@op@save\tikz@lib@graph@op@save% + \global\let\tikz@lib@graph@op@save\tikz@lib@graph@op@save% }% \else% \node [% @@ -1089,30 +1089,30 @@ \iftikz@lib@graph@trie\tikzgraphsset{name=\tikz@lib@graph@name@only}\fi% \else % The name of the node is a graph name - \tikz@lib@graph@handle@graph{#1}% + \tikz@lib@graph@handle@graph{#1}% \fi - \fi% -} + \fi% +}% \newif\iftikz@lib@graph@fake@node \newif\iftikz@lib@graph@use@list \def\tikz@lib@graph@test@use@list{% \pgfutil@ifnextchar({\tikz@lib@graph@use@list@grap}{\tikz@lib@graph@test@use@list@done}%) -} +}% -\def\tikz@lib@graph@test@use@list@done#1\pgf@stop{\tikz@lib@graph@use@listfalse} -\def\tikz@lib@graph@use@list@grap(#1)\pgf@stop{\def\tikz@lib@graph@use@list{#1}\tikz@lib@graph@use@listtrue} +\def\tikz@lib@graph@test@use@list@done#1\pgf@stop{\tikz@lib@graph@use@listfalse}% +\def\tikz@lib@graph@use@list@grap(#1)\pgf@stop{\def\tikz@lib@graph@use@list{#1}\tikz@lib@graph@use@listtrue}% -% -% Typeset a layout node +% +% Typeset a layout node % \def\tikz@lib@layout@start#1#2\pgf@stop{% \tikz@lib@ensure@gd@loaded% % Parameters are: - % + % % Node name is \tikz@lib@graph@name@only % Node text is \tikz@lib@graph@node@text % Node options are \tikz@lib@layout@node@options @@ -1130,8 +1130,8 @@ \fi% \fi% \edef\tikz@lib@graph@name{\tikz@lib@graph@path\tikz@lib@graph@name@only}% - % - % Prepare tikz node options + % + % Prepare tikz node options % \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@layout@node@options\expandafter\expandafter\expandafter{\expandafter\tikz@lib@layout@startup@node@options\tikz@lib@layout@node@options,}% @@ -1147,8 +1147,8 @@ \expandafter\expandafter\expandafter{% \expandafter\tikz@lib@graph@node@text\expandafter}\expandafter{\tikz@lib@layout@node@options} \fi% - % - % Here comes the scope: + % + % Here comes the scope: % \expandafter\expandafter\expandafter\scope\expandafter\expandafter\expandafter[\expandafter\tikz@lib@layout@node@options@prefix\tikz@lib@layout@options] \tikzgdeventgroupcallback{array}% @@ -1162,33 +1162,33 @@ \tikz@lib@graph@node@list% \def\tikz@lg@old@col{\tikz@lgc@target@true}% \tikz@lib@graph@node@list% - \expandafter% + \expandafter% \endscope\expandafter% \endgroup% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@graph@node@list% \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}% \tikz@lib@graph@hint@aftergroup% -} +}% \def\tikz@lib@make@subgraph@node#1#2#3{% \pgfgdsubgraphnode{#1}{#3}{\pgfgdsubgraphnodecontents{#2}}% -} +}% \def\tikz@lib@layout@startup@node@options{% /utils/exec=\tikzlibignorecomparisonsINTERNAL, /tikz/graphs/.cd,% redirect unknown to tikz,% anchor=base,% /tikz/every subgraph node/.try,% -} +}% \def\tikzlibignorecomparisonsINTERNAL{% \pgfkeys{/handlers/first char syntax=true} \pgfkeyssetvalue{/handlers/first char syntax/the character >}{\pgfutil@gobble}% \pgfkeyssetvalue{/handlers/first char syntax/the character <}{\pgfutil@gobble}% -} -\def\tikz@lib@layout@node@options@prefix{graphs/.cd,} +}% +\def\tikz@lib@layout@node@options@prefix{graphs/.cd,}% \ifx\tikz@lib@ensure@gd@loaded\pgfutil@undefined% -\def\tikz@lib@ensure@gd@loaded{\tikzerror{You must say \string\usetikzlibrary{graphdrawing} to use the (sub)layout syntax}} +\def\tikz@lib@ensure@gd@loaded{\tikzerror{You must say \string\usetikzlibrary{graphdrawing} to use the (sub)layout syntax}}% \fi \def\tikz@lg@local@node@handle#1{% @@ -1198,46 +1198,46 @@ \tikzgdlatenodeoptionacallback{\tikz@lib@graph@name}% \node also[graphs/redirect unknown to tikz,/tikz/graphs/.cd,#1](\tikz@lib@graph@name);% \pgfkeysvalueof{/tikz/graphs/@operators}% -} +}% \tikzgraphsset{redirect unknown to tikz/.style={ /tikz/graphs/.unknown/.code={% - \let\tikz@key\pgfkeyscurrentname% + \let\tikz@key\pgfkeyscurrentname% \pgfkeys{tikz/.cd,\tikz@key={##1},/tikz/graphs/.cd}% }} -} +}% \def\tikz@lib@activate@source@target@edge@syntax{% \pgfkeys{/handlers/first char syntax=true} \pgfkeyssetvalue{/handlers/first char syntax/the character >}{\tikz@lg@parse@more}% \pgfkeyssetvalue{/handlers/first char syntax/the character <}{\tikz@lg@parse@less}% -} +}% -\def\tikz@lg@parse@less#1{\tikz@lg@parse@less@#1\pgf@stop} -\def\tikz@lg@parse@less@<{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{source}}{\tikz@lg@parse@noquote{source}}} -\def\tikz@lg@parse@more#1{\tikz@lg@parse@more@#1\pgf@stop} -\def\tikz@lg@parse@more@>{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{target}}{\tikz@lg@parse@noquote{target}}} +\def\tikz@lg@parse@less#1{\tikz@lg@parse@less@#1\pgf@stop}% +\def\tikz@lg@parse@less@<{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{source}}{\tikz@lg@parse@noquote{source}}}% +\def\tikz@lg@parse@more#1{\tikz@lg@parse@more@#1\pgf@stop}% +\def\tikz@lg@parse@more@>{\pgfutil@ifnextchar"{\tikz@lg@parse@quote{target}}{\tikz@lg@parse@noquote{target}}}% -\def\tikz@lg@parse@noquote#1#2\pgf@stop{{\tikzgraphsset{#1 edge style={#2}}}} +\def\tikz@lg@parse@noquote#1#2\pgf@stop{{\tikzgraphsset{#1 edge style={#2}}}}% \def\tikz@lg@parse@quote#1#2\pgf@stop{% {\tikzgraphsset{/tikz/node quotes mean={#1 edge node={node [every edge quotes,##2]{##1}}},/utils/exec=\tikz@enable@node@quotes,#2}}% -} +}% \tikzgraphsset{ clear >/.style=target edge clear, clear </.style=source edge clear -} +}% % Positioning -\def\tikz@lib@graph@x{0} -\def\tikz@lib@graph@y{0} +\def\tikz@lib@graph@x{0}% +\def\tikz@lib@graph@y{0}% \tikzgraphsset{ x/.code=\def\tikz@lib@graph@x{#1}\tikz@lib@graphs@check@at, y/.code=\def\tikz@lib@graph@y{#1}\tikz@lib@graphs@check@at -} +}% \def\tikz@lib@graphs@check@at{% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@temp% @@ -1246,7 +1246,7 @@ \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@x\expandafter}% \expandafter,\expandafter{\tikz@lib@graph@y})}% \pgfqkeys{/tikz}{at/.expand once=\tikz@temp}% -} +}% \newif\iftikz@lib@graph@trie @@ -1259,24 +1259,24 @@ edge quotes/.style={/tikz/every edge quotes/.style={#1}}, edge quotes center/.style={edge quotes={anchor=center}}, edge quotes mid/.style={edge quotes={anchor=mid}} -} +}% \def\tikz@lg@make@edge@node#1#2{% \def\pgf@marshal{node[#2]}% \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter\pgf@marshal\expandafter\expandafter\expandafter{\expandafter\pgf@marshal\expandafter{\tikzgraphnodetext}}% \pgfkeysalso{#1 edge node/.expand once=\pgf@marshal,as=}% -} +}% \newif\iftikz@lib@graph@fresh@node -\tikzgraphsset{fresh nodes/.is if=tikz@lib@graph@fresh@node} +\tikzgraphsset{fresh nodes/.is if=tikz@lib@graph@fresh@node}% \tikzgraphsset{number nodes/.code=% \pgfmathsetcount\tikz@lib@auto@number{#1}% \tikzgraphsautonumbernodestrue,% number nodes/.default=1,% number nodes sep/.code=\def\tikz@lib@auto@sep{#1} -} -\def\tikz@lib@auto@sep{\space} +}% +\def\tikz@lib@auto@sep{\space}% \newif\iftikz@lib@graph@node@created @@ -1284,26 +1284,26 @@ % Is #1 the name of a node set? \expandafter\let\expandafter\pgf@temp\csname tikz@lg@node@set #1\endcsname \ifx\pgf@temp\relax - \pgfutil@g@addto@macro\tikz@lg@temp{\tikz@lg@do{#1}} + \pgfutil@g@addto@macro\tikz@lg@temp{\tikz@lg@do{#1}} \else% \expandafter\pgfutil@g@addto@macro\expandafter\tikz@lg@temp\expandafter{\pgf@temp} - \fi -} + \fi +}% \def\tikz@lib@graph@do@use#1{% \tikz@lg@init@color{#1}{\tikz@lgc@all@true\tikz@lgc@source@true\tikz@lgc@target@true}% -} +}% \tikzgraphsset{ typeset/.store in=\tikz@lib@graph@typesetter, math nodes/.style={/tikz/graphs/typeset=$\tikzgraphnodetext$}, empty nodes/.style={/tikz/graphs/typeset=}, typeset=\tikzgraphnodetext -} +}% -% -% Handle scope +% +% Handle scope % \def\tikz@lib@graph@scope#1{ \begingroup% @@ -1312,7 +1312,7 @@ \tikz@lib@graph@start@hint@group% \tikz@lib@graph@parse@group{#1}% \tikz@lib@graph@end@hint@group% - \expandafter% + \expandafter% \endgroup% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@graph@node@list% @@ -1324,7 +1324,7 @@ \tikzerror{One of the arrow types <-, --, ->, -!-, or <-> expected}% }% }% -} +}% \def\tikz@lib@graph@scope@minus-{ \pgfutil@ifnextchar>\tikz@lib@graph@forward@arrow{% @@ -1337,20 +1337,20 @@ }% }% }% -} +}% \def\tikz@lib@graph@scope@less<-{\tikz@lib@graph@back@arrow}% -% -% Predefining graphs -% +% +% Predefining graphs +% \tikzgraphsset{ declare/.code 2 args={\expandafter\def\csname tikz@lib@graph@def@#1\endcsname{\tikz@lib@graph@do@graph{#2}}}% -} +}% \def\tikz@lib@graph@handle@graph#1{% \begingroup% @@ -1359,17 +1359,17 @@ \tikz@lib@graph@start@hint@group% \csname tikz@lib@graph@def@\tikz@lib@graph@name@only\endcsname% \tikz@lib@graph@end@hint@group% - \expandafter% + \expandafter% \endgroup% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\tikz@lib@graph@node@list% - \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}% + \expandafter\expandafter\expandafter{\expandafter\tikz@lib@graph@node@list\tikz@lib@graph@node@list}% \tikz@lib@graph@hint@aftergroup% -} +}% \def\tikz@lib@graph@do@graph#1{% \tikz@lib@graph@parse@group{#1}% -} +}% \let\tikz@lib@graph@path\pgfutil@empty @@ -1379,13 +1379,13 @@ name/.code={% \edef\tikz@lib@graph@path{\tikz@lib@graph@path#1\tikz@lib@graph@name@separator}% }% -} +}% % % Colors -% -\def\tikz@lg@newif{\csname newif\endcsname} +% +\def\tikz@lg@newif{\csname newif\endcsname}% \tikzgraphsset{ as/.code=\def\tikzgraphnodeas{#1},% color class/.style={% @@ -1415,17 +1415,17 @@ color class=target, color class=target', color class=all -} +}% \def\tikz@lg@init@color#1#2{% \expandafter\gdef\csname tikz@lgc@#1\endcsname{#2}% -} +}% \def\tikz@lib@graph@cleanup#1{% \expandafter\global\expandafter\let\csname tikz@lgc@#1\endcsname\relax% \ifcsname tikz@lgca@@#1\endcsname\expandafter\global\expandafter\let\csname tikz@lgca@@#1\endcsname\relax\fi% \ifcsname tikz@lgcb@@#1\endcsname\expandafter\global\expandafter\let\csname tikz@lgcb@@#1\endcsname\relax\fi% -} +}% \def\tikz@lg@colorize#1{% \expandafter\let\expandafter\pgf@temp\csname tikz@lgc@#1\endcsname% @@ -1434,14 +1434,14 @@ \expandafter\expandafter\expandafter{% \expandafter\tikz@lg@col\pgf@temp}% \expandafter\global\expandafter\let\csname tikz@lgc@#1\endcsname\pgf@temp% -} +}% \def\tikz@lg@change@color#1{% \def\tikz@lg@temp@save{#1}% \let\tikz@lg@collect\pgfutil@empty% \expandafter\let\expandafter\pgf@temp\csname tikz@lgc@#1\endcsname% \expandafter\tikz@lg@change@check\pgf@temp\pgf@stop% -} +}% \def\tikz@lg@change@check#1{% \ifx#1\pgf@stop% \tikz@lg@change@write@back% @@ -1454,14 +1454,14 @@ \fi% \expandafter\tikz@lg@change@check \fi% -} +}% \def\tikz@lg@change@add#1{% \expandafter\def\expandafter\tikz@lg@collect\expandafter{\tikz@lg@collect#1}% -} +}% \def\tikz@lg@change@write@back{% \expandafter\global\expandafter\let\csname tikz@lgc@\tikz@lg@temp@save\endcsname\tikz@lg@collect% -} +}% @@ -1479,25 +1479,25 @@ \fi% }% \iftikz@color@test#3\else#4\fi% -} +}% \newif\iftikz@color@test -\def\tikz@lg@if@local@node#1#2#3{\expandafter\ifx\csname tikz@lgc@#1\endcsname\relax#3\else#2\fi} +\def\tikz@lg@if@local@node#1#2#3{\expandafter\ifx\csname tikz@lgc@#1\endcsname\relax#3\else#2\fi}% -\def\tikz@lib@reset@temp{\let\pgf@temp\iffalse} +\def\tikz@lib@reset@temp{\let\pgf@temp\iffalse}% -% -% Handle connection annotations +% +% Handle connection annotations % \def\tikz@lib@annotate@#1#2#3#4{% \expandafter\ifx\csname tikz@lgc#1@@#2\endcsname\relax% \expandafter\gdef\csname tikz@lgc#1@@#2\endcsname{{#3}{#4}}% - \else% + \else% \expandafter\expandafter\expandafter\tikz@lib@annotate@read\csname tikz@lgc#1@@#2\endcsname{#3}{#4}% \expandafter\global\expandafter\let\csname tikz@lgc#1@@#2\endcsname\pgf@temp% \fi% -} -\def\tikz@lib@annotate@read#1#2#3#4{\def\pgf@temp{{#1,#3}{#2#4}}} +}% +\def\tikz@lib@annotate@read#1#2#3#4{\def\pgf@temp{{#1,#3}{#2#4}}}% \tikzgraphsset{ source edge style/.code=\tikz@lib@annotate@{a}{\tikz@lib@graph@name}{#1}{}, @@ -1525,7 +1525,7 @@ \expandafter }\expandafter% \def\expandafter\tikz@lib@graph@node@list\expandafter{\tikz@lg@packed}% -} +}% \def\tikz@lg@packer#1{% \expandafter\ifx\csname tikz@lg@p@#1\endcsname\pgf@stop% @@ -1533,7 +1533,7 @@ \expandafter\let\csname tikz@lg@p@#1\endcsname\pgf@stop% \expandafter\def\expandafter\tikz@lg@packed\expandafter{\tikz@lg@packed\tikz@lg@do{#1}} \fi -} +}% % % Color functions @@ -1543,11 +1543,11 @@ % % #1 = the color name % #2 = a macro -% +% % Description: -% +% % For each node having color #1, the macro #2 will be called. This -% macro should take a single parameter, which will be set +% macro should take a single parameter, which will be set % to the node's name. \def\tikzgraphforeachcolorednode#1#2{% @@ -1555,8 +1555,8 @@ \expandafter\def\expandafter\iftikz@lib@graph@color@picker\expandafter{\csname iftikz@lgc@#1@\endcsname}% \let\tikz@lib@graph@action#2% \let\tikz@lg@do\tikz@lg@pick% - \tikz@lib@graph@node@list% -} + \tikz@lib@graph@node@list% +}% \def\tikz@lg@pick#1{ {% \csname tikz@lgc@#1\endcsname% @@ -1567,18 +1567,18 @@ \fi% }% \iftikz@color@test\tikz@lib@graph@action{#1}\fi% -} +}% -% Prepare a color +% Prepare a color % % #1 is the color name % #2 is a counter % #3 is a prefix -% +% % Description: -% +% % You can call this function inside a connector. It will do the % following: First, its counts how many nodes exist that have color % #1. This number is stored in the counter passed as #2. Furthermore, @@ -1587,7 +1587,7 @@ % and the third red node is called foo and if #3 is "bar", then a % macro called "\bar3" is set to "foo" as if you had said % "\expandafter\def\csname bar3\endcsname{foo}". -% +% % The bottom line of all this is that after a preparation you can % easily iterate over nodes having a certain color. If you wish to % iterate over a single color, it will be quicker and easier to call @@ -1599,18 +1599,18 @@ \tikz@lib@graph@count0\relax \def\tikz@lib@graph@prefix{#3}% \tikzgraphforeachcolorednode{#1}\tikz@lib@graph@prepare% -} +}% \def\tikz@lib@graph@prepare#1{% \advance\tikz@lib@graph@count by1\relax% \expandafter\def\csname\tikz@lib@graph@prefix\the\tikz@lib@graph@count\endcsname{#1}% -} +}% -% -% The bipartite connector +% +% The bipartite connector % \tikzgraphsset{ @@ -1625,21 +1625,21 @@ complete bipartite={#1}{#2} }, induced complete bipartite/.default={target'}{source'}, -} +}% \def\tikz@lib@graph@bipartite@outer#1{% \def\tikz@lib@graph@from{#1}% {% \tikzgraphforeachcolorednode{\tikz@lg@shoreb}\tikz@lib@graph@bipartite@inner% }% -} +}% \def\tikz@lib@graph@bipartite@inner#1{% \def\pgf@temp{#1}% \ifx\pgf@temp\tikz@lib@graph@from\else% \tikz@lib@graph@default@new@edge{\tikz@lib@graph@from}{#1}% \fi% -} +}% \def\tikz@lib@graph@default@new@edge#1#2{% \pgfkeysgetvalue{/tikz/graphs/@edges styling}\pgf@temp @@ -1652,7 +1652,7 @@ \expandafter\expandafter\expandafter{\expandafter\pgf@temp\tikz@lib@add@temp}% \expandafter\expandafter\expandafter\tikz@lib@graph@default@new@edge@% \expandafter\expandafter\expandafter{\expandafter\pgf@temp\expandafter}\expandafter{\pgf@temp@b}{#1}{#2}% -} +}% \def\tikz@lib@graph@default@new@edge@#1#2#3#4{% \iftikz@lib@graph@simple% \edef\tikz@temp{{\pgfkeysvalueof{/tikz/graphs/default edge kind}}{#3}{#4}} @@ -1660,24 +1660,24 @@ \else% \pgfkeys{/tikz/graphs/.cd,new \pgfkeysvalueof{/tikz/graphs/default edge kind}={#3}{#4}{#1}{#2}}% \fi% -} +}% \def\tikz@lib@graph@add@edge@annotations#1#2{% \ifcsname tikz@lgc#1@@#2\endcsname% \expandafter\let\expandafter\tikz@lg@temp@\csname tikz@lgc#1@@#2\endcsname% \ifx\tikz@lg@temp@\relax\else \expandafter\tikz@lib@graph@add@edge@annotations@\tikz@lg@temp@% - \let\tikz@lib@add@temp\tikz@lib@final@edge@style + \let\tikz@lib@add@temp\tikz@lib@final@edge@style \fi% \fi% -} +}% \def\tikz@lib@graph@add@edge@annotations@#1#2{ \expandafter\def\expandafter\pgf@temp\expandafter{\pgf@temp,#1}% \expandafter\def\expandafter\pgf@temp@b\expandafter{\pgf@temp@b#2}% -} -\def\tikz@lib@final@edge@style{,after source and target edge/.try} +}% +\def\tikz@lib@final@edge@style{,after source and target edge/.try}% -% -% The clique connector +% +% The clique connector % \tikzgraphsset{ @@ -1686,7 +1686,7 @@ \tikz@lg@clique@loop% }}, clique/.default=all -} +}% \def\tikz@lg@clique@loop{% \ifnum\c@pgf@counta=0\relax% @@ -1696,7 +1696,7 @@ \advance\c@pgf@counta by-1\relax% \expandafter\tikz@lg@clique@loop% \fi% -} +}% \def\tikz@lg@clique@loop@inner{% \advance\c@pgf@countb by-1\relax% @@ -1704,11 +1704,11 @@ \tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{\csname tikz@lg\the\c@pgf@counta\endcsname}% \expandafter\tikz@lg@clique@loop@inner% \fi% -} +}% -% -% The independent set connector +% +% The independent set connector % \tikzgraphsset{ @@ -1720,7 +1720,7 @@ \pgfkeyslet{/tikz/graphs/default edge kind}\tikz@lg@default% }}, induced independent set/.default=all -} +}% \def\tikz@lg@indep@loop{% \ifnum\c@pgf@counta=0\relax% @@ -1730,7 +1730,7 @@ \advance\c@pgf@counta by-1\relax% \expandafter\tikz@lg@indep@loop% \fi% -} +}% \def\tikz@lg@indep@loop@inner{% \advance\c@pgf@countb by-1\relax% @@ -1738,22 +1738,22 @@ \tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@counta\endcsname}{\csname tikz@lg\the\c@pgf@countb\endcsname}% \expandafter\tikz@lg@indep@loop@inner% \fi% -} +}% -% -% The path connector +% +% The path connector % \tikzgraphsset{ path/.style={operator={% \let\tikz@lg@prev\relax% \tikzgraphforeachcolorednode{#1}\tikz@lib@graph@path@do% - }}, + }}, path/.default=all, induced path/.style={induced independent set={#1},path={#1}}, induced path/.default=all, -} +}% \def\tikz@lib@graph@path@do#1{% \ifx\tikz@lg@prev\relax% @@ -1761,11 +1761,11 @@ \tikz@lib@graph@default@new@edge{\tikz@lg@prev}{#1}% \fi \def\tikz@lg@prev{#1}% -} +}% -% -% The cycle connector +% +% The cycle connector % \tikzgraphsset{ @@ -1781,7 +1781,7 @@ cycle/.default=all, induced cycle/.style={induced independent set={#1},cycle={#1}}, induced cycle/.default=all, -} +}% \def\tikz@lib@graph@cycle@do#1{% \ifx\tikz@lg@prev\relax% @@ -1791,13 +1791,13 @@ \tikz@lib@graph@default@new@edge{\tikz@lg@prev}{#1}% \def\tikz@lg@prev{#1}% \fi% -} +}% -% -% The matching and star connector +% +% The matching and star connector % \tikzgraphsset{ @@ -1811,7 +1811,7 @@ }% }, matching and star/.default={target'}{source'} -} +}% \def\tikz@lib@graph@flow@do#1{% \advance\c@pgf@countb by1\relax% @@ -1822,7 +1822,7 @@ \tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{#1}% \fi% \def\tikz@lg@prev{#1}% -} +}% \def\tikz@lib@graph@flow@rest{% \ifnum\c@pgf@countb<\c@pgf@counta\relax% @@ -1832,12 +1832,12 @@ \expandafter\tikz@lib@graph@flow@rest% \fi% \fi% -} +}% -% -% The matching connector +% +% The matching connector % \tikzgraphsset{ @@ -1849,7 +1849,7 @@ }% }, matching/.default={target'}{source'} -} +}% \def\tikz@lib@graph@matching@do#1{% \advance\c@pgf@countb by1\relax% @@ -1857,14 +1857,14 @@ \else% \tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countb\endcsname}{#1}% \fi% -} +}% -% -% The butterfly connector +% +% The butterfly connector % \tikzgraphsset{ @@ -1889,7 +1889,7 @@ butterfly/to/.initial=source', butterfly'/.style={operator={}{\tikz@butterfly@primetrue\pgfkeysalso{butterfly={#1}}}}, butterfly'/.default=, -} +}% \newif\iftikz@butterfly@prime @@ -1924,15 +1924,15 @@ \c@pgf@countc=\c@pgf@counta\relax% \fi% \tikz@lib@graph@default@new@edge{\csname tikz@lg\the\c@pgf@countc\endcsname}{#1}% -} +}% -% -% The no edges connector % -\tikzgraphsset{no edges/.style={operator=\relax}} +% The no edges connector +% +\tikzgraphsset{no edges/.style={operator=\relax}}% @@ -1949,7 +1949,7 @@ }% }, grid/.default=all -} +}% \def\tikzgraphpreparewrapafter{% \pgfkeysgetvalue{/tikz/graphs/wrap after}\tikz@temp% @@ -1960,7 +1960,7 @@ \else% \edef\tikzgraphwrapafter{\tikz@temp} \fi% -} +}% \def\tikz@lg@grid@loop{% \ifnum\c@pgf@counta=0\relax% @@ -1982,7 +1982,7 @@ \advance\c@pgf@counta by-1\relax% \expandafter\tikz@lg@grid@loop% \fi% -} +}% @@ -1992,32 +1992,32 @@ % It is not the job of the graph library to compute good positions for % nodes in a graph. However, some basic support is provided for simple % cases. -% +% % The idea is at follows: Graphs are specified hierarchically. For % instance, consider the following graph specification: -% +% % graph { a, b, c -> d -> {e -> f -> g, h} -> i, j -> k } -% +% % Here, we have the *group* {e->f->g,h} inside the larger graph % specification. Each group consists of sequence of *chains* like % e->f->g or j->k. -% +% % In order to facilitate the automatic positioning of nodes, the graph % library will provide you with information about the position of % nodes inside their groups and chains. -% +% % As a chain is being parsed, a counter stored in % /tikz/graphs/placement/element count is available that is advanced for -% each element in the chain. -% +% each element in the chain. +% % Additionally, a counter stored in placement/width is % available. This "logical" width is defined recursively as follows: The % width of a single node is computed by calling the key % placement/logical node width, which should return a real or logical -% width of the node passed as a parameter in the macor \pgfmathresult. The +% width of the node passed as a parameter in the macro \pgfmathresult. The % width of a chain is the sum of the widths of its elements. The % width of a group is the maximum of the widths of its elements. -% +% % % Symmetrically, as a group is being constructed, a counter stored in % placement/chain count is available that is advanced for each chain @@ -2025,21 +2025,21 @@ % recursively as follows: For a single node, the depth is % computed by the key placement/logical node depth. The depth % of a group is the sum of the depths of its elements. The depth of a -% chain is the maximum of the depth of its elements. +% chain is the maximum of the depth of its elements. +% % -% % The above keys get updated automatically. You should setup the key % placement/compute position such that it uses the above keys to % compute a good position for a new node based on the above % keys. Typically, this key should execute node={shift=(...)} to setup % the necessary shift for a new node. -% +% % The key placement/compute position should not be called % directly. Instead, the key placement/place should be used. This key % has two effects: First, it calls placement/compute position. Second, % it resets the length and normal counters. It will setup a completely % new counting of lengths and counters inside the current scope. -% +% % The placmenet/place key is executed automatically whenever a new % node is automatically created. Furthermore, placement strategies % will call this key. @@ -2064,20 +2064,20 @@ level/.initial=0, logical node depth/.code=\def\pgfmathresult{1}, logical node width/.code=\def\pgfmathresult{1}, -} +}% \def\tikz@lib@graph@reset@locals{% \gdef\tikz@lib@graph@group@depth{0}% \gdef\tikz@lib@graph@group@width{0}% -} +}% -% Arrange nodes evenly -% +% Arrange nodes evenly +% % This strategy works as follows: You specify a "chain shift vector" % and a "group shift vector". Then each new element on a chain is % shifted by the chain shift vector relative to the previous element -% on the chain. Similarly for each new element of a group. +% on the chain. Similarly for each new element of a group. \tikzgraphsset{ Cartesian placement/.style={ @@ -2142,9 +2142,9 @@ placement/logical node depth/.code=\def\pgfmathresult{1} }, branch down/.default=1, - % - % Sep shifts - % + % + % Sep shifts + % grow right sep/.style={ Cartesian placement, chain shift={(1pt,0)}, @@ -2217,26 +2217,26 @@ nodes={anchor=\csname tikz@lib@graph@auto@\tikz@lib@graph@auto@h @\tikz@lib@graph@auto@v\endcsname}, /utils/exec=\def\tikz@lib@graph@auto@v{#1} }, - % - % + % + % no placement/.style={ placement/place, placement/compute position/.code=% } -} +}% -\def\tikz@lib@graph@auto@h{center} -\def\tikz@lib@graph@auto@v{center} +\def\tikz@lib@graph@auto@h{center}% +\def\tikz@lib@graph@auto@v{center}% -\def\tikz@lib@graph@auto@center@center{center} -\def\tikz@lib@graph@auto@west@center{west} -\def\tikz@lib@graph@auto@east@center{east} -\def\tikz@lib@graph@auto@center@north{north} -\def\tikz@lib@graph@auto@west@north{north west} -\def\tikz@lib@graph@auto@east@north{north east} -\def\tikz@lib@graph@auto@center@south{south} -\def\tikz@lib@graph@auto@west@south{south west} -\def\tikz@lib@graph@auto@east@south{south east} +\def\tikz@lib@graph@auto@center@center{center}% +\def\tikz@lib@graph@auto@west@center{west}% +\def\tikz@lib@graph@auto@east@center{east}% +\def\tikz@lib@graph@auto@center@north{north}% +\def\tikz@lib@graph@auto@west@north{north west}% +\def\tikz@lib@graph@auto@east@north{north east}% +\def\tikz@lib@graph@auto@center@south{south}% +\def\tikz@lib@graph@auto@west@south{south west}% +\def\tikz@lib@graph@auto@east@south{south east}% \def\tikz@lib@graph@linear@pos{% \pgfkeysgetvalue{/tikz/graphs/chain shift}\tikz@temp @@ -2251,29 +2251,29 @@ \advance\pgf@ya by\pgf@y% \edef\tikz@lib@graph@shift{(\the\pgf@xa,\the\pgf@ya)} \pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}} -} +}% \def\tikz@lib@graph@width@sep#1#2{% \pgf@process{\pgfpointdiff{\pgfpointanchor{#1}{west}}{\pgfpointanchor{#1}{east}}}% \pgfmathparse{#2+\the\pgf@x}% -} +}% \def\tikz@lib@graph@depth@sep#1#2{% \pgf@process{\pgfpointdiff{\pgfpointanchor{#1}{south}}{\pgfpointanchor{#1}{north}}}% \pgfmathparse{#2+\the\pgf@y}% -} +}% -% Circular arrangements -% +% Circular arrangements +% % This strategy works a bit like the arrange evenly strategy, but in % polar coordinates. Both for the chains and the groups you specify a % polar shift, which must be in the form "(delta degree:delta % distance)". For each element in a chain, the delta degree is added % to the chain degree, likewise for each element the delta distance is % added. Similarly for groups. -% +% % There is an initial degree and radius, stored in the key "phase" and % "radius". @@ -2298,7 +2298,7 @@ group polar shift/.initial={(60:0)}, radius/.initial=1cm, phase/.initial=90, -} +}% \def\tikz@lib@graph@circular@pos{% \pgfkeysgetvalue{/tikz/graphs/chain polar shift}\tikz@temp @@ -2316,13 +2316,13 @@ \pgfmathsetmacro\tikz@temp{\the\pgf@xa+\pgfkeysvalueof{/tikz/graphs/phase}}% \edef\tikz@lib@graph@shift{(\tikz@temp:\the\pgf@ya)} \pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}} -} +}% \def\tikz@lib@graph@decompose@polar(#1:#2){% \pgfmathsetlength\pgf@x{#1}% \pgfmathsetlength\pgf@y{#2}% -} +}% % Grid arrangements @@ -2332,7 +2332,7 @@ placement/place, placement/compute position/.code=\tikz@lib@graph@grid@pos,% }, -} +}% \def\tikz@lib@graph@grid@pos{% @@ -2355,33 +2355,33 @@ \pgfkeysgetvalue{/tikz/graphs/group shift}\tikz@temp% \expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@a\tikz@temp% \pgfkeysgetvalue{/tikz/graphs/chain shift}\tikz@temp% - \expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@b\tikz@temp% + \expandafter\tikz@scan@one@point\expandafter\tikz@lib@graph@grid@pos@b\tikz@temp% % % apply the shift % \edef\tikz@lib@graph@shift{(\the\pgf@xa,\the\pgf@ya)} \pgfkeys{/tikz/graphs/nodes/.expanded={shift={\tikz@lib@graph@shift}}} -} +}% -\def\tikz@lib@graph@grid@pos@a#1{\pgf@process{\pgfpointscale{\tikz@temp@row}{#1}}\pgf@xa=\pgf@x\relax\pgf@ya=\pgf@y\relax} +\def\tikz@lib@graph@grid@pos@a#1{\pgf@process{\pgfpointscale{\tikz@temp@row}{#1}}\pgf@xa=\pgf@x\relax\pgf@ya=\pgf@y\relax}% \def\tikz@lib@graph@grid@pos@b#1{\pgf@process{\pgfpointscale{\tikz@temp@col}{#1}}% \advance\pgf@xa by\pgf@x\relax - \advance\pgf@ya by\pgf@y\relax} + \advance\pgf@ya by\pgf@y\relax}% \tikzgraphsset{ % Grids: wrap after/.initial=0, % Node sets: V/.code={% - \def\tikzgraphV{#1} - \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax} + \def\tikzgraphV{#1}% + \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}% \edef\tikzgraphVnum{\the\c@pgf@counta} }, V={1}, n/.style={V={1,...,#1},name shore V/.style={name=V}}, W/.code={% - \def\tikzgraphW{#1} - \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax} + \def\tikzgraphW{#1}% + \c@pgf@counta=0\foreach \tikz@dummy in {#1} {\global\advance\c@pgf@counta by1\relax}% \edef\tikzgraphWnum{\the\c@pgf@counta} }, W={1}, @@ -2389,7 +2389,7 @@ % Shores: name shore V/.style=, name shore W/.style=, -} +}% @@ -2439,7 +2439,7 @@ % % % Things that are allowed in the normal syntax, but not in the quick -% syntax, include: +% syntax, include: % % - Connecting a node and a group as in a->{b,c}. % - Node names without quotation marks. @@ -2464,7 +2464,7 @@ % % -\tikzgraphsset{quick/.is if=tikz@graph@quick} +\tikzgraphsset{quick/.is if=tikz@graph@quick}% \newif\iftikz@graph@quick \def\tikz@lib@graphs@parse@quick@graph{ @@ -2475,21 +2475,21 @@ \let\tikzgraphnodepath\pgfutil@empty% \tikz@q@outertrue% \afterassignment\tikz@lib@graphs@quick@main\let\pgf@temp=% -} +}% \newcount\tikz@qnode@count \newif\iftikz@q@outer \def\tikz@lib@graphs@quick@main{% \afterassignment\tikz@lib@graphs@quick@handle\let\pgf@let@token=% -} +}% \def\tikz@lib@graphs@quick@handle{% \ifx\pgf@let@token"% \expandafter\tikz@lib@graphs@quick@first@node% \else% \expandafter\tikz@lib@graphs@quick@other% \fi% -} +}% \def\tikz@lib@graphs@quick@other{% \let\tikz@next\tikz@lib@graphs@quick@error% \ifx\pgf@let@token\egroup% @@ -2502,22 +2502,22 @@ \let\tikz@next\tikz@lib@graphs@quick@main% \fi% \fi - \fi% + \fi% \tikz@next% -} +}% -\def\tikz@lib@graphs@quick@error#1{\tikzerror{Unexpected token '\string#1' in quick graph syntax}\tikz@lib@graphs@quick@main} +\def\tikz@lib@graphs@quick@error#1{\tikzerror{Unexpected token '\string#1' in quick graph syntax}\tikz@lib@graphs@quick@main}% \def\tikz@lib@graphs@quick@start@group{% \pgfutil@ifnextchar[\tikz@lib@graphs@quick@start@group@{\tikzerror{Group in quick graph syntax must start with options.}} -} +}% \def\tikz@lib@graphs@quick@start@group@[#1]{% \begingroup% \tikz@q@outerfalse% \tikzgraphsset{#1}% \tikz@lib@graphs@quick@main% -} +}% \def\tikz@lib@graphs@quick@end@group{% \iftikz@q@outer% \endgroup% @@ -2526,27 +2526,27 @@ \ifnum\tikz@qnode@count>0\relax% \expandafter\global\expandafter\let\csname tikz@gr@q@@\csname tikz@gr@qn@@\the\tikz@qnode@count\endcsname\endcsname\relax% \expandafter\global\expandafter\let\csname tikz@gr@qn@@\the\tikz@qnode@count\endcsname\relax% - \global\advance\tikz@qnode@count by-1\relax% + \global\advance\tikz@qnode@count by-1\relax% \pgfutil@repeat% \expandafter\tikz@lib@graph@main@done% \else% \endgroup% - \expandafter\tikz@lib@graphs@end@group@% - \fi% -} + \expandafter\tikz@lib@graphs@end@group@% + \fi% +}% \def\tikz@lib@graphs@end@group@{% \pgfutil@ifnextchar;{\expandafter\tikz@lib@graphs@quick@main\pgfutil@gobble}{% \pgfutil@ifnextchar,{\expandafter\tikz@lib@graphs@quick@main\pgfutil@gobble}{% \tikzerror{Graph groups in quick syntax must be followed by a semicolon or a comma.}% }% }% -} +}% \def\tikz@lib@graphs@quick@first@node{% \let\tikz@quick@prev@node\relax% \tikz@lib@graphs@quick@node% -} +}% \def\tikz@lib@graphs@quick@node#1"{% \def\tikzgraphnodename{#1}% @@ -2556,14 +2556,14 @@ \global\advance\tikz@lib@auto@number by1\relax% \fi \pgfutil@ifnextchar/\tikz@lib@graphs@quick@text\tikz@lib@graphs@quick@opt% -} +}% \def\tikz@lib@graphs@quick@text/"#1"{% \def\tikzgraphnodetext{#1}% \tikz@lib@graphs@quick@opt% -} +}% \def\tikz@lib@graphs@quick@opt{% \pgfutil@ifnextchar[\tikz@lib@graphs@quick@withopt{\tikz@lib@graphs@quick@withopt[]}%] -} +}% \def\tikz@lib@graphs@quick@withopt[#1]{% % Test, whether node already exists \expandafter\ifx\csname tikz@gr@q@@\tikzgraphnodename\endcsname\relax% @@ -2583,56 +2583,56 @@ \tikzgraphnodeas% };% \else% - % + % % Handle late options and operators \tikzgdlatenodeoptionacallback{\tikzgraphnodename}% \node also[graphs/redirect unknown to tikz,/tikz/graphs/.cd,#1](\tikzgraphnodename);% \fi% - % Connect, if necessary + % Connect, if necessary \tikz@lig@graph@quikc@make@edge@if@necessary% \tikz@lib@graphs@quick@scan@after@node% -} +}% \def\tikz@lig@graph@quikc@make@edge@if@necessary{% \ifx\tikz@quick@prev@node\relax% \else% \tikz@lib@graphs@quick@make@edge% \fi% -} +}% \def\tikz@lib@graphs@quick@scan@after@node{% \pgfutil@ifnextchar,\tikz@lib@graphs@quick@comma{% \pgfutil@ifnextchar;\tikz@lib@graphs@quick@semi{% \pgfutil@ifnextchar\egroup{\tikz@lib@graphs@quick@semi;}{% \pgfutil@ifnextchar\par{\expandafter\tikz@lib@graphs@quick@scan@after@node\tikz@lib@graphs@quick@gobble@par}% - \tikz@lib@graphs@quick@connector}}}% -} + \tikz@lib@graphs@quick@connector}}}% +}% \long\def\tikz@lib@graphs@quick@gobble@par#1{}% -\def\tikz@lib@graphs@quick@comma,{\tikz@lib@graphs@quick@main} -\def\tikz@lib@graphs@quick@semi;{\tikz@lib@graphs@quick@main} +\def\tikz@lib@graphs@quick@comma,{\tikz@lib@graphs@quick@main}% +\def\tikz@lib@graphs@quick@semi;{\tikz@lib@graphs@quick@main}% \def\tikz@lib@graphs@quick@connector#1#2{% \def\tikz@lib@graphs@quick@edge@kind{#1#2}% \pgfutil@ifnextchar>\tikz@lib@graphs@back@edge{% \pgfutil@ifnextchar[\tikz@lib@graphs@quick@connector@handle@opt{\tikz@lib@graphs@quick@connector@handle@opt[]}%] }% -} +}% \def\tikz@lib@graphs@back@edge#1{% \expandafter\def\expandafter\tikz@lib@graphs@quick@edge@kind\expandafter{\tikz@lib@graphs@quick@edge@kind#1}% \pgfutil@ifnextchar[\tikz@lib@graphs@quick@connector@handle@opt{\tikz@lib@graphs@quick@connector@handle@opt[]}%] -} +}% \def\tikz@lib@graphs@quick@connector@handle@opt[#1]{% \def\tikz@lib@graphs@quick@edge@options{#1}% \let\tikz@quick@prev@node\tikzgraphnodename% \tikz@lib@graphs@quick@scan@after@connector% -} +}% \def\tikz@lib@graphs@quick@scan@after@connector{% \pgfutil@ifnextchar\par{\expandafter\tikz@lib@graphs@quick@scan@after@connector\tikz@lib@graphs@quick@gobble@par}{% \pgfutil@ifnextchar"{\expandafter\tikz@lib@graphs@quick@node\pgfutil@gobble}{% \tikzerror{Quotation marks expected after edge connector}% }% }% -} +}% \def\tikz@lib@graphs@quick@make@edge{% { @@ -2640,22 +2640,22 @@ \expandafter\expandafter\expandafter\tikz@lib@graphs@quick@make@edge@for% \expandafter\expandafter\expandafter{\expandafter\tikz@quick@prev@node\expandafter}\expandafter{\tikzgraphnodename}% } -} +}% \def\tikz@lib@graphs@quick@make@edge@styling#1{% \tikz@enable@edge@quotes% \tikzgraphsset{.unknown/.code=\tikz@lib@graph@unknown@edge@option{##1},#1}% -} +}% \def\tikz@lib@graphs@quick@make@edge@for#1#2{% \pgfkeysgetvalue{/tikz/graphs/@edges styling}\pgf@tempa \pgfkeysgetvalue{/tikz/graphs/@edges node}\pgf@temp@b \expandafter\expandafter\expandafter\tikz@lib@graphs@quick@make@edge@for@with% \expandafter\expandafter\expandafter{\expandafter\pgf@tempa\expandafter}\expandafter{\pgf@temp@b}{#1}{#2}% -} +}% \def\tikz@lib@graphs@quick@make@edge@for@with#1#2#3#4{% \tikzgraphsset{new \tikz@lib@graphs@quick@edge@kind={#3}{#4}{#1}{#2}}% -} +}% \endinput diff --git a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex index a56702bcf96..bfceb3769a5 100644 --- a/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex @@ -8,7 +8,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS[v\pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf/frontendlayer/tikz/libraries/graphs/tikzlibrarygraphs.standard.code.tex,v 1.9 2012/02/27 20:00:11 tantau Exp $ +\ProvidesFileRCS{tikzlibrarygraphs.standard.code.tex} % @@ -43,16 +43,16 @@ }, % % A complete bipartite graph with shores V and W. - % + % declare={subgraph K_nm}% { - [color class=shore V, + [color class=shore V, color class=shore W, complete bipartite={shore V}{shore W}] subgraph I_n [name shore V, shore V] -- [no edges] subgraph I_n [name shore W, V/.expand once=\tikzgraphW, shore W] }, - % + % % A cycle with n nodes. % declare={subgraph C_n}% @@ -60,9 +60,9 @@ [cycle] subgraph I_n }, - % + % % A path with n nodes. - % + % declare={subgraph P_n}% { [path] @@ -78,8 +78,8 @@ }, % % A random graph according to the G_{n,p} model: For each pair of - % vertices there is an edge between them with probability p. - % + % vertices there is an edge between them with probability p. + % p/.initial=0.5, declare={subgraph G_np}% { @@ -105,8 +105,4 @@ [parse/.expand once=\tikz@lg@temp] } }, -} - - - - +}% |