Hello,
I am trying to compile luatex examples from http://luatex.bluwiki.com
. How could I make it work with ConTeXt? The following fails.
-----------------------------------------------------------------------------------------------------------------------------------
\directlua0{
local glyph = node.id('glyph')
local hlist = node.id('hlist')
local vlist = node.id('vlist')
function gothru(h,prof)
for t in node.traverse(h) do
texio.write_nl(string.rep("...",prof) .. 'NODE type=' ..
node.type(t.id) .. ' subtype=' .. t.subtype )
if t.id == hlist or t.id == vlist then
texio.write(' w=' .. t.width .. ' h=' .. t.height .. ' d=' ..
t.depth .. ' s=' .. t.shift )
gothru(t.list,prof+1)
end
if t.id == glyph then
texio.write(' font=' .. t.font .. ' char=' .. t.char .. '
width=' font.fonts[t.font].characters[t.char]['width'])
end
end
end
callback.register('pre_linebreak_filter',
function(h)
gothru(h,0)
return true
end
)
}
\starttext
bla bla bla bla
\stoptext
-------------------------------------------------------------------------------------------------------
best
Piotr
--
http://okle.pl
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________