Re: [NTG-context] Lua in Ctx: require() fails?
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 resolverslibraries ! locating whatever as whatever.lua using formats texlua resolverslibraries ! checking for whatever.lua' using format tex resolverslibraries ! lib whatever.lua located on whatever.lua whatever resolverslibraries ! locating something as something.lua using formats texlua resolverslibraries ! checking for something.lua' using format tex resolverslibraries ! checking for something.lua' using format lua resolverslibraries ! 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On 24-10-2012 11:21, Procházka Lukáš Ing. - Pontex s. r. o. wrote: 1) drive letter is upper-case in my case, lower case in Hans' one, should be ok 2) I'm using backslashes '\' in path description, Hans uses '/', should work out ok too, windows internally accepts both but in the end context normalizes to / (i always use / anyway as that works on all platforma) 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. 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': indeed, as LUAINPUTS is a path specification cf web2c/tds 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. yes, quite some some cleanup happens deep down Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
Hello, my trick with LUAINPUTS system variable stopped working after the today's Ctx update. So I'm trying again to solve the problem that \startluacode require LPr-U \stopluacode doesn't load the file at d:/Lukas/Lua/LPr-U.lua. On Mon, 15 Oct 2012 20:29:53 +0200, Hans Hagen pra...@wxs.nl wrote: On 8-10-2012 15:57, Procházka Lukáš Ing. - Pontex s. r. o. wrote: The intention is Ctx to find and load its original texmfcnf.lua and then to load my texmfcnf.lua which would modify only some elements (namely: the LUAINPUTS member). texmf-local\web2c I'd like to keep factory texmfcnf.lua settings as much as possible. Hans Following Hans' advice, I created d:/texmf-local/web2c/contextcnf.lua with the following content: return { LUAINPUTS = d:/Lukas/Lua/, } but I'm still getting error with require. What other steps do I have to do to make it work? TIA. 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 contextcnf.lua Description: Binary data t.mkiv Description: Binary data ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On 23-10-2012 16:14, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, my trick with LUAINPUTS system variable stopped working after the today's Ctx update. afaik nothing changed; best run with \enabletrackers[resolvers.libraries] Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On Tue, 23 Oct 2012 16:13:31 +0200, Hans Hagen pra...@wxs.nl wrote: On 23-10-2012 16:14, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, my trick with LUAINPUTS system variable stopped working after the today's Ctx update. afaik nothing changed; best run with \enabletrackers[resolvers.libraries] Hans I attached the log (and all files). Here's the output (trying to require Test.lua now, which is in d:\Lukas\Lua\Test.lua): C:\Lukas\Jobs\HubI-ISK.DSP\SO_210\Statics.Txt.mkiv C:\Lukas\Jobs\HubI-ISK.DSP\SO_210\Statics.Txset PATH=c:\ConTeXt\tex\texmf-mswin\bin;C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\PROGRA~1\COMMON~1\AUTODE~1\GIS\IMPORT~1\1.0;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Lua\5.1;C:\Program Files\Lua\5.1\clibs;C:\Lukas\..\Programs.Con\Ponton;C:\Program Files\Pandoc\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Tes seract-OCR;C:\Lukas/Bat;C:\Lukas/../Programs.Con;;C:\PROGRA~1\COMMON~1\AUTODE~1 C:\Lukas\Jobs\HubI-ISK.DSP\SO_210\Statics.Txset LUAINPUTS=;d:/Lukas/Lua/?.lua mtx-context | run 1: luatex --fmt=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en --interaction=nonstopmode --jobname=t --lua=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui --no-parse-first-line --c:FILE=t.mkiv --c:currentrun=1 --c:fulljobname=C:/Lukas/Jobs/HubI-ISK.DSP/SO_210/Statics.Tx/t.mkiv --c:halt-on-error --c:input=C:/Lukas/Jobs/HubI-ISK.DSP/SO_210/Statics.Tx/t.mkiv --c:kindofrun=1 --c:mode=t --c:nonstopmode cont-yes.mkiv This is LuaTeX, Version beta-0.70.2-2012101522 (TeX Live 2012/W32TeX) \write18 enabled. (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2012.10.22 23:51 MKIV fmt: 2012.10.23 int: english/english system cont-new.mkiv loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system files jobname: t, input: C:/Lukas/Jobs/HubI-ISK.DSP/SO_210/Statics.Tx/t.mkiv, result: t fontslatin modern fonts are not preloaded languageslanguage en is active (C:/Lukas/Jobs/HubI-ISK.DSP/SO_210/Statics.Tx/t.mkiv resolverslibraries ! locating Test as Test.lua using formats texlua resolverslibraries ! checking for Test.lua' using format tex resolverslibraries ! checking for Test.lua' using format lua resolverslibraries ! locating Test as Test.dll using formats lib resolverslibraries ! checking for Test.dll' using format lib resolverslibraries ! locating Test as Test.lua on lua paths resolverslibraries ! checking for Test.lua using lua path . resolverslibraries ! checking for Test.lua using lua path C:/Documents and Settings/LPR/texmf/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-project/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-fonts/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-local/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-modules/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-context/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-mswin/tex/context/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf/tex/context/ resolverslibraries ! checking for Test.lua using lua path C:/Documents and Settings/LPR/texmf/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-project/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-fonts/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-local/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-modules/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-context/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-mswin/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf/tex/plain/base/ resolverslibraries ! checking for Test.lua using lua path C:/Documents and Settings/LPR/texmf/tex/generic/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-project/tex/generic/ resolverslibraries ! checking for Test.lua using lua path c:/ConTeXt/tex/texmf-fonts/tex/generic/ resolverslibraries
Re: [NTG-context] Lua in Ctx: require() fails?
On 23-10-2012 16:37, Procházka Lukáš Ing. - Pontex s. r. o. wrote: resolverslibraries ! checking for Test.lua using lua path d:/Lukas/Lua/?.lua in the output log but d:\Lukas\Lua\Test.lua is not found here (?!). So - ? no clue ... maybe an error in test.lua Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On Tue, 23 Oct 2012 16:53:01 +0200, Hans Hagen pra...@wxs.nl wrote: On 23-10-2012 16:37, Procházka Lukáš Ing. - Pontex s. r. o. wrote: resolverslibraries ! checking for Test.lua using lua path d:/Lukas/Lua/?.lua in the output log but d:\Lukas\Lua\Test.lua is not found here (?!). So - ? no clue ... maybe an error in test.lua ... Have you seen the content of Test.lua? It just prints some text... When I downgraded Ctx to the previous installed version, it works... 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On 23-10-2012 16:58, Procházka Lukáš Ing. - Pontex s. r. o. wrote: On Tue, 23 Oct 2012 16:53:01 +0200, Hans Hagen pra...@wxs.nl wrote: On 23-10-2012 16:37, Procházka Lukáš Ing. - Pontex s. r. o. wrote: resolverslibraries ! checking for Test.lua using lua path d:/Lukas/Lua/?.lua in the output log but d:\Lukas\Lua\Test.lua is not found here (?!). So - ? no clue ... maybe an error in test.lua Have you seen the content of Test.lua? It just prints some text... When I downgraded Ctx to the previous installed version, it works... 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 resolverslibraries ! locating whatever as whatever.lua using formats texlua resolverslibraries ! checking for whatever.lua' using format tex resolverslibraries ! lib whatever.lua located on whatever.lua whatever resolverslibraries ! locating something as something.lua using formats texlua resolverslibraries ! checking for something.lua' using format tex resolverslibraries ! checking for something.lua' using format lua resolverslibraries ! lib something.lua located on e:/tmp/whatever/something.lua something so it must be something with your path spec - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails? (solved)
On 8-10-2012 15:57, Procházka Lukáš Ing. - Pontex s. r. o. wrote: The intention is Ctx to find and load its original texmfcnf.lua and then to load my texmfcnf.lua which would modify only some elements (namely: the LUAINPUTS member). texmf-local\web2c I'd like to keep factory texmfcnf.lua settings as much as possible. - When I look into c:\ConTeXt\tex\texmf\web2c\texmfcnf.lua, I see many paths: - beginning with !!, - ending with //. What does mean this convention? this controls the filedatabase building and recurssion into subtrees - I found 2 config files: c:\ConTeXt\tex\texmf\web2c\texmf.cnf c:\ConTeXt\tex\texmf\web2c\texmfcnf.lua It seems that the latter is a Luaed form of the former. a bit more than that as we can have directives and such (and even have path tables) How are used both files? only the lua file is used Is the latter built from the former or vice versa? no, for texlive the latter is adapted a bit (few lines) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails? (solved)
On Fri, 05 Oct 2012 10:57:15 +0200, Hans Hagen pra...@wxs.nl wrote: On 5-10-2012 08:13, Procházka Lukáš Ing. - Pontex s. r. o. wrote: On Thu, 04 Oct 2012 13:32:42 +0200, Hans Hagen pra...@wxs.nl wrote: btw, you should adapt LUAINPUTS and not some other environment variable .. after all, luatex is not native lua so you need to avoid conflicts in case you hav einstalled both I just added SET LUAINPUTS=%LUA_PATH% to the batch I'm using to launch context.exe and it works. You can best set that in a local texmfcnf.lua file. OK... I'm not familiar with (Lua)TeX deeply enough to know how exactly to do it, so a couple a questions: - Where to put (my personal) texmfcnf.lua? The intention is Ctx to find and load its original texmfcnf.lua and then to load my texmfcnf.lua which would modify only some elements (namely: the LUAINPUTS member). I'd like to keep factory texmfcnf.lua settings as much as possible. - When I look into c:\ConTeXt\tex\texmf\web2c\texmfcnf.lua, I see many paths: - beginning with !!, - ending with //. What does mean this convention? - I found 2 config files: c:\ConTeXt\tex\texmf\web2c\texmf.cnf c:\ConTeXt\tex\texmf\web2c\texmfcnf.lua It seems that the latter is a Luaed form of the former. How are used both files? Is the latter built from the former or vice versa? Or the former is no more used and I'm having it among Ctx files by chance? (Or a link to a place where to learn more would be appreciated.) TIA. Best regards, Lukas In that case you use the original definition of luainputs and append lua_path to it. That way script in the context tree can also be found. Hans -- 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 ___
Re: [NTG-context] Lua in Ctx: require() fails? (solved)
On Thu, 04 Oct 2012 13:32:42 +0200, Hans Hagen pra...@wxs.nl wrote: btw, you should adapt LUAINPUTS and not some other environment variable .. after all, luatex is not native lua so you need to avoid conflicts in case you hav einstalled both ... I just added SET LUAINPUTS=%LUA_PATH% to the batch I'm using to launch context.exe and it works. Thanks for the answers. 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 ___
[NTG-context] Lua in Ctx: require() fails?
Hello, I just renewed ConTeXt and new error when using require appears (it worked OK until the update): t-Req.mkiv \startluacode require Test-U \stopluacode \starttext A \stoptext mtx-context | run 1: luatex --fmt=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en --interaction=nonstopmode --jobname=t-Req --lua=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui --no-parse-first-line --c:FILE=t-Req.mkiv --c:currentrun=1 --c:fulljobname=C:/Lukas/ConTeXt/Test/t-Req.mkiv --c:halt-on-error --c:input=C:/Lukas/ConTeXt/Test/t-Req.mkiv --c:kindofrun=1 --c:mode=t-Req --c:nonstopm ode cont-yes.mkiv This is LuaTeX, Version beta-0.70.2-2012092822 (TeX Live 2012/W32TeX) \write18 enabled. (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2012.10.02 22:03 MKIV fmt: 2012.10.4 int: english/english system cont-new.mkiv loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) fontslatin modern fonts are not preloaded languageslanguage en is active (C:/Lukas/ConTeXt/Test/t-Req.mkiv ! LuaTeX error main ctx instance:2: module 'Test-U' not found: no field package.preload['Test-U'] no file 'Test-U.dll' no file 'c:\Program Files\Lua\5.1\clibs\Test-U.dll' no file 'C:\Lukas\Lua\Test-U.dll' stack traceback: [C]: in function 'require' main ctx instance:2: in main chunk. system tex error on line 3 in file C:/Lukas/ConTeXt/Test/t-Req.mkiv: LuaTeX error ... 1 \startluacode 2 require Test-U 3 \stopluacode 4 5 \starttext 6 A 7 \stoptext 8 } require Test-U.erocount { \luat_start_lua_code_indeed ...ua \zerocount {#1}} l.3 \stopluacode ... Test-U.lua print(This is Test-U.) The Test-U.lua is located at: c:\Lukas\Lua\Test-U.lua And (some) environment variables are: C:\Lukas\ConTeXt\Testset lua LUA_CPATH=?.dll;c:\Program Files\Lua\5.1\clibs\?.dll;C:\Lukas\Lua\?.dll LUA_DEV=C:\Program Files\Lua\5.1 LUA_PATH=?.lua;C:\Program Files\Lua\5.1\lua\?.luac;C:\Lukas\Lua\?.lua;C:\Lukas\Common\Statics\?.lua;C:\Lukas\Lua\3rdParty\?.lua;C:\Lukas\Lua\3rdParty\stdlib\modules\?.lua - So the Test-U.lua should be found. So what's wrong? What's been renewed in this matter? How to require a Lua file (module) correctly? Personally - I've been using require file-name so far at many places and there was no problem with it. TIA. 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 Test-U.lua Description: Binary data t-Req.log Description: Binary data t-Req.mkiv Description: Binary data ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On 4-10-2012 12:09, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Personally - I've been using require file-name so far at many places and there was no problem with it. try with \enabletrackers[resolvers.libraries] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On 4-10-2012 13:27, Hans Hagen wrote: On 4-10-2012 12:09, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Personally - I've been using require file-name so far at many places and there was no problem with it. try with \enabletrackers[resolvers.libraries] btw, you should adapt LUAINPUTS and not some other environment variable .. after all, luatex is not native lua so you need to avoid conflicts in case you hav einstalled both - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Lua in Ctx: require() fails?
On Thu, 04 Oct 2012 13:27:40 +0200, Hans Hagen pra...@wxs.nl wrote: On 4-10-2012 12:09, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Personally - I've been using require file-name so far at many places and there was no problem with it. try with \enabletrackers[resolvers.libraries] - OK - \enabletrackers[resolvers.libraries] \startluacode require Test-U \stopluacode \starttext A \stoptext - I'm getting: C:\Lukas\ConTeXt\Testt-Req.mkiv C:\Lukas\ConTeXt\Testset PATH=c:\ConTeXt\tex\texmf-mswin\bin;C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Autodesk Shared\;C:\PROGRA~1\COMMON~1\AUTODE~1\GIS\IMPORT~1\1.0;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Lua\5.1;C:\Program Files\Lua\5.1\clibs;C:\Lukas\..\Programs.Con\Ponton;C:\Program Files\Pandoc\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Tesseract-OCR;C:\Lukas/Bat ;C:\Lukas/../Programs.Con;;C:\PROGRA~1\COMMON~1\AUTODE~1 C:\Lukas\ConTeXt\Testrem The lowercase c: if fatally necesssary! C:\Lukas\ConTeXt\Testset TEXMFHOME=;C:\Lukas\ConTeXt\Fonts mtx-context | run 1: luatex --fmt=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en --interaction=nonstopmode --jobname=t-Req --lua=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui --no-parse-first-line --c:FILE=t-Req.mkiv --c:currentrun=1 --c:fulljobname=C:/Lukas/ConTeXt/Test/t-Req.mkiv --c:halt-on-error --c:input=C:/Lukas/ConTeXt/Test/t-Req.mkiv --c:kindofrun=1 --c:mode=t-Req --c:nonstopm ode cont-yes.mkiv This is LuaTeX, Version beta-0.70.2-2012092822 (TeX Live 2012/W32TeX) \write18 enabled. (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2012.10.02 22:03 MKIV fmt: 2012.10.4 int: english/english system cont-new.mkiv loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) fontslatin modern fonts are not preloaded languageslanguage en is active (C:/Lukas/ConTeXt/Test/t-Req.mkiv resolverslibraries ! locating Test-U as Test-U.lua using formats texlua resolverslibraries ! checking for Test-U.lua' using format tex resolverslibraries ! checking for Test-U.lua' using format lua resolverslibraries ! locating Test-U as Test-U.dll using formats lib resolverslibraries ! checking for Test-U.dll' using format lib resolverslibraries ! locating Test-U as Test-U.lua on lua paths resolverslibraries ! checking for Test-U.lua using lua path . resolverslibraries ! checking for Test-U.lua using lua path C:/Lukas/ConTeXt/Fonts resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-project resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-fonts resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-local resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-modules resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-context resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-mswin resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf/tex/context/ resolverslibraries ! checking for Test-U.lua using lua path /tex/plain/base/ resolverslibraries ! checking for Test-U.lua using lua path /tex/generic/ resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf/scripts/context/lua/ resolverslibraries ! locating Test-U as Test-U.lua on lua paths resolverslibraries ! checking for Test-U.lua using lua path . resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-mswin/bin/lib/context/lua/ resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-mswin/bin/lib/luatex/lua/ resolverslibraries ! checking for Test-U.lua using lua path c:/ConTeXt/tex/texmf-mswin/bin/lib/lua/ resolverslibraries ! locating Test-U as Test-U.dll on lib paths resolverslibraries ! checking for Test-U.dll using lib path . resolverslibraries ! checking for Test-U.dll using lib path c:/ConTeXt/tex/texmf-mswin/bin/lib/context/lua/ resolverslibraries ! checking for Test-U.dll using lib path c:/ConTeXt/tex/texmf-mswin/bin/lib/luatex/lua/ resolverslibraries ! checking for Test-U.dll using lib path c:/ConTeXt/tex/texmf-mswin/bin/lib/lua/ resolverslibraries ! locating Test-U using normal loader resolverslibraries ? unable to locate library Test-U ! LuaTeX error main ctx instance:2: module 'Test-U' not found: no field