Hello,

When I make

e:\tmp\whatever.lua (current path)
e:\tmp\whatever\something.lua

And run

\starttext

     \enabletrackers[resolvers.libraries]

     \startluacode
         print("LUAINPUTS",os.getenv("LUAINPUTS"))

         require("whatever") ;
         require("something") ;
     \stopluacode

\stoptext

i get

LUAINPUTS       e:/tmp/whatever
resolvers       > libraries > ! locating "whatever" as "whatever.lua"
using formats "texlua"
resolvers       > libraries > ! checking for "whatever.lua"' using
format "tex"
resolvers       > libraries > ! lib "whatever.lua" located on "whatever.lua"
whatever
resolvers       > libraries > ! locating "something" as "something.lua"
using formats "texlua"
resolvers       > libraries > ! checking for "something.lua"' using
format "tex"
resolvers       > libraries > ! checking for "something.lua"' using
format "lua"
resolvers       > libraries > ! lib "something.lua" located on
"e:/tmp/whatever/something.lua"
something

so it must be something with your path spec

it seems that I solved the problem finally.

Normally, the LUA_PATH contains members like "D:\Lukas\Lua\?.lua", whilst LUAINPUTS has 
form of "e:/tmp/whatever", so there are three differences:

1) drive letter is upper-case in my case, lower case in Hans' one,
2) I'm using backslashes '\' in path description, Hans uses '/',
3) my LUAINPUTS path contains "?.lua" and "?.clua" strings, which are typical for pure 
Lua scripts with LUA_PATH (and "?.dll" with LUA_CPATH), whilst Hans' LUAINPUTS doesn't contain 
these strings.

So I started to check influence of these three differences...

It seems that #3 is fatal - "?.[c]lua" must not be a part of the path; although 
it's been working so far.

So - if anyone interested - I modified slightly my Ctx-initializing batch 
'_InitCtx.bat':

----
set PATH=c:\ConTeXt\tex\texmf-mswin\bin;%PATH%
:: The lowercase "c:" if fatally necesssary!

set LUAINPUTS=%LUAINPUTS%;%LUA_PATH%
:: >= 10/2012

set LUAINPUTS=%LUAINPUTS:?.luac=%
set LUAINPUTS=%LUAINPUTS:?.lua=%
:: >= 24.10.2012
----

It seems also that Ctx accepts both "a/b/c" and "a/b/c/" forms of LUAINPUTS 
members, i.e. with or without the trailing (back)slash.

Thanks, Hans, for your detailed testing - the signal "LUAINPUTS 
e:/tmp/whatever" directed me to the solution.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.      [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to