logo

Babel: news

Updated: 2013-04-01

Babel gets back on track and it is again actively maintained. Version 3.9 was released on March 2013. Current version is 3.9b.

See the README for basic info, and babel.pdf for the full documentation.

Starting with this version, babel has been separated in a core (or “base”) part, and contributed language-specific packages, which should be maintained by its contributors. In particular, it shall be no longer necessary to synchronize Babel core releases with releases of Babel language files. See CONTRIB for some guidelines on contributing languages.

The core part is located in the subdirectory base, the contrib part is actually a link into CTAN’s macros/latex/contrib subtree.

No attempt has be done to take full advantage of the features provided by XeTeX and LuaTeX, which would require a completely new core (as for example polyglossia or as part of LaTeX3).

The goals were:

  • Fixing bugs (lots).
  • Modularity. Only some Babel core files will be maintained by the LaTeX team (and some volunteers), and all other language specific stuff should be maintained by its contributors. This requires extra mechanisms to prevent or at least to overcome incompatibilities.
  • A minimal compatibility with XeTeX and LuaTeX.
  • Hyphenation. Loading patterns on demand (for luatex); an engine/package-independent hyphen.cfg (and if possible, more lightweight).
  • Shorthands. More control on them, including the possibility to deactivate them altogether.
  • Encodings. Captions in multiple encodings (not only LICR, but also, eg, utf8); better case handling; strings defined independently from the switching machanism.
  • Plain. Making changes compatible.
  • Creating test files.

Most of these goals have been fulfilled.

Here is a list of most of the new and extended macros:

  • \usershorthands* is like \useshorthands but it makes sure shorthands are always activated.
  • \defineshorthands can be used to (re)define system and language shorthands, and a new level for language dependent user shorthands is added, which takes precedence over “normal” user shorthands.
  • \shorthandoff* restores the original catcode or definition (useful with ~ and ^).
  • \AfterBabelLanguage sets code to be executed at the end of the corresponding ldf file.
  • \babelhyphen inserts a hyphen (soft, hard, nobreak…).
  • \babelhyphenation is like \hyphenation but for all languages or specific ones.
  • \AddBabelHook sets code to be executed at some “events” (\EnableBabelHook and \DisableBabelHook control them).

New package options:

  • shorthands sets which language/system shorthands are allowed.
  • safe sets if bib and/or ref macros are redefined.
  • config sets a different config file.
  • main sets the main language.
  • headfoot sets the language in heads and foots.
  • noconfigs: .cfg files are not loaded.
  • showlanguages prints to the log file the languages loaded in the format.
  • math control if shorthands are also active in math mode.

Formerly, switch.def was preloaded into the format, which made difficult to upgrade Babel. It is still preloaded, but now it is loaded always with the package (provided the version number is different). As to hyphen.cfg, its behaviour is the same as in the previous versions, but now it saves a list of loaded languages and there are several hooks for XeTeX and LuaTeX.

There is also a new file, bbunicode.dtx, which defines some hooks for Unicode engines.

See also: