Discussion:
[tex-k] ligatures and explicit kerns
Stephan Hennig
2014-10-01 16:06:23 UTC
Permalink
Hi,

in the TeXbook, the answer to exercise 5.1 (the shelfful exercise)
contains a sentence

Appendix H points out that ligatures are put into a hyphenated
word that contains no ?explicit kerns,? and an italic correction
is an explicit kern.

I didn't find the place in appendix H the quote refers to, so pointers
would be appreciated.

Anyway, as I understand the quote, ligatures won't be inserted in words
that do contain explicit kerns. That is, to suppress multiple ligatures
within a word, it should be enough to insert just /one/ italic
correction (between two of the ligature candidates). Though, a test
turns out that this is not the case.

shelf\/fulfi
\bye

outputs the word with two separate letters f but the fi ligature
applied. Could anybody please shed some light on the quote above?

Best regards,
Stephan Hennig
Karl Berry
2014-10-02 23:48:25 UTC
Permalink
Hi Stephan,

ligatures won't be inserted in words that do contain explicit kerns.
...
shelf\/fulfi

It would be unexpected, at least by me, for a kern in one position
within a word to disable ligatures everywhere within the word, not just
at the point of the kern. I agree that the text you quoted can be read
that way; repeating it here:

Appendix H points out that ligatures are put into a hyphenated
word that contains no ``explicit kerns,'' and an italic correction
is an explicit kern.

but I would suggest interpreting it as a more limited statement:
ligatures are avoided at the point of the explicit kern. (After all, TB
is not intended to be a legal document.) At most there might be a
clearer statement in TB, if you want to make a report for DEK's
consideration; obviously the actual behavior is not going to be changed.

I didn't find the place in appendix H the quote refers to, so
pointers would be appreciated.

I do not see a single "place" that is being referred to; as far as I can
tell, it's rather a consequence of all the multifarious rules in App. H.
(But maybe I'm missing it, I did not reread every word [again].)
Perhaps the most direct statement is this one, talking about what
"hyphenating a word" actually means (namely, inserting discretionaries):

\ddanger Trial words ...
If other hyphenation points are found, one or more discretionary items
are inserted in the word; ligatures and implicit kerns are reconstituted
at the same time.

The first statement is a negative construction, the second a positive
one. Always tricky to compare.

Best,
Karl
Stephan Hennig
2014-10-04 18:30:48 UTC
Permalink
Karl, Julian,

thank you both for your answers!
Post by Karl Berry
ligatures won't be inserted in words that do contain explicit kerns.
...
shelf\/fulfi
It would be unexpected, at least by me, for a kern in one position
within a word to disable ligatures everywhere within the word, not just
at the point of the kern. I agree that the text you quoted can be read
Appendix H points out that ligatures are put into a hyphenated
word that contains no ``explicit kerns,'' and an italic correction
is an explicit kern.
ligatures are avoided at the point of the explicit kern. (After all, TB
is not intended to be a legal document.)
Hm, that sounds a bit like cheating. :-)
Post by Karl Berry
At most there might be a clearer statement in TB, if you want to make
a report for DEK's consideration;
I'll think about that. (There must be something else DEK had in mind
when writing the answer.) Do the increasing update cycles for TeX and
MF also apply to DEK's books, i.e., will he care to look at book error
reports before 2020?
Post by Karl Berry
obviously the actual behavior is not going to be changed.
Sure. :-)
Post by Karl Berry
I didn't find the place in appendix H the quote refers to, so
pointers would be appreciated.
I do not see a single "place" that is being referred to; as far as I can
tell, it's rather a consequence of all the multifarious rules in App. H.
(But maybe I'm missing it, I did not reread every word [again].)
:-) Will reread appendix H thoroughly before reporting it as an error.
Post by Karl Berry
Perhaps the most direct statement is this one, talking about what
\ddanger Trial words ...
If other hyphenation points are found, one or more discretionary items
are inserted in the word; ligatures and implicit kerns are reconstituted
at the same time.
The first statement is a negative construction, the second a positive
one. Always tricky to compare.
True. But I still have the feeling that the wording in the answer
should be changed.

Best regards,
Stephan Hennig
Julian Gilbey
2014-10-02 21:38:28 UTC
Permalink
Post by Stephan Hennig
Hi,
in the TeXbook, the answer to exercise 5.1 (the shelfful exercise)
contains a sentence
Appendix H points out that ligatures are put into a hyphenated
word that contains no ?explicit kerns,? and an italic correction
is an explicit kern.
I didn't find the place in appendix H the quote refers to, so pointers
would be appreciated.
Anyway, as I understand the quote, ligatures won't be inserted in words
that do contain explicit kerns. That is, to suppress multiple ligatures
within a word, it should be enough to insert just /one/ italic
correction (between two of the ligature candidates). Though, a test
turns out that this is not the case.
shelf\/fulfi
\bye
outputs the word with two separate letters f but the fi ligature
applied. Could anybody please shed some light on the quote above?
Yes, it seems to be a confusing (wrong?) statement in the quoted
solution in The TeXbook. TeX will only hyphenate that portion of a
word prior to the first explicit kern (if I have read Appendix H
correctly), and will reinsert ligatures into that part of the word
after the hyphenation algorithm has run. Anything following the first
explicit kern will not be subject to the hyphenation algorithm, and
ligatures will be inserted as normal there. Ligatures are also
reinserted into the part of the word prior to the first kern. So in
fishfishf\/ish, if it is automatically hyphenated as fish-fishfish,
the first two "fi" ligatures will be reconstituted, but the final one
will not be.

To explicitly supress multiple ligatures within one word then, one
could do something like shelf\/fulf{}i - the second break suffices
with {} as this part will never be passed through the hyphenation
algorithm.

Julian
Karl Berry
2014-10-04 22:13:48 UTC
Permalink
will he care to look at book error reports before 2020?

As far as I know, no. 2020 for everything.

I also doubt he would even consider any change without proposed new text
(that does not change the page breaks, of course). Good luck.

Best,
Karl

Loading...