groff
[Top][All Lists]

## Re: [groff] The hyphenation algorithm produces wrong results

 From: Werner LEMBERG Subject: Re: [groff] The hyphenation algorithm produces wrong results Date: Sun, 04 Mar 2018 20:24:46 +0100 (CET)

```>> As mentioned above, the hyphenation patterns are constructed with
>> certain \lefthyphenmin and \righthyphenmin values.  However, those
>> values are *not* present in the hyphenation patterns – you have to
>> know them (I consider this a design bug in TeX).  In other words,
>> only the user knows that values 16 or 32 are valid for a given
>> language's hyphenation patterns or not.
>
> Could groff pluck optional left and right minimums from the
> filename, e.g. `hyphen.us'?

Yes, groff could set up key-value pairs to map the file name (or,
maybe better, the language code) to the left and right minimum values.

> Or allow an optional extra file based on that name that has them as
> content?

This is another possibility, yes.

I will discuss the issue on the TeX hyphenation mailing list; I think
it is best to add two standardized identifiers

% \lefthyphenmin=X
% \righthyphenmin=Y

into the header comment of all hyphenation pattern files (in
https://github.com/hyphenation/tex-hyphen/tree/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex).

Werner
```