[luatex] A possible bug

Javier Bezos listas at tex-tipografia.com
Thu Apr 4 17:29:19 CEST 2019

Maybe it has been already fixed, but I can't install 1.10
right now, so first a little favour. What do you get with
the following document (plain luatex):


function test (head, g)
   texio.write_nl('==== ' .. g)
   for item in node.traverse(head) do
     if item.id == node.id'glyph' then
       texio.write('{' .. item.char .. '}')
     elseif item.id == node.id'dir' then
       texio.write('<' .. item.dir .. '>')
     elseif item.id == node.id'glue' then
       texio.write(' ')
       texio.write('[' .. item.id .. ':' .. (item.subtype or '?') .. ']')
   return head

% callback.register("pre_linebreak_filter", test)
callback.register("hpack_filter", test)

ABC \hbox{abc \textdir TRT fgh} DEF

\textdir TLT

ABC \hbox{abc \textdir TRT fgh} DEF


With 1.07 the log shows:

==== hbox
{97}{98}[13:0]{99} <+TRT>{102}{103}{104}
==== hbox
{97}{98}[13:0]{99} <-TLT><+TRT>{102}{103}{104}

Note the extra node with a closing dir after setting
explicitly the global \textdir to TLT (which is the
default dir). The stuff after this node is discarded.

Does 1.10 give the same result?


More information about the luatex mailing list