# [XeTeX] xetex+babel, was: missing everything

Bruno Voisin bvoisin at mac.com
Thu Jan 19 12:44:41 CET 2006

Le 19 janv. 06 à 09:25, Martin Henning a écrit :

> though it seems to me the babel-package is very important for many
> people... i guess people using xetex don't use it that much? how do
> they get localized hyphenation and correct names for date/chapter/
> introduction/blah? only the russian part with the weird encodings?
> can't be like that... so many other easter-european languages where
> babel does the same thing! :) maybe as of now xetex is rather being
> used to generate the really fancy (for eurpean/american/... eyes at
> least) stuff such as arabic etc...

I looked also at babel.pdf and it seems that, for most languages
except those using Latin alphabets, babel is simply incompatible with
XeTeX. For example, the Russian option in babel selects by default
the T2A encoding which, in turns, supposes specific fonts named
something like larm according to the various .fd files inside /
Library/teTeX/share/texmf.tetex/tex/latex/cyrillic/ (I'm not even
sure these fonts are installed by default).

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.

Beware, too, in case you're willing to use babel and modify some of
its settings, that any redefinition of a babel construct in the
preamble of a LaTeX document is better put inside an
\AtBeginDocument. For example:

\StandardLayout
\AtBeginDocument{%
\renewcommand{\bibname}{Références}
\renewcommand{\contentsname}{Sommaire}
\renewcommand{\figurename}{Figure}}
\newcommand{\foreignhyphen}[2]{\begin{hyphenrules}{#1}#2\end
{hyphenrules}}

Hope this helps,

Bruno Voisin