On 11/14/2018 12:47 PM, Esger Renkema wrote:
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.
the user of a callback is responsible for returning the right result
you can locate the for your case proper end node and pass that one as
second argument
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.
contextual ligature building can be influences by glue nodes (i.e.
spaces) so the whole list gets passed
we're not going to add overhead for checking the result
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
_______________________________________________
dev-luatex mailing list
dev-luatex@ntg.nl
https://mailman.ntg.nl/mailman/listinfo/dev-luatex