Problem \input a file (lastest minimals)
Hello, I have a problem to \input a file [in the same directory as the main file is]. This problem started appearing with the latest minimals (updated today evening) and there was no such a problem before. Try this: --- main.mkiv \enableregime[cp1250] \input{_inc.mkiv} \starttext AAA \stoptext --- --- _inc.mkiv INC.MKIV --- And the the compilation error: --- D:\Lukas\ConTeXt\Samples\t-Inc>set PATH=c:\ConTeXt\tex\texmf-mswin\bin;C:\WINDOWS\System32\Wbem;C:\WINDOWS/system32;C:\WINDOWS;D:/Programs/Tcl/bin;C:/gs/gs8.54/bin;C:/Program Files/Common Files/Autodesk Shared/;c:/Program Files/Microsoft SQL Server/90/Tool s/binn/;C:\Program Files\Lua\5.1;C:\Program Files\Lua\5.1\clibs;C:\adabas\bin;C:\adabas\pgm;D:\Lukas\Bat;D:\Programs.Con;C:\Program Files\Gtk+\bin;;C:\PROGRA~1\COMMON~1\AUTODE~1 D:\Lukas\ConTeXt\Samples\t-Inc>context.exe main.mkiv MTXrun | run 1: luatex --fmt="c:/ConTeXt/tex/texmf-cache/luatex-cache/context/f53042fa2e1c106bc7e3383ec8c3a00c/formats/cont-en" --lua="c:/ConTeXt/tex/texmf-cache/luatex-cache/context/f53042fa2e1c106bc7e3383ec8c3a00c/formats/cont-en.lui" --backend=pdf "./ma in.mkiv"This is LuaTeX, Version beta-0.64.0-2010111223 (rev 3956) \write18 enabled. (main.mkiv ConTeXt ver: 2010.11.27 14:27 MKIV fmt: 2010.11.28 int: english/english system : cont-new loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil.mkiv loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-fil.mkiv loading : ConTeXt File Synonyms ) system : cont-sys.rme loaded (c:/ConTeXt/tex/texmf-context/tex/context/user/cont-sys.rme (c:/ConTeXt/tex/texmf-context/tex/context/base/type-def.mkiv) (c:/ConTeXt/tex/texmf-context/tex/context/base/type-lua.mkiv) (c:/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv) (c:/ConTeX t/tex/texmf-context/tex/context/base/type-otf.mkiv)) system : cont-err loaded (c:/ConTeXt/tex/texmf-context/tex/context/base/cont-err.tex systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead ) system : main.top loaded (main.top){c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{c:/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} bodyfont : 12pt rm is loaded fonts : preloading latin modern fonts (first stage) language : language en is active ! LuaTeX error ...TeXt/tex/texmf-context/tex/context/base/regi-ini.lua:100: attempt to call global 'translate' (a nil value). <insert> l.3 \input{_inc.mkiv} ? ! Emergenc^Cy stop. < insD:\Lukas\ConTeXt\Samples\t-Inc>ert> l.3 \input{_inc.mkiv} ! ==> Fatal error occurred, no output PDF file produced! D:\Lukas\ConTeXt\Samples\t-Inc> --- Bug anywhere? Friendly regards, Lukas
Am 28.11.2010 um 18:52 schrieb Procházka Lukáš:
Hello,
I have a problem to \input a file [in the same directory as the main file is].
This problem started appearing with the latest minimals (updated today evening) and there was no such a problem before.
regi-ini.lua function regimes.process(s) - return translate(s,regimes.currentregime) + return regimes.translate(s,regimes.currentregime) end The \input command in ConTeXt has no braces, it’s \input <file> or for files with spaces \input "<file with spaces>" Wolfgang
On 28-11-2010 7:08, Wolfgang Schuster wrote:
Am 28.11.2010 um 18:52 schrieb Procházka Lukáš:
Hello,
I have a problem to \input a file [in the same directory as the main file is].
This problem started appearing with the latest minimals (updated today evening) and there was no such a problem before.
regi-ini.lua
function regimes.process(s) - return translate(s,regimes.currentregime) + return regimes.translate(s,regimes.currentregime) end
fixed
The \input command in ConTeXt has no braces, it’s
\input<file>
or for files with spaces
\input "<file with spaces>"
or \input {<file with spaces>} as luatex supports that natively ----------------------------------------------------------------- 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 -----------------------------------------------------------------
I patched the 'regi-ini.lua' by your purpose:
---
function regimes.process(s)
--return translate(s,regimes.currentregime)
print("111", regimes)
print("222", regimes.translate)
return regimes.translate(s,regimes.currentregime)
end
---
But I'm still getting the same error message! I still have "! LuaTeX error ...TeXt/tex/texmf-context/tex/context/base/regi-ini.lua:100: attempt to call global 'translate' (a nil value).", although I added two "print(...)" before "return regimes...".
The line in the error message is the same: 100 - although the code is shifted three lines bellow.
And - no "111" or "222" appears in the scope during the error message.
- Isn't it weird?
Is there something more I should do? E.g. to delete a Lua cache manually (what dirs/files exactly in this case?).
I also run the "mtxrun --generate" but without success.
You can check the regi-ini.lua attached - it is originally placed in "c:\ConTeXt\tex\texmf-context\tex\context\base\regi-ini.lua".
Lukas
On Sun, 28 Nov 2010 19:08:56 +0100, Wolfgang Schuster
Am 28.11.2010 um 18:52 schrieb Procházka Lukáš:
Hello,
I have a problem to \input a file [in the same directory as the main file is].
This problem started appearing with the latest minimals (updated today evening) and there was no such a problem before.
regi-ini.lua
function regimes.process(s) - return translate(s,regimes.currentregime) + return regimes.translate(s,regimes.currentregime) end
The \input command in ConTeXt has no braces, it’s
\input <file>
or for files with spaces
\input "<file with spaces>"
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
... I had to delete the lua-cache manually, the "c:\ConTeXt\tex\texmf-cache\luatex-cache\context\f53042fa2e1c106bc7e3383ec8c3a00c\" directory in my case.
Ctx rebuilt its content and now \input works fine.
Lukas
On Sun, 28 Nov 2010 23:44:17 +0100, Procházka Lukáš
But I'm still getting the same error message! I still have "! LuaTeX error ...TeXt/tex/texmf-context/tex/context/base/regi-ini.lua:100: attempt to call global 'translate' (a nil value).", although I added two "print(...)" before "return regimes...".
On Sun, 28 Nov 2010 19:08:56 +0100, Wolfgang Schuster
wrote: regi-ini.lua
function regimes.process(s) - return translate(s,regimes.currentregime) + return regimes.translate(s,regimes.currentregime) end
participants (4)
-
Hans Hagen
-
Procházka Lukáš
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Wolfgang Schuster