[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *roff hyphenation trivia challenge
From: |
Tadziu Hoffmann |
Subject: |
Re: *roff hyphenation trivia challenge |
Date: |
Tue, 2 Apr 2024 18:51:51 +0200 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
> > Also interesting to see that in this word, the hyphenation
> > patterns don't suggest a hyphenation opportunity after "anti".
> The leading `\%` prevents that.
Sorry, I meant even without "\%". With a line length of 1 en,
and without any "\%" at all, groff prints
an-
tidis-
es-
tab-
lish-
men-
tar-
i-
an-
ism
and Heirloom troff prints
an-
tidises-
ta-
blish-
men-
tari-
an-
ism
TeX gives the same as groff since it uses the same
hyphenation patterns (groff borrowed them from TeX).
For "antidisestablishmen\%tarianism", groff prints
antidisestablishmen-
tar-
i-
an-
ism
(which I think is strange), while TeX and Heirloom troff print
antidisestablishmen-
tarianism
which I think is the only reasonable way of handling this case.
(I remember in Word it was only possible to add additional
hyphenation points, but not to inhibit existing ones, which
is a terrible idea if one of the builtin ones turns out to
be wrong.)
For "\%antidisestablishmen\%tarianism", Heirloom troff does not
hyphenate at all (even if the word contains additional "\%"),
whereas groff and TeX do the same as they did with only the
inner "\%". (Also, "\&" is not a letter, so a leading "\&"
should not influence hyphenation at all.)
With *only* the leading "\%", ("\%antidisestablishmentarianism"),
none of the formatters hyphenates, which is correct.
Of the three formatters, TeX's behavior appears to be the most
sensible to me, i.e., if the word contains one or more "\%",
*only* those points (but all of them) will be considered
for hyphenation.
Re: *roff hyphenation trivia challenge, Tadziu Hoffmann, 2024/04/02