[latex3-commits] [latex3/babel] docs: New: Migrating from pdfTeX to LuaTeX (draft). (fc95e24)
github at latex-project.org
github at latex-project.org
Thu Nov 7 18:22:30 CET 2024
Repository : https://github.com/latex3/babel
On branch : docs
Link : https://github.com/latex3/babel/commit/fc95e24b5877b2bcbfe609c2235cacc945532505
>---------------------------------------------------------------
commit fc95e24b5877b2bcbfe609c2235cacc945532505
Author: Javier <email at localhost>
Date: Thu Nov 7 18:22:30 2024 +0100
New: Migrating from pdfTeX to LuaTeX (draft).
>---------------------------------------------------------------
fc95e24b5877b2bcbfe609c2235cacc945532505
docs/_includes/menu.html | 1 +
docs/guides/migrating-pdftex-luatex.md | 53 ++++++++++++++++++++++++++++++++++
docs/guides/migrating-xetex-luatex.md | 18 +++++++-----
docs/news/whats-new-in-babel-24.13.md | 6 ++--
4 files changed, 68 insertions(+), 10 deletions(-)
diff --git a/docs/_includes/menu.html b/docs/_includes/menu.html
index e2e6579..d13d33a 100644
--- a/docs/_includes/menu.html
+++ b/docs/_includes/menu.html
@@ -32,6 +32,7 @@
<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/migrating-pdftex-luatex.html">Migrating from pdfTeX 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>
diff --git a/docs/guides/migrating-pdftex-luatex.md b/docs/guides/migrating-pdftex-luatex.md
new file mode 100644
index 0000000..45583ab
--- /dev/null
+++ b/docs/guides/migrating-pdftex-luatex.md
@@ -0,0 +1,53 @@
+# Migrating from pdfTeX to LuaTeX
+
+**Draft**
+
+Documents shuld be encoded in UTF-8.
+
+## Fonts
+
+The package `fontenc` must be removed (as well as `inputenc`). With
+this single change, languages in the Latin script should work.
+
+With languages in non-Latin encodings, you should assign them a font.
+A typical modification would be from:
+```tex
+\documentclass[bulgarian]{article}
+
+\usepackage[T2A]{fontenc}
+
+\usepackage{babel}
+
+\begin{document}
+
+...
+
+\end{document}
+```
+to:
+```tex
+\documentclass[bulgarian]{article}
+
+\usepackage{babel}
+
+\babelfont{rm}{NewComputerModern10}
+
+\begin{document}
+
+...
+
+\end{document}
+```
+
+## RTL scripts
+
+Migration is a little more involved. See
+[Hebrew](https://latex3.github.io/babel/guides/locale-hebrew.html) and
+[Arabic](https://latex3.github.io/babel/guides/locale-arabic.html)
+
+## Other languages
+
+There is a list of locales
+[here](https://latex3.github.io/babel/guides/index-locale.html). You can
+find many minimal documents for `luatex`.
+
diff --git a/docs/guides/migrating-xetex-luatex.md b/docs/guides/migrating-xetex-luatex.md
index b46e95b..cedd676 100644
--- a/docs/guides/migrating-xetex-luatex.md
+++ b/docs/guides/migrating-xetex-luatex.md
@@ -6,30 +6,34 @@ In many languages and scripts, particularly Latin, Greek and Cyrillic,
a document written for `xetex` should work with `luatex` without
changes.
+See also the companion guide [Migrating from pdfTeX to
+LuaTeX](https://latex3.github.io/babel/guides/migrating-pdftex-luatex.html)
+if you are migrating from pdfTeX.
+
## 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
+suited for many Asian scripts (Indic, South Asian). So, you may need to
replace something like
```tex
\babelfont{rm}{FreeSerif}
```
with
-```
+```tex
\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
+The `xetex` and `luatex` models are quite different (actually, `xetex`
+lacks 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.
+Note `xetex` only ‘reverses’ the text, while `luatex` ‘reverses’ also
+margins, columns, and so on, so with these elements expect different
+results.
## `Mapping`
diff --git a/docs/news/whats-new-in-babel-24.13.md b/docs/news/whats-new-in-babel-24.13.md
index ba5bbea..dd007a0 100644
--- a/docs/news/whats-new-in-babel-24.13.md
+++ b/docs/news/whats-new-in-babel-24.13.md
@@ -9,7 +9,7 @@ LaTeX Project](https://www.texdev.net/2024/11/05/engine-news-from-the-latex-proj
“it is time to move away from XeTeX: certainly for new documents, and
even for existing ones”.
-[Here](migrating-xetex-luatex.html) is a document (still a draft) with
+[Here](https://latex3.github.io/babel/guides/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.
@@ -30,8 +30,8 @@ With, for example:
```tex
\SetTransformValue{french}{colon.natural}{.4}
```
-spacing with the colon is slightly smaller (default is `.5`). Units
-are the current ordinary space.
+spacing with the colon is slightly smaller (default is `.5`). Unit
+is the current ordinary space.
## Pashto: Persian and Islamic calendars
More information about the latex3-commits
mailing list.