[luatex] ligaturing callback in horizontal mode cannot replace tail

Paul Isambert zappathustra at free.fr
Tue May 14 13:08:52 CEST 2013

Vianney le Clément <vleclement at gmail.com> a écrit:
> Hi all,
> I want to replace three consecutive dots by an ellipsis throughout the
> whole document. The ligaturing callback seems like the right place to
> do this. It works fine in the general case, but fails sometimes when
> the ellipsis comes at the end of a paragraph.
> I have narrowed the problem down to the following problem. When trying
> to replace the tail node in the ligaturing callback, LuaTeX yields the
> following error.
>     ! This can't happen (linebreak_tail).
> This only seems to happen in horizontal mode. In restricted horizontal
> mode (in an \hbox), it works fine.
> At the end of the mail, you will find an example that replaces the
> last glyph by a new glyph "A". If the glyph to be replaced is not the
> tail node of the list or we are in restricted horizontal mode,
> everything is fine. But as soon as we want to replace the tail node in
> horizontal mode, the error message shows up.
> Am I overlooking something or is this a LuaTeX bug?

It is a bug, and it has already been reported:


More information about the luatex mailing list