Hi, I have problems using PGF graph drawing with ConTeXt. The problem is described on https://tex.stackexchange.com/questions/414102/ It all boils down to Lua trying to load wrong file. When require 'pgf.gd.control' is called, ConTeXt resolvers come into play and 'lua variable format' locates Control.lua -- note the uppercase letter here -- which cannot be loaded (on Linux) and 'require' fails:
sandbox > requiring: pgf.gd.control resolvers > libraries > locating, level '1', method 'already loaded', name 'pgf.gd.control' resolvers > libraries > locating, level '1', method 'preload table', name 'pgf.gd.control' resolvers > libraries > locating, level '1', method 'lua variable format', name 'pgf.gd.control' resolvers > libraries > lua format, checking 33 paths resolvers > libraries > lua format, identifying 'pgf/gd/control.lua' using format 'tex' resolvers > libraries > lua format, 'pgf/gd/control.lua' found on '/opt/texlive/2017/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/Control.lua' resolvers > libraries > locating, level '1', method 'lib variable format', name 'pgf.gd.control'
I suspect some part of the system (ConTeXt? kpsewhich? TeXLive?) messes up and the resolver instead of pgf/gd/control.lua hits pgf/gd/force/Control.lua. But I have plainly no experience in where to look... One more place, where I found some traces: in texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/trees/929f6dbc83f6d3b65 dab91f1efa4aacb.lua file I have (in ["content"]["files"])
["control.lua"]={ "tex/generic/pgf/graphdrawing/lua/pgf/gd", "tex/generic/pgf/graphdrawing/lua/pgf/gd/force" }
as well as (in ["content"]["remap"])
["control.lua"]="Control.lua"
Clearly not OK. My system is current TeXLive 2017. LuaTeX 1.0.4. ConTeXt 1.01. Ubuntu 14.04 and 16.04. Regards, Przemek
On 2/7/2018 11:51 PM, Przemek Wesolek wrote:
Hi,
I have problems using PGF graph drawing with ConTeXt. The problem is described on https://tex.stackexchange.com/questions/414102/
It all boils down to Lua trying to load wrong file. When
require 'pgf.gd.control'
is called, ConTeXt resolvers come into play and 'lua variable format' locates Control.lua -- note the uppercase letter here -- which cannot be loaded (on Linux) and 'require' fails:
having two files with the same name looks like an error in pgf to me Hans
sandbox > requiring: pgf.gd.control resolvers > libraries > locating, level '1', method 'already loaded', name 'pgf.gd.control' resolvers > libraries > locating, level '1', method 'preload table', name 'pgf.gd.control' resolvers > libraries > locating, level '1', method 'lua variable format', name 'pgf.gd.control' resolvers > libraries > lua format, checking 33 paths resolvers > libraries > lua format, identifying 'pgf/gd/control.lua' using format 'tex' resolvers > libraries > lua format, 'pgf/gd/control.lua' found on '/opt/texlive/2017/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/Control.lua' resolvers > libraries > locating, level '1', method 'lib variable format', name 'pgf.gd.control'
I suspect some part of the system (ConTeXt? kpsewhich? TeXLive?) messes up and the resolver instead of pgf/gd/control.lua hits pgf/gd/force/Control.lua. But I have plainly no experience in where to look...
One more place, where I found some traces: in texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/trees/929f6dbc83f6d3b65 dab91f1efa4aacb.lua file I have (in ["content"]["files"])
["control.lua"]={ "tex/generic/pgf/graphdrawing/lua/pgf/gd", "tex/generic/pgf/graphdrawing/lua/pgf/gd/force" }
as well as (in ["content"]["remap"])
["control.lua"]="Control.lua"
Clearly not OK. context ignores cases in filenames and in fact in tds there cannot be two files with the same name ... keep in mind that windows is case insensitive ... if there are files with the same name then they normally are in (sub)paths that are identified by some distinctive category (variable)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Przemek Wesolek