[tex-hyphen] hyphenation/hyph-utf8, libhyphen, lefthyphenmin and righthyphenmin

Muller, Eric emuller at amazon.com
Fri May 27 23:27:42 CEST 2016


My use case is to use the patterns from the hyphenation/hyph-utf8 github 
repo, together with the libhyphen library.

I understand that:

- the patterns are built for certain values of lefthyphenmin and 
righthyphenmin, and in particular do not function properly with smaller 
values than they have been built for. E.g. the pattern "1b2l", with 
leftminhyphen = 1,  would hyphenate the word xbla as x=bla,  whereas it 
would not with lefthyphenmin = 2

- I should get the patterns from 
hyph-utf8/tex/generic/hyph-utf8/patterns/txt/hyph-<lang>.pat.txt

- those files do not mention lefthyphenmin nor righthyphenmin

- it seems that the authoritative source for left/righthyphenmin is in 
TL/tlpkg/tlpsrc/hyphen-<lang2>.tlpsrc

- those files used different convention for the <lang> part, e.g. "fr" 
for the patterns but "french" for the tlpsrc.

- libhyphen expects LEFTHYPHENMIN and RIGHTHYPHENMIN to be specified at 
the beginning of the pattern file it takes as input, and default to 2, 2

- at least the irish patterns use greater values (righthyphenmin = 3)

In other words, I need to present to libhyphen an Irish pattern file 
starting with:

UTF-8
LEFTHYPHENMIN 2
RIGHTHYPHENMIN 3

and I therefore need to preprocess the file provided by 
hyphenation/hyph-utf8 to add those lines.

Is that correct, and what's the best way to do that?

Thanks,
Eric.

PS: many thanks for the answers (on this list or privatley) to my 
previous questions. I am afraid I will have more....




More information about the tex-hyphen mailing list