[Dev-luatex] Recalculating tail of the list in ligaturing callback

Esger Renkema esgerrenkema at gmail.com
Wed Nov 14 12:47:28 CET 2018


Dear list,

Running the following one-liner:

\directlua{callback.register('ligaturing', node.ligaturing)}ffi\bye

results in:

-------------------------------------------
This is LuaTeX, Version 1.09.0 (TeX Live 2019/dev/Debian)
 restricted system commands enabled.
**\directlua{callback.register('ligaturing', node.ligaturing)}ffi\bye
! error:  (linebreak): invalid list tail, probably missing glue
!  ==> Fatal error occurred, no output PDF file produced!
-------------------------------------------

The problem seems to be that, when restoring the original ‘tail of the list’ 
after applying the ligaturing callback (in this case consisting of the 
parfillskip glue), it is appended to the tail of the /original/ 
list-to-be-ligatured. The latter, of course, has been lost if the paragraph 
ends in a ligature.

According to the manual, the first node of the list passed to the 
callback is guaranteed not to be a glyph_node. Should the same not hold 
for the last one, too? The manual states that it ‘normally’ is a glue, 
but that is clearly not the case here.

Best, Esger



More information about the dev-luatex mailing list