[luatex] Hyphen char vs discretionary (bug?)

Javier Bezos listas at tex-tipografia.com
Mon Apr 30 15:24:16 CEST 2018


 >    \automatichyphenmode


Well, I'm optimistc by nature and I thought this would fix my
problem. But it doesn't.

The change in the behaviour of luatex wrt hyphens breaks bidi in
babel.  So, I have a couple of more or less urgent questions
(I'm investigating, of course, but I'd like to fix it asap).

1) How can I see if there is a real char - in  pre_linebreak_filter,
to apply the Unicode rule for number-hyphen-number (so that 19-29
doesn't become 29-19 in R contexts).

2) If not possible, which is the best alternative? A possibility
is to read the 'replace' list in the disc node, but I wonder if
there is a simpler approach.

Javier

----------------------------
----------------------------



         With the following document:

         -------------------------
         \directlua{

         function test (head)
            texio.write_nl('====')
            texio.write_nl('')
            for item in node.traverse(head) do
              if item.id == node.id'glyph' then
                texio.write(unicode.utf8.char(item.char))
              else
                texio.write('[' .. item.id  .. ']')
              end
            end
            return head
         end

         callback.register("pre_linebreak_filter", test)
         }

         12-34

         \bye
         -------------------------

         TexLive 2017 (1.0.4) showed:

         [9][0]12-34[14]

         But with 2018 (1.07) I get:

         [9][0]12[7]34[14][12]

         In other words, the hyphen char has been replaced
         by a dicretrionary.

         Cheers
         Javier






More information about the luatex mailing list