[Dev-luatex] lastnodetype, again

Hans Hagen j.hagen at xs4all.nl
Thu Aug 19 18:30:52 CEST 2021


On 8/19/2021 5:00 PM, Robert wrote:
> Hans has replied off-list, saying that this is basically expected
> behaviour and that checking for ligatures by means of \lastnodetype is
> inherently unreliable in luatex. In that case I would suggest to change
> the wording in the manual, which quite unequivocally claims the opposite:
> 
> | The \lastnodetype primitive is 𝜀-TEX compliant. The valid range is
> | still [−1, 15] and glyph nodes (formerly known as char nodes) have
> | number 0 while ligature nodes are mapped to 7. That way macro packages
> | can use the same symbolic names as in traditional 𝜀-TEX.
> (p.123)

this is correct .. it doesn't say that the nodelist is the same and in 
fact luatex does report the right node in etex speak .. in the case of 
luatex there is no ligature node because the nodelist isn't processed 
and even then it could as well be a disc node (and if it is aligature 
you cannot assume that the font handler used sets the ligature subtype 
either)

just don't assume that luatex, pdftex, xetex produce the same node lists

and don't assume that f + i is a ligature in each font (or script / 
language) either because it can as wel be some kerning between f (either 
or not substituted) and i (either or not substituted)

in luatex when you want to mess around at that level you have to use a 
callback (or preprocess the input)

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