Skip to content

Commit

Permalink
fix(gd): Wrap node name in \tikz@pp@name
Browse files Browse the repository at this point in the history
when tikz calls `\pgfgdedge`.

Signed-off-by: muzimuzhi <[email protected]>
  • Loading branch information
muzimuzhi committed Dec 23, 2021
1 parent af5107d commit 8b7f391
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tex/generic/pgf/graphdrawing/tex/tikzlibrarygraphdrawing.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@
%
% Setup for the graphs syntax
%
/tikz/graphs/new ->/.code n args={4}{\pgfgdedge{##1}{##2}{->}{/tikz,##3}{##4}},
/tikz/graphs/new <-/.code n args={4}{\pgfgdedge{##1}{##2}{<-}{/tikz,##3}{##4}},
/tikz/graphs/new --/.code n args={4}{\pgfgdedge{##1}{##2}{--}{/tikz,##3}{##4}},
/tikz/graphs/new <->/.code n args={4}{\pgfgdedge{##1}{##2}{<->}{/tikz,##3}{##4}},
/tikz/graphs/new -!-/.code n args={4}{\pgfgdedge{##1}{##2}{-!-}{/tikz,##3}{##4}},
/tikz/graphs/new ->/.code n args={4}{\tikz@lib@gd@edge{##1}{##2}{->}{/tikz,##3}{##4}},
/tikz/graphs/new <-/.code n args={4}{\tikz@lib@gd@edge{##1}{##2}{<-}{/tikz,##3}{##4}},
/tikz/graphs/new --/.code n args={4}{\tikz@lib@gd@edge{##1}{##2}{--}{/tikz,##3}{##4}},
/tikz/graphs/new <->/.code n args={4}{\tikz@lib@gd@edge{##1}{##2}{<->}{/tikz,##3}{##4}},
/tikz/graphs/new -!-/.code n args={4}{\tikz@lib@gd@edge{##1}{##2}{-!-}{/tikz,##3}{##4}},
/tikz/graphs/placement/compute position/.code=,%
}
}%

% wrapper for \pgfgdedge
\def\tikz@lib@gd@edge#1#2{%
\pgfgdedge{\tikz@pp@name{#1}}{\tikz@pp@name{#2}}%
}

\pgfgdaddprepareedgehook{
\tikz@enable@edge@quotes%
\let\tikz@transform=\pgfutil@empty%
Expand Down Expand Up @@ -130,11 +135,11 @@
}%

\def\tikz@gd@edge@from@parent@macro#1#2{
[/utils/exec=\pgfgdedge{\tikzparentnode}{\tikzchildnode}{--}{/tikz,#1}{#2}]
[/utils/exec=\tikz@lib@gd@edge{\tikzparentnode}{\tikzchildnode}{--}{/tikz,#1}{#2}]
}%

\def\tikz@gd@plain@edge@macro#1#2{
\pgfgdedge{\tikztostart}{\tikztotarget}{--}{/tikz,#1}{#2}
\tikz@lib@gd@edge{\tikztostart}{\tikztotarget}{--}{/tikz,#1}{#2}
}%


Expand Down

0 comments on commit 8b7f391

Please sign in to comment.