[luatex] luatex Digest, Vol 71, Issue 15
mico.loretan at mac.com
Sun Nov 23 15:22:45 CET 2014
Regarding selnolig's alleged interference with LuaTeX's hyphenation algorithm: Please post an MWE to show how you use the package. (E.g., did you set the package's "english" option?) The package provides no rules for suppressing "tt" ligatures, and it shouldn't be suppressing the "fl" ligature in "butterflies" either. (In short, selnolig shouldn't operate on the word "butterflies" at all, unless you've privided additional ligature suppression rules via \nolig instructions.) Without having further information, I'm not sure it's right to blame selnolig for a failure to find the hyphenation point between the two "t"s in butterflies.
(Am currently in Hong Kong airport, waiting for my flight to London. Probably won't be able to read, let alone respond to, email messages for the next 18 to 24 hours.)
Sent from my iPhone.
> On Nov 23, 2014, at 19:00, luatex-request at tug.org wrote:
> Send luatex mailing list submissions to
> luatex at tug.org
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> luatex-request at tug.org
> You can reach the person managing the list at
> luatex-owner at tug.org
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of luatex digest..."
> Today's Topics:
> 1. Re: What are user-defined whatsit nodes? (Stephan Hennig)
> Message: 1
> Date: Sat, 22 Nov 2014 23:25:31 +0100
> From: Stephan Hennig <sh-list at posteo.net>
> To: "LuaTeX discussion." <luatex at tug.org>
> Subject: Re: [luatex] What are user-defined whatsit nodes?
> Message-ID: <54710D5B.5030808 at posteo.net>
> Content-Type: text/plain; charset="us-ascii"
>> Am 21.11.2014 um 19:10 schrieb luigi scarso:
>>> On Fri, Nov 21, 2014 at 6:31 PM, Stephan Hennig <sh-list at posteo.net> wrote:
>>> To put it differently, is user-defined whatsits inhibiting ligatures a
>>> bug or intentional?
>> anything non-glyph or non-disc will inhibit ligatures building
> OK, thanks for the clarification!
> These (side-)effects of user-defined whatsits make me wonder what
> use-cases have been in mind when introducing this type of node?
> Attributes seem so much more attractive for squeezing additional
> information into a node list, because they should be handled
> transparently (I think).
> But never mind, I'm currently looking into ways to make TeX smarter with
> regards to ligatures. I've recently found the selnolig package
> utilizing user-defined whatsit nodes for inhibiting selected ligatures.
> Before asking further questions regarding ligatures I just wanted to
> get some clarification about the whatsit approach.
> The selnolig's whatsit approach works, but it's again not free of
> side-effects. It gets in the way with the hyphenation algorithm in that
> the whatsit marks a word boundary causing problems with minimum
> hyphenation length calculation. Note how setting \righthyphenmin=5 in
> the attached example prevents t-t hyphenation in the word 'butterflies.'
> (Let's ignore the fact that the fl ligature is indeed valid in this
> example.) The problem is more serious in German with its many compound
> words. Babel shortcuts like "|, which insert real glue if I recall
> correctly, suffer from the same problem.
> Any ideas how to prevent selected ligatures without causing side-effects?
> Best regards,
> Stephan Hennig
> % -*- coding: utf-8 -*-
> % Declare constants.
> local GLYPH = node.id('glyph')
> local WHATSIT = node.id('whatsit')
> local USER_DEFINED = node.subtype('user_defined')
> local CHAR_f = string.byte('f')
> local CHAR_l = string.byte('l')
> local Ncopy = node.copy
> local Nnew = node.new
> local Ninsert_before = node.insert_before
> local Ntraverse = node.traverse
> % Create user-defined whatsit.
> local what = Nnew(WHATSIT, USER_DEFINED)
> what.user_id = 20141117
> what.type = 100
> what.value = 0
> % Register callback.
> function (head, tail)
> % Iterate over node list.
> for n in Ntraverse(head) do
> if n.id == GLYPH and n.char == CHAR_l then
> local p = n.prev
> if p.id == GLYPH and p.char == CHAR_f then
> Ninsert_before(head, n, Ncopy(what))
> lang.hyphenate(head, tail)
> Subject: Digest Footer
> luatex mailing list
> luatex at tug.org
> End of luatex Digest, Vol 71, Issue 15
More information about the luatex