[tex-eplain] Hyphenation patterns (again)

John Was john.was at ntlworld.com
Wed Oct 28 17:25:16 CET 2009


I've been using (in plain XeTeX) the code for invoking Latin hyphenation kindly supplied by Oleg (I think - apologies if it was someone else), viz.:



% do not set the language if the name is undefined in the current TeX.

\expandafter\ifx\csname lang@#1\endcsname \relax

\message{no patterns for #1}%


\global\language = \csname lang@#1\endcsname


% but there is no harm in adjusting the hyphenmin values regardless.

\global\lefthyphenmin = #2\relax

\global\righthyphenmin = #3\relax


To load Latin hyphenation patterns I use:


and then I can just say \latin when I need it.

However, although I've been using \latin within a group, I find that it imposes the patterns throughout after it has been invoked, and that it also obliterates any manual \hyphenation{....} exceptions that I have previously loaded.  The last issue might be quite complicated to sort out, I guess, but I would like at least to know how to get back to plain TeX's default hyphenation.  If the grouping doesn't work then I suppose what I need is something like:


so that I can then just give \english to get back to English hyphenation.  But using 'english' or 'UKenglish' or one of the other synonyms listed in the Babel documentation just results in a 'no patterns loaded' message.  What should I be doing to get back to the default hyphenation patterns?

I realize that in plain (Xe)TeX there isn't the full funcionality of Babel (let alone polyglossia) but the Latin hyphenations have proved basically reliable, the only nuisance being that I then get a division such as ho-spital or 'bin-ding' when I am back in English.  And as I say, the obliteration of previously invoked custom hyphenations is an additional problem which it would be good to have ironed out if that is possible.

Suggestions much appreciated!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-eplain/attachments/20091028/082a69ca/attachment.html>

More information about the tex-eplain mailing list