[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *roff hyphenation trivia challenge
From: |
G. Branden Robinson |
Subject: |
Re: *roff hyphenation trivia challenge |
Date: |
Tue, 2 Apr 2024 15:07:10 -0500 |
At 2024-04-02T13:29:08-0500, G. Branden Robinson wrote:
> At 2024-04-02T13:42:59-0400, Steve Izma wrote:
> > Also for \% at the beginning of a word, I rarely use this.
>
> I use it frequently in man(7) documents, because the `hw` request is not
> portable/reliable (in theory). Also there's no mechanism for removing
> these, so if we tolerate/encourage their use, doing so deals a blow to
> reliable/predictable batch rendering.[1]
I could expand on this point.
CSTR #54 (1992) says:
.hw word
Specify hyphenation points in words with embedded minus signs.
Versions of a word with a terminal s are implied; i.e., dig-it
implies dig-its. This list is examined initially and after each
suffix stripping. The space available is small--about 128
characters.
I claim "not reliable" because not only do the declared `hw`
hyphenations in document N affect any document N+M formatted in the same
run, but you have to consider the (unspecified) failure mode of
exhausting the amount of space available for these exceptions. And
that's on AT&T troff. GNU troff dynamically sizes this exception list
so there's no problem in that respect.[1] But in both formatters you're
at the mercy of whatever was formatted before your document in the run.
This is true in general--anyone could define a trap or change the
control character and make your life hell--but, still, it strikes me as
a wart, where even well-intentioned, careful documents could cause
trouble for each other.
I expect the second and third sentences don't apply to GNU troff either,
but our documentation says nothing about this. Guess I'll have to
check.
I filed <https://savannah.gnu.org/bugs/?65549> regarding the "automatic
hyphenation roaring back to life" problem.
Regards,
Branden
[1]
https://www.gnu.org/software/groff/manual/groff.html.node/Other-Differences.html
https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/env.cpp?h=1.23.0#n3626
https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/env.cpp?h=1.23.0#n3560
https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/dictionary.cpp?h=1.23.0#n47
signature.asc
Description: PGP signature
Re: *roff hyphenation trivia challenge, Tadziu Hoffmann, 2024/04/02
Re: *roff hyphenation trivia challenge, Dave Kemper, 2024/04/02