[tex-hyphen] hyphenmins in latex formats

François Charette firmicus at ankabut.net
Sat Mar 20 13:45:12 CET 2010


Hello all,

The current discussion (here and off-list) about adding new hyphenation 
patterns for Indic languages and the handling of hyphenmins prompted the 
following thoughts. This has probably been discussed before, but here it 
goes.

The way hyphenmin values are handled in LaTeX/Babel is quite cumbersome 
compared to the plain formats that use language.def, in which default 
hyphenmin values for each language are set and then compiled into the 
format. I believe some hyphenation files do set the hyphenmins 
themselves, but probably only few of them, right? In LaTeX/Babel, one 
needs to specify hyphenmins by hand for each language. Since the Babel 
implementation is compiled in the various LaTeX formats (via 
hyphen.cfg), polyglossia must follow the same route. I would really 
prefer if all latex formats would provide the default hyphenmin values 
for all languages whose patterns are compiled in the format. This would 
require some changes to the code in hyphen.cfg, which is one of the two 
core files of Babel. I don't know how (un)realistic that is.

Ideally one would wish to provide the hyphenmins directly in 
language.dat. Something like:

lingua load-hyph-lg.tex 2 2

But after looking at the line parsing code in hyphen.cfg, I think this 
would not be possible, as Babel allows a third optional argument for a 
file containing hyphenation exceptions, which is very seldom used, but 
it would be backward incompatible. Having the hyphenmins in a separate 
file is not a good idea either. What I think is possible and totally 
backward-compatible is to allow an extra line below the standard one, 
with a special prefix followed by the two hyphenmin values, like this:

% from hyphen-slovenian
slovenian loadhyph-sl.tex
=slovene
#2 2

I can contribute the code for this to be added to hyphen.cfg, but I am 
not sure about the chances of it being integrated officially into Babel. 
What are your views on this?

Regards,
François




More information about the tex-hyphen mailing list