Skip to content

Commit

Permalink
New: “Migrating from XeTeX to LuaTeX”
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier committed Nov 6, 2024
1 parent e4104a4 commit a160d14
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/_includes/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<li><a href="#">Guides</a>
<ul>
<li><a href="https://latex3.github.io/babel/guides/which-method-for-which-language.html">Which method for which language</a></li>
<li><a href="https://latex3.github.io/babel/guides/migrating-xetex-luatex.html">Migrating from XeTeX to LuaTeX</a></li>
<li><a href="https://latex3.github.io/babel/guides/non-standard-hyphenation-with-luatex.html">Non-standard hyphenation with luatex</a></li>
<li><a href="https://latex3.github.io/babel/guides/using-babelprovide-to-modify-or-extend-locales.html">Using \babelprovide to modify or extend locales</a></li>
<li><a href="https://latex3.github.io/babel/guides/useful-links-to-tex.stackexchange.html">Useful links to tex.strackexchange</a></li>
Expand Down
49 changes: 49 additions & 0 deletions docs/guides/migrating-xetex-luatex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Migrating from XeTeX to LuaTeX

**Draft**

In many languages and scripts, particularly Latin, Greek and Cyrillic,
a document written for `xetex` should work with `luatex` without
changes.

## Fonts

By default, the font renderer in `xetex` is Harfbuzz (the only
available). With `luatex` the default renderer is `Node`, which is not
suited for some Asian scripts (Indic, South Asian). So, you may need to
replace something like
```tex
\babelfont{rm}{FreeSerif}
```
with
```
\babelfont{rm}[Renderer=Harfbuzz]{FreeSerif}
```

## RTL scripts

The `xetex` and `luatex` models are quite different. Actually, `xetex`
lacked a true RTL model. The main change is to replace the package
option `bidi=bidi` with `bidi=basic`. If you were using `bidi=default`,
no change is necessary.

Note `xetex` only ‘reverses’ the text, while `luatex` ‘reverses’ but
also margins, columns, and so on, so with these elements expect
different results.

## `Mapping`

This font feature is not available in `luatex`, but it can be replaced
advantageously with
[transforms](non-standard-hyphenation-with-luatex.html). There are
already some transforms to transliterate a few languages. Native digits
are already handled by `babel` out of the box.

## ‘Interchar’ mechanism

It can be replaced with transforms, too.

The package `ucharclasses` can be replaced in most cases with the
`babel` option `onchar`. The latter, unlike the former, works with RTL
scripts.

11 changes: 7 additions & 4 deletions docs/news/whats-new-in-babel-24.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

**Draft**

There is an important notice related to the LaTeX kernel, which affects
There are important news related to the LaTeX kernel, which affects
how to deal with languages. Now, according to [Engine news from the
LaTeX Project](https://www.texdev.net/2024/11/05/engine-news-from-the-latex-project),
“LuaTeX is the recommended engine for all new documents”. Furthermore,
“it is time to move away from XeTeX: certainly for new documents, and
even for existing ones”.

There is some work in progress to provide short examples in many languages.
[Here](migrating-xetex-luatex.html) is a document (still a draft) with
some hints on how to migrate from `xetex` to `luatex`.

Work is underway to provide short examples in many languages.
See [Index of locale guides](https://latex3.github.io/babel/guides/index-locale.html)

## Transform variables fo French
## French: Transform variables

When the `ini` file is used, you can now configure the spacing with
punctuation, with the new transform variables. See [What’s new in
Expand All @@ -30,7 +33,7 @@ With, for example:
spacing with the colon is slightly smaller (default is `.5`). Units
are the current ordinary space.

## Pashto Persian and Islamic calendar
## Pashto: Persian and Islamic calendars

Added strings for the those calendars in the locale for Pashto. Since
the default calendar was Persian, an error was even raised (which is
Expand Down

0 comments on commit a160d14

Please sign in to comment.