1

Consider the following example:

\usemodule[tikz]
\usetikzlibrary[graphs,graphdrawing]
\starttext
    \starttikzpicture
        \graph { A -> B };
    \stoptikzpicture
\stoptext

While it works in LaTeX (with the patch from Fresh install of TL2018: no tikz graph drawing libraries found applied), it does throw an error when loading the TikZ library in ConTeXt:

lua error       > lua error on line 1127 in file /usr/local/texlive/2018/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex:

...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: module 'pgf.gd.control' not found:
        no field package.preload['pgf.gd.control']
        no file '/usr/local/share/lua/5.2/pgf/gd/control.lua'
        no file '/usr/local/share/lua/5.2/pgf/gd/control/init.lua'
        no file '/usr/local/lib/lua/5.2/pgf/gd/control.lua'
        no file '/usr/local/lib/lua/5.2/pgf/gd/control/init.lua'
        no file './pgf/gd/control.lua'
        no file '/usr/local/lib/lua/5.2/pgf/gd/control.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './pgf/gd/control.so'
        no file '/usr/local/lib/lua/5.2/pgf.so'
        no file '/usr/local/lib/lua/5.2/loadall.so'
        no file './pgf.so'
stack traceback:
        [C]: in function 'requiem'
        ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>
        (...tail calls...)
        ...neric/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua:41: in main chunk
        [C]: in function 'requiem'
        ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>
        (...tail calls...)
        ...graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua:45: in main chunk
        [C]: in function 'requiem'
        ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>
        (...tail calls...)
        [ctxlua]:1: in main chunk

1117     }
1118     }
1119     
1120     
1121     %
1122     % Ok, fire up the system by creating the binding!
1123     %
1124     \directlua{
1125       require 'pgf.gd.interface.InterfaceToDisplay' 
1126       pgf.gd.interface.InterfaceToDisplay.bind(require 'pgf.gd.bindings.BindingToPGF')
1127 >>  } 
1128     
1129     
1130     
1131     %
1132     % Special setup for keys that are declared by the above libraries, but
1133     % that have a special meaning on the display layer.
1134     %
1135     
1136     \pgfkeys{/graph drawing/nodes behind edges/.append code=\csname pgf@gd@nodes@behind@edges#1\endcsname}
1137     \pgfkeys{/graph drawing/nodes behind edges/.default=true}

Question: How to solve that (applying the same patch as in LaTeX does not help)?

TeXnician
  • 33,589

0 Answers0