You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When name prefix (or name suffix) is set, graph drawing throws Lua error
...graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua:510: attempting to create edge between nodes c and a that are not in the graph
stack traceback:
[C]: in function 'assert'
...graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua:510: in function 'pgf.gd.interface.InterfaceToDisplay.createEdge'
[\directlua]:1: in main chunk.
\pgfgdedge ...uaescapestring {\the\toks 1}', }) }
\endpgfinterruptpath }}\en...
Minimal working example (MWE)
% !TeX program = lualatex\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs, graphdrawing}
\usegdlibrary{layered}
\begin{document}
% without graphdrawing\tikz\graph { {a,b} -> c }; % works\tikz[name prefix=x] \graph { {a,b} -> c }; % works% with graphdrawing\tikz\graph[layered layout] { {a,b} -> c }; % works\tikz[name prefix=x] \graph[layered layout] { {a,b} -> c }; % lua error\tikz[name prefix=x] \graph[layered layout, /tikz/name prefix=]
{ {a,b} -> c }; % works again\end{document}
I don't speak Lua, but by adding print() to function InterfaceToDisplay.createEdge(), I find when the error is thrown,
see lines 482--484 below, head == 'c' and tail == 'a'. However the keys stored in table scope.node_names is xa, xb, xc. Hence both h and t are nil and the assert() fails.
Brief outline of the bug
When
name prefix
(orname suffix
) is set, graph drawing throws Lua errorMinimal working example (MWE)
I don't speak Lua, but by adding
print()
to functionInterfaceToDisplay.createEdge()
, I find when the error is thrown,see lines 482--484 below,
head == 'c'
andtail == 'a'
. However the keys stored in tablescope.node_names
isxa, xb, xc
. Hence bothh
andt
are nil and theassert()
fails.pgf/tex/generic/pgf/graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua
Lines 475 to 495 in 247f1f0
The text was updated successfully, but these errors were encountered: