[latex3-commits] [latex3/babel] docs: More on migration. (ad60482)

github at latex-project.org github at latex-project.org
Sun Nov 10 09:39:35 CET 2024


Repository : https://github.com/latex3/babel
On branch  : docs
Link       : https://github.com/latex3/babel/commit/ad60482b426ed03381ad75b20bfae76db410113a

>---------------------------------------------------------------

commit ad60482b426ed03381ad75b20bfae76db410113a
Author: Javier <email at localhost>
Date:   Sun Nov 10 09:39:35 2024 +0100

    More on migration.


>---------------------------------------------------------------

ad60482b426ed03381ad75b20bfae76db410113a
 docs/guides/migrating-pdftex-luatex.md | 42 ++++++++++++++++++++++++++++++----
 docs/guides/migrating-xetex-luatex.md  |  2 ++
 docs/index.md                          |  4 ++++
 docs/news/whats-new-in-babel-24.1.md   |  2 +-
 4 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/docs/guides/migrating-pdftex-luatex.md b/docs/guides/migrating-pdftex-luatex.md
index aee0c46..9352d4c 100644
--- a/docs/guides/migrating-pdftex-luatex.md
+++ b/docs/guides/migrating-pdftex-luatex.md
@@ -2,15 +2,45 @@
 
 **Draft** 
 
-Documents shuld be encoded in UTF-8.
+> *Improve this page! Feel free to draft a pull request [on GitHib](https://github.com/latex3/babel/tree/docs/docs)*.
+
+Now the recommended engine is `luatex`, here are some hints on how to
+migrate a LaTeX document from `pdftex` to `luatex`.
+
+## Input encoding
+
+Documents should be encoded in UTF-8. The package `luainputenc` can
+help if you are in a hurry, but its use is discouraged. Many editors
+provide options to set the document encoding.
 
 ## Fonts
 
 The package `fontenc` must be removed (as well as `inputenc`). With
 this single change, languages in the Latin script should work if the
-font is the default one. If you are using a package to set the font,
-you may need to replace it by `fontspec` calls. There is no rule – some
-of these packages are compatible and some are not.
+font is the default one. A minimal example in `pdftex` is:
+```tex
+\documentclass[french]{article}
+\usepackage[T1]{fontenc}
+\usepackage{babel}
+
+\begin{document}
+Plus ça change, plus c'est la même chose!
+\end{document}
+```
+which in `luatex` becomes:
+```tex
+\documentclass[french]{article}
+\usepackage{babel}
+
+\begin{document}
+Plus ça change, plus c'est la même chose!
+\end{document}
+```
+
+If you are using a package to set the font, you may need to replace it
+by `fontspec` calls. There is no rule – some of these packages are
+compatible and some are not. You can find an example comparing `pdftex`
+and `luatex` [here](https://tex.stackexchange.com/a/730422/5735).
 
 With languages in non-Latin encodings, you should assign them a font.
 A typical modification would be from:
@@ -31,12 +61,14 @@ to:
 ...
 \end{document}
 ```
+Remember some classes and packages, particularly `beamer`, set the
+default family to `sf` instead of `rm`. 
 
 ## 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)
+[Arabic](https://latex3.github.io/babel/guides/locale-arabic.html).
 
 ## Other languages
 
diff --git a/docs/guides/migrating-xetex-luatex.md b/docs/guides/migrating-xetex-luatex.md
index cedd676..f2cee72 100644
--- a/docs/guides/migrating-xetex-luatex.md
+++ b/docs/guides/migrating-xetex-luatex.md
@@ -2,6 +2,8 @@
 
 **Draft**
 
+> *Improve this page! Feel free to draft a pull request [on GitHub](https://github.com/latex3/babel/tree/docs/docs)*.
+
 In many languages and scripts, particularly Latin, Greek and Cyrillic,
 a document written for `xetex` should work with `luatex` without
 changes.
diff --git a/docs/index.md b/docs/index.md
index 2454b07..7bb5ee8 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -65,6 +65,10 @@ case, it's advisable to install TeXLive.)
   When to use the old good language files and when `\babelprovide` or `provide=*`.
 * [Useful links to tex.strackexchange](guides/useful-links-to-tex.stackexchange.html)
   Examples for many languages: Chinese, Arabic, Sanskrit, etc.
+* [Migrating from XeTeX to
+  LuaTeX](https://latex3.github.io/babel/guides/migrating-xetex-luatex.html).
+* [Migrating from pdfTeX to
+  LuaTeX](https://latex3.github.io/babel/guides/migrating-pdftex-luatex.html).
 
 ---------------------------
 
diff --git a/docs/news/whats-new-in-babel-24.1.md b/docs/news/whats-new-in-babel-24.1.md
index c63b065..006fad7 100644
--- a/docs/news/whats-new-in-babel-24.1.md
+++ b/docs/news/whats-new-in-babel-24.1.md
@@ -24,7 +24,7 @@ See the following section for an example.
 ## Spacing in French
 
 Firstly, remember `ini` files are not necessarily a replacement for
-`ldf' files. For a complete localization for French, prefer default the
+`ldf` files. For a complete localization for French, prefer default the
 style by Daniel Flipo. The `ini` locale is mainly intended for French
 as a secondary language (although it can also be used as the primary
 language, if you like).





More information about the latex3-commits mailing list.