[Dev-luatex] Traversing node list
Khaled Hosny
khaledhosny at eglug.org
Thu Oct 30 22:14:53 CET 2008
I'm wondering why, in the following code, the first \hbox{} is not seen
by the lua function while the second one is seen i.e. \hbox{} at
paragraph beginning isn't seen.
\directlua0{
local function traverse(h)
for n in node.traverse (h)
do texio.write_nl('node id='..node.type(n.id))
if n.id == node.id('hlist') then
traverse(n.list)
end
end
end
callback.register('pre_linebreak_filter',
function(h)
traverse(h)
return true
end
)
}
\hbox{Not seen}
Hello \hbox{seen}
\bye
Regards,
--
Khaled Hosny
Arabic localizer and member of Arabeyes.org team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: box.tex
Type: text/x-tex
Size: 337 bytes
Desc: not available
Url : http://www.ntg.nl/mailman/private/dev-luatex/attachments/20081030/e9d68ccb/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://www.ntg.nl/mailman/private/dev-luatex/attachments/20081030/e9d68ccb/attachment-0001.bin
More information about the dev-luatex
mailing list