View on GitHub


The multilingual framework to localize LaTeX, LuaLaTeX, XeLaTeX

What’s new in babel 3.97


Support for interchar (XeTeX)

babel now provides built-in tools to set localized rules based on the XeTeX interchar mechanism. Some ideas ideas has been borrowed from the interchar package (by Zou Ho) and the babel style for French (by Daniel Flipo).

This is the a further step towards a more complete support for XeTeX, beyond line breaking rules for languages like Thai, which are already handled by babel.

The commands are the following, described in more detail in the babel manual.



‹class-first› and ‹class-second› can be comma separated lists, and all combinations are defined (so that 2 first classes with 2 second classes, define 4 combinations).

Not very useful, but illustrative (taken from interchar), here is how to colorize the letters ‘x’ and ‘y’. Here default and boundary are classes predefined by babel (see the xetex manual for further info):

\babelinterchar{english}{default, boundary}{colored}{\bgroup\color{red}}
\babelinterchar{english}{colored}{default, boundary}{\egroup}

A more realistic example follows, which inserts a thin space between a digit and a percent sign. Note the former is entered as a range and the latter in command form: