[XeTeX] again russian, german, english...

Jonathan Kew jonathan_kew at sil.org
Thu Feb 16 11:21:14 CET 2006


On 16 Feb 2006, at 9:32 am, Martin Henning wrote:
>>
>> The one from /usr/local/teTeX/share/texmf.local.... is what xetex  
>> will have used when building the xelatex format. Could you send me  
>> a copy of this, so I can try to reproduce your environment and see  
>> where that strange hyphenation is coming from?
>
> most certainly! see attachment... it's this one:
>
> /usr/local/teTeX/share/texmf.local/tex/generic/config/language.dat


OK, I've finally seen the light (I think).

This *is* a difference between the British and American hyphenation  
rules (and it's probably correct). When I tried it before, I didn't  
get all the Babel magic right, and so didn't really see the British  
results when I thought I would.

So, here are my conclusions. The British patterns give "art-icle", as  
you're seeing. The American ones give "ar-ti-cle", which you'd prefer.

Your language.dat file is set up so that "english" is a synonym for  
"british":

<quote>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%
% The US-english patterns should be loaded *always* and as *first* ones.
% Define USenglish as an alias for american.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%
american	ushyph1.tex
=USenglish

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%
% UK english, TWO LINES! To enabling these lines, remove %! and the  
space.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%
british	ukhyphen.tex
=UKenglish

% english should always be defined. Either an alias for american or  
british.
=english

</quote>

That's why you're getting the British hyphenation in your document  
for text marked as "english".

To get the American version instead, any one of several things should  
work:

(1) Disable the British patterns altogether, by commenting out the  
two UK lines in language.dat and rebuilding xelatex.fmt (could be  
done via i-Installer, or manually from the command line). Then you'll  
always get American hyphenation for "english" language.

(2) Keep the British patterns enabled, but move the lines:

<quote>
% english should always be defined. Either an alias for american or  
british.
=english
</quote>

up so that they come immediately after the *American* patterns are  
loaded. Then "english" will be a synonym for "american". Again,  
you'll need to rebuild xelatex.fmt for any changes here to take effect.

(3) Don't change your language.dat or xelatex.fmt at all, but in your  
document, use the language name "american" instead of "english".  
(Both as an option to the Babel package, and in your \selectlanguage  
commands.) Thus, you'll have:

<quote>
% babel - hyphenation etc...
\usepackage[german,american,russian]{babel}
</quote>

Note that if you change the Babel language names you're loading,  
you'll get error messages on the next LaTeX run (when it reads  
the .aux file with the name "english" that is no longer loaded). The  
easiest solution is TeXShop's Trash Aux Files button; then typeset  
twice, to refresh the cross-references, etc. that will get lost.

Using the language name "american" (or its synonym "USenglish") in  
your document will be most reliable, in that it should work  
regardless of future changes to your LaTeX/language.dat setup. Using  
the name "english" means that on a different system, or after some  
future update, you may end up seeing British hyphenation again; the  
meaning of "english" is (deliberately) configuration-dependent.

Hope this helps,

JK




More information about the XeTeX mailing list