[XeTeX] xetex+babel, was: missing everything

Jonathan Kew jonathan_kew at sil.org
Mon Jan 23 15:16:38 CET 2006


On 23 Jan 2006, at 9:44 am, Yves Codet wrote:

>
> Le 19 janv. 06, à 12:44, Bruno Voisin a écrit :
>
>> It may be possible to use or create switches so as to disactivate  
>> all but the hyphenation and section naming etc. mechanisms in  
>> babel, but I would tend to think this is simply not worth the  
>> trouble. In my case I can use babel with XeTeX in documents  
>> containing text partly in French and partly in English, but this  
>> is because both languages use only the Latin alphabet so that  
>> babel does not impose any font or encoding setting, and because  
>> the French option provides a switch \StandardLayout to disactivate  
>> most of the disastrous initiatives taken by babel in terms of item  
>> spacing in lists, choices of bullets also in lists, construction  
>> of ellipsis character, etc.
>
> There is also something wrong when we want to add Unicode  
> hyphenation patterns through "language.dat". Here is the end of my  
> "xelatex.log". The two languages I added (in fact only one, since  
> "uni-grhyph.tex" is substituted to "grhyph.tex") appear twice, so  
> two numbers are skipped in the list at the very end.
>

See my reply "Re: Greek hyphenation" of January 16th. The files of  
patterns are not supposed to allocate language codes with  
\newlanguage, or set the current \language; that's meant to be done  
by the caller before reading the pattern file.

Babel doesn't seem to give you a command for switching *only* the  
hyphenation language, but you could make your own, keeping in mind  
that for a language "greek", Babel internally creates the language  
code \l at greek. Something like this:

	\makeatletter
	\newcommand{\hyphlang}[1]{\expandafter\language\csname l@#1\endcsname}
	\makeatother

should let you say \hyphlang{greek} to access the patterns as loaded  
by Babel, without touching the rest of Babel's settings.

HTH,

JK



More information about the XeTeX mailing list