[latex3-commits] [latex3/babel] docs: More on interchar. (7f9a3ac)
github at latex-project.org
github at latex-project.org
Thu Nov 9 18:47:37 CET 2023
Repository : https://github.com/latex3/babel
On branch : docs
Link : https://github.com/latex3/babel/commit/7f9a3aca08afff7aef7146097038e8505536b52b
>---------------------------------------------------------------
commit 7f9a3aca08afff7aef7146097038e8505536b52b
Author: Javier <email at localhost>
Date: Thu Nov 9 18:47:37 2023 +0100
More on interchar.
>---------------------------------------------------------------
7f9a3aca08afff7aef7146097038e8505536b52b
docs/news/whats-new-in-babel-3.97.md | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/docs/news/whats-new-in-babel-3.97.md b/docs/news/whats-new-in-babel-3.97.md
index 7b7e7f7..bb1b051 100644
--- a/docs/news/whats-new-in-babel-3.97.md
+++ b/docs/news/whats-new-in-babel-3.97.md
@@ -6,13 +6,16 @@
`babel` now provides built-in tools to set localized rules based on the
XeTeX `interchar` mechanism. Some ideas ideas has been borrowed from the
-`interchar` package by ... and the `babel` style for French (by Daniel
+`interchar` package (by Zou Ho) and the `babel` style for French (by Daniel
Flipo).
This is the a further step towards a more complete support for XeTeX,
beyond line breaking rules for languages like Thai, which are already
handled by `babel`.
+The commands are the following, described in more
+detail in the `babel` manual.
+
```
\babelcharclass{locale}{name}{char-list}
@@ -21,15 +24,17 @@ handled by `babel`.
\enablelocaleinterchar{label}
\disablelocaleinterchar{label}
```
-<class-first> and <class-second> can be comma separated lists, and all
+‹class-first› and ‹class-second› can be comma separated lists, and all
combinations are defined (so that 2 first classes with 2 second
classes, defines 4 combinations).
Not very useful, but illustrative (taken from `interchar`), here is how
-to colorize the letters ‘e’ and ‘s’:
+to colorize the letters ‘e’ and ‘s’. Here `default` and `boundary` are
+classes predefined by `babel` (see the `xetex` manual for further
+info):
```tex
\usepackage{color}
-\babelcharclass{english}{colored}{es}
+\babelcharclass{english}{colored}{xy}
\babelinterchar{english}{default, boundary}{colored}{\bgroup\color{red}}
\babelinterchar{english}{colored}{default, boundary}{\egroup}
```
@@ -40,7 +45,7 @@ range and the latter in command form:
```tex
\babelcharclass{english}{digit}{0-9}
\babelcharclass{english}{percent}{\%}
-\babelinterchar{english}{digit}{percent}{\,}
+\babelinterchar[label=percent]{english}{digit}{percent}{\,}
```
# Locales
More information about the latex3-commits
mailing list.