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

Marcel Krüger tex at 2krueger.de
Fri Nov 16 13:54:06 CET 2018


 ---- On Wed, 14 Nov 2018 15:26:43 +0100 Hans Hagen <j.hagen at xs4all.nl> wrote ---- 
 > On 11/14/2018 2:42 PM, Marcel Krüger wrote: 
 >  
 > > Now `run_lua_ligkern_callback` always returns the tail parameter without change, 
 > > so I am pretty sure `tail` is never `null`. 
 >  
 > not true ... the callback can be any function and there doesn't have to  
 > be a tail returned .... if you want to recalculate, just make sure you  
 > return only head 

Are you sure? The actual callback which `run_lua_ligkern_callback` calls does not return
anything (or at least it's return values are ignored), so how would you influence the `run_lua_ligkern_callback` return value?

>  
 > \directlua{callback.register('ligaturing', 
 >    function(...) return (node.ligaturing(...)) end 
 > }ffi\bye 

This doesn't work on my system (neither with experimental nor with trunk).

 >  
 > so no fundamental changes will happen (if only because something that  
 > works better for you might fail or have side effects (functional or  
 > performance) for others) 

Actually returning the tail (optionally) would work better for me than the suggested
recalculating, but it does not seem to be implemented (or documented).

Anyway, if the current behavior is kept, IMO the documentation should be updated to reflect this.

Best regards
Marcel

 >  
 > 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 
 > ----------------------------------------------------------------- 
 > 




More information about the dev-luatex mailing list