30 Oct
2008
30 Oct
'08
10:32 p.m.
On Thu, 30 Oct 2008, Khaled Hosny wrote:
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}
that's just a \hbox{} within the page's \vbox{}, it's not starting a paragraph. A \hbox{} at the beginning of a new paragraph you would get e. g., by \leavevmode\hbox{Seen}.
Hello \hbox{seen} \bye
Regards, Hartmut