A question about the node library in luatex
I am trying a few tests with luatex. 1. Made a format file "luaetex.fmt" by "luatex --ini etex.ini" and a lua file "luaetex.lua" containing just one line "node.types()" 2. Test file "test.tex" is as follows: \directlua0{node.types()} \bye 3. Run "luatex --fmt=luaetex.fmt test". Then there is no problem. 4. Instead, "luatex --lua=luaetex.lua --fmt=luaetex.fmt test" causes an error. Why don't we use the node library in the lua file "luaetex.lua"? Thanks in advance, ChoF.
Jin-Hwan Cho wrote:
I am trying a few tests with luatex.
1. Made a format file "luaetex.fmt" by "luatex --ini etex.ini" and a lua file "luaetex.lua" containing just one line "node.types()"
that's rather useless lua make that for k, v in ipairs(nodes.types()) do print(k,v) end or so; also keep in mind that some libraries are initialized and available a bit later (after all, there is no need to initialize nodes when just processing lua code)
2. Test file "test.tex" is as follows:
\directlua0{node.types()} \bye
just a function
3. Run "luatex --fmt=luaetex.fmt test". Then there is no problem.
4. Instead, "luatex --lua=luaetex.lua --fmt=luaetex.fmt test" causes an error.
what error
Why don't we use the node library in the lua file "luaetex.lua"?
? hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Why don't we use the node library in the lua file "luaetex.lua"?
?
From the manual: Commandline processing happens very early on. So early, in fact, that none of TeX's initializations have taken place yet. For that reason, the tables that deal with typesetting, like tex, token, node and pdf, are off-limits during the execution of the startup file Best wishes, Taco
On May 26, 2008, at 7:34 PM, Taco Hoekwater wrote:
Why don't we use the node library in the lua file "luaetex.lua"?
?
From the manual:
Commandline processing happens very early on. So early, in fact, that none of TeX's initializations have taken place yet. For that reason, the tables that deal with typesetting, like tex, token, node and pdf, are off-limits during the execution of the startup file
Thanks a lot. Actually I wanted to load "font-otf.lua" in the file "luaetex.lua", but there were bunch of "node" in that file. I must change my mind. Best regards, ChoF.
participants (3)
-
Hans Hagen
-
Jin-Hwan Cho
-
Taco Hoekwater