Skip to content

Commit

Permalink
Start 24.12.
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier committed Oct 19, 2024
1 parent 99459c3 commit e93385f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ and
Its high-level interface with
[`fontspec`](https://ctan.org/pkg/fontspec?lang=en) allows for seamless
integration with **OpenType** technologies in `xetex` and `luatex`,
enabling effortless use of advanced typographic features, and
fine-grained control and customization. Additionally, lazy locale and
font loading facilitate integration into **automated document
generation workflows**, and makes it adept at handling complex
enabling effortless, robust and flexible use of advanced typographic
features, and fine-grained control and customization. Additionally,
lazy locale and font loading facilitate integration into **automated
document generation workflows**, and makes it adept at handling complex
documents with **multiple languages**.

Many locales in Babel are built on a **modern core** that utilizes
Expand Down Expand Up @@ -72,6 +72,7 @@ case, it's advisable to install TeXLive.)

| Version | Most relevant changes
| --- | --- |
| [24.12](news/whats-new-in-babel-24.12.html) | (dev) Manual revised. `\PassOptionsToLocale` |
| [24.11](news/whats-new-in-babel-24.11.html) | Manual revised. Transform variables. |
| [24.10](news/whats-new-in-babel-24.10.html) | `\localename`, `\mainlocalename`, `\babelhyphenmins` |
| [24.9](news/whats-new-in-babel-24.9.html) | Transforms: `digits.native`, CJK spacing (tentative). |
Expand Down
51 changes: 51 additions & 0 deletions docs/news/whats-new-in-babel-24.12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# What's new in babel 24.12

**Draft**

## Manual revised (continued)

As in the previous version, outdated comments have been revised, certain
explanations expanded, and examples added.

## Multilingual document automation

One on the aims of `babel` is to ease its integration with automated
document generation or conversion workflows (like
[Pandoc](https://pandoc.org/), [Sphynx](https://www.sphinx-doc.org/) or
[Asciidoctor](https://asciidoctor.org/), and there has been steps in
this direction with, for example, lazy loading of locales (not
requiring explicit declaration in the preamble) and fonts (loaded only
if actually used in the document), as well as BCP-47 tags.

There are now a couple of tools to preset the options for locales even
before loading `babel`, by means of the LaTeX hooking mechanism.

The hook `babel/presets` is executed just before locale files (either
`ini` or `ldf`) are loaded. It’s in fact, similar to the `config`
files, but it’s executed later and there is no need to a separate file.

`\PassOptionsToLocale` was devised for this hook and its purpose is
what its name suggests. For example, you can write in a class (with
`luatex`).
```tex
\AddToHook{babel/presets}{%
\PassOptionsToLocale{mapdigits}{sanskrit}%
\PassOptionsToLocale{transforms=punctuation.space}{french}%
}
```

Other candidates for `babel/presets` are `\AfterBabelLanguage` and
`\DeclareOption` (although the latter can be somewhat dangerous).

## Fixes

* Some numerals in Greek `ini` files printed the wrong sigma.
* Dates were missing with lazy locale loading.
* ‘Complex’ class options involving characters like `=`, `{`, `}`,
mislead `babel`.






0 comments on commit e93385f

Please sign in to comment.