[latex3-commits] [git/LaTeX3-latex3-babel] main: Bump to 3.67. Attributes with ini transforms. Transforms for Latin. (d402af4)
Javier
email at dante.de
Mon Nov 29 18:33:00 CET 2021
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/d402af49c2fdacc4162080c85d0e65aa33a5a08f
>---------------------------------------------------------------
commit d402af49c2fdacc4162080c85d0e65aa33a5a08f
Author: Javier <email at localhost>
Date: Mon Nov 29 18:33:00 2021 +0100
Bump to 3.67. Attributes with ini transforms. Transforms for Latin.
>---------------------------------------------------------------
d402af49c2fdacc4162080c85d0e65aa33a5a08f
README.md | 8 ++-
babel.dtx | 100 +++++++++++++++++++++++++++++++-------
babel.ins | 2 +-
babel.pdf | Bin 854501 -> 858700 bytes
bbcompat.dtx | 2 +-
locale/la/babel-la-x-classic.ini | 22 ++++++++-
locale/la/babel-la-x-ecclesia.ini | 22 ++++++++-
locale/la/babel-la-x-medieval.ini | 22 ++++++++-
locale/la/babel-la.ini | 23 ++++++++-
9 files changed, 169 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index 725b16f..bfb72cd 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
-## Babel 3.66.2557
-
-*(Development.)*
+## Babel 3.67
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -48,10 +46,10 @@ respective authors.
### Summary of Latest changes
```
-3.67 2021-11-?? (dev)
+3.67 2021-11-29
* \IfBabelSelectorTF executes code conditionally based on the
selector type (select, foreign, etc.).
- * Transforms can be turned on and off based on node attributes.
+ * Transforms can be turned on and off based on Lua attributes.
3.66 2021-11-08
* Transforms for Greek:
diff --git a/babel.dtx b/babel.dtx
index 0ab1c17..666c1b1 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/11/15 v3.66.2557 The Babel package]
+\ProvidesFile{babel.dtx}[2021/11/29 v3.67 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -687,6 +687,12 @@ This command can be used as environment, too.
any language, it will get expanded as expected.
\end{note}
+\begin{note}
+ Bear in mind |\selectlanguage| can be automatically executed, in some
+ cases, in the auxiliary files, at heads and foots, and after the
+ environment |otherlanguage*|.
+\end{note}
+
\begin{warning}
If used inside braces there might be some non-local changes, as this
would be roughly equivalent to:
@@ -3101,6 +3107,16 @@ illustrates:
\usepackage[magyar]{babel}
\babelprovide[_transforms = digraphs.hyphen_]{magyar}
\end{verbatim}
+\New{3.67} Transforms predefined in the |ini| locale files can be made
+attribute-dependent, too. When an attribute between parenthesis is
+inserted subsequent transforms will be assigned to it (up to the list
+end or another attribute). For example,
+and provided an attribute called |\withsigmafinal| has been declared:
+\begin{verbatim}
+transforms = transliteration.omega (\withsigmafinal) sigma.final
+\end{verbatim}
+This applies |transliteration.omega| always, but |sigma.final| only when
+|\withsigmafinal| is set.
Here are the transforms currently predefined. (More to follow
in future releases.)
@@ -3164,19 +3180,29 @@ four characters: \textit{!?:;}\,.}
danda or double danda if there is a space. For Assamese, Bengali,
Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Tamil, Telugu.}
-\trans{Arabic, Persian}{kashida.plain}{Experimental. A very simple and
-basic transform for ‘plain’ Arabic fonts, which attempts to distribute
-the tatwil as evenly as possible (starting at the end of the line). See
-the news for version 3.59.}
+\trans{Latin}{digraphs.ligatures}{Replaces the groups \textit{ae},
+\textit{AE}, \textit{oe}, \textit{OE} with \textit{æ}, \textit{Æ},
+\textit{œ}, \textit{Œ}.}
+
+\trans{Latin}{letters.noj}{Replaces \textit{j}, \textit{J} with
+\textit{i}, \textit{I}.}
+
+\trans{Latin}{letters.uv}{Replaces \textit{v}, \textit{U} with
+\textit{u}, \textit{V}.}
\trans{Serbian}{transliteration.gajica}{(Note |serbian| with |ini|
files refers to the Cyrillic script, which is here the target.) The
standard system devised by Ljudevit Gaj.}
+\trans{Arabic, Persian}{kashida.plain}{Experimental. A very simple and
+basic transform for ‘plain’ Arabic fonts, which attempts to distribute
+the tatwil as evenly as possible (starting at the end of the line). See
+the news for version 3.59.}
+
\vspace{2mm}\hrule\nobreak
\endgroup
-\Describe{\babelposthyphenation}{\marg{hyphenrules-name}%
+\Describe{\babelposthyphenation}{\oarg{options}\marg{hyphenrules-name}%
\marg{lua-pattern}\marg{replacement}}
\New{3.37-3.39} \textit{With \luatex{}} it is possible to define
@@ -3202,6 +3228,18 @@ to \textit{ύ}, so that the diaeresis is removed.
This feature is activated with the first |\babelposthyphenation| or
|\babelprehyphenation|.
+\New{3.67} With the optional argument you can associate a user defined
+transform to an attribute, so that it’s active only when it’s set
+(currently its attribute value is ignored). With this mechanism
+transforms can be set or unset even in the middle of paragraphs, and
+applied to single words. To define, set and unset the attribute, the
+LaTeX kernel provides the macros |\newattribute|, |\setattribute| and
+|\unsetattribute|. The following example shows how to use it, provided
+an attribute named |\latinnoj| has been declared:
+\begin{verbatim}
+ \babelprehyphenation[attribute=\latinnoj]{latin}{ J }{ string = I }
+\end{verbatim}
+
See the
\href{https://latex3.github.io/babel/guides/%
non-standard-hyphenation-with-luatex.html}{\babel\ site} for a more
@@ -3215,7 +3253,7 @@ applied, so you must take discretionaries into account).
You are limited to substitutions as done by \textsf{lua}, although a
future implementation may alternatively accept \textsf{lpeg}.
-\Describe{\babelprehyphenation}{\marg{locale-name}%
+\Describe{\babelprehyphenation}{\oarg{options}\marg{locale-name}%
\marg{lua-pattern}\marg{replacement}}
\New{3.44-3-52} It is similar to the latter, but (as its name implies)
@@ -3226,6 +3264,8 @@ search patterns |=| has no special meaning, while \verb+|+ stands for
an ordinary space; (3) in the replacement, discretionaries are not
accepted.
+See the description above for the optional argument.
+
This feature is activated with the first |\babelposthyphenation| or
|\babelprehyphenation|.
@@ -4867,6 +4907,21 @@ This macro is not intended to fix wrong mappings done by Unicode
(which are the default in both \xetex{} and \luatex{}) -- if an
assignment is wrong, fix it directly.
+\subsection{Executing code based on the selector}
+
+\Describe{\IfBabelSelectorTF}{\marg{selectors}\marg{true}\marg{false}}
+
+\New{3.67} Sometimes a different setup is desired depending on the
+selector used. Values allowed in \m{selectors} are |select|, |other|,
+|foreign|, |other*| (and also |foreign*| for the tentative starred
+version), and it can consist of a comma-separated list. For example:
+\begin{verbatim}
+\IfBabelSelectorTF{other, other*}{A}{B}
+\end{verbatim}
+is true with these two environment selectors.
+
+Its natural place of use is in hooks or in |\extras|\m{language}.
+
\section{Changes}
\subsection{Changes in \babel\ version 3.9}
@@ -5063,8 +5118,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.66.2557>>
-%<<date=2021/11/15>>
+%<<version=3.67>>
+%<<date=2021/11/29>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6234,9 +6289,6 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macrocode}
\expandafter\def\csname selectlanguage \endcsname#1{%
- \ifx\bbl at selectorname\@empty
- \def\bbl at selectorname{select}%
- \fi
\ifnum\bbl at hymapsel=\@cclv\let\bbl at hymapsel\tw@\fi
\bbl at push@language
\aftergroup\bbl at pop@language
@@ -10703,14 +10755,15 @@ help from Bernd Raichle, for which I am grateful.
\bbl at transforms\babelprehyphenation}
\@namedef{bbl at inikv@transforms.posthyphenation}{%
\bbl at transforms\babelposthyphenation}
-\def\bbl at transforms@aux#1#2#3,#4\relax{#1{#2}{#3}{#4}}
+\def\bbl at transforms@aux#1#2#3#4,#5\relax{%
+ #1[#2]{#3}{#4}{#5}}
\begingroup % A hack. TODO. Don't require an specific order
\catcode`\%=12
\catcode`\&=14
\gdef\bbl at transforms#1#2#3{&%
\ifx\bbl at KVP@transforms\@nil\else
\directlua{
- str = [==[#2]==]
+ local str = [==[#2]==]
str = str:gsub('%.%d+%.%d+$', '')
tex.print([[\def\string\babeltempa{]] .. str .. [[}]])
}&%
@@ -10718,10 +10771,23 @@ help from Bernd Raichle, for which I am grateful.
\ifin@
\in@{.0$}{#2$}&%
\ifin@
- \g at addto@macro\bbl at release@transforms{&%
- \relax\bbl at transforms@aux#1{\languagename}{#3}}&%
+ \directlua{
+ local str = string.match([[\bbl at KVP@transforms]],
+ '%(([^%(]-)%)[^%)]-\babeltempa')
+ if str == nil then
+ tex.print([[\def\string\babeltempb{}]])
+ else
+ tex.print([[\def\string\babeltempb{,attribute=]] .. str .. [[}]])
+ end
+ }
+ \toks@{#3}&%
+ \bbl at exp{&%
+ \\\g at addto@macro\\\bbl at release@transforms{&%
+ \relax &% Closes previous \bbl at transforms@aux
+ \\\bbl at transforms@aux
+ \\#1{label=\babeltempa\babeltempb}{\languagename}{\the\toks@}}}&%
\else
- \g at addto@macro\bbl at release@transforms{, {#3}}&%
+ \g at addto@macro\bbl at release@transforms{, {#3}}&%
\fi
\fi
\fi}
diff --git a/babel.ins b/babel.ins
index db68123..1be32b2 100644
--- a/babel.ins
+++ b/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2021/11/15}
+\def\filedate{2021/11/29}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 2aad0e8..bf2f691 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index dc361e5..0b0d1c2 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/11/15 v3.66.2557]
+\ProvidesFile{bbcompat.dtx}[2021/11/29 v3.67]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/locale/la/babel-la-x-classic.ini b/locale/la/babel-la-x-classic.ini
index cf57660..a6cf087 100644
--- a/locale/la/babel-la-x-classic.ini
+++ b/locale/la/babel-la-x-classic.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-11-15
name.english = Classic Latin
tag.bcp47 = la-x-classic
language.tag.bcp47 = la
@@ -150,3 +150,21 @@ hyphenationmin =
delimiters.quotes =
[counters]
+
+[transforms.prehyphenation]
+digraphs.ligatures.1.0 = { A[Ee] }
+digraphs.ligatures.1.1 = { string = Æ }
+digraphs.ligatures.1.2 = { remove }
+digraphs.ligatures.2.0 = { ae }
+digraphs.ligatures.2.1 = { string = æ }
+digraphs.ligatures.2.2 = { remove }
+digraphs.ligatures.3.0 = { O[Ee] }
+digraphs.ligatures.3.1 = { string = Œ }
+digraphs.ligatures.3.2 = { remove }
+digraphs.ligatures.4.0 = { oe }
+digraphs.ligatures.4.1 = { string = œ }
+digraphs.ligatures.4.2 = { remove }
+letters.noj.1.0 = { ([Jj]) }
+letters.noj.1.1 = { string = {1|Jj|Ii} }
+letters.uv.1.0 = { ([Uv]) }
+letters.uv.1.1 = { string = {1|Uv|Vu} }
diff --git a/locale/la/babel-la-x-ecclesia.ini b/locale/la/babel-la-x-ecclesia.ini
index 47b9f3d..de282f1 100644
--- a/locale/la/babel-la-x-ecclesia.ini
+++ b/locale/la/babel-la-x-ecclesia.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-11-15
name.english = Ecclesiastic Latin
tag.bcp47 = la-x-ecclesia
language.tag.bcp47 = la
@@ -150,3 +150,21 @@ hyphenationmin =
delimiters.quotes =
[counters]
+
+[transforms.prehyphenation]
+digraphs.ligatures.1.0 = { A[Ee] }
+digraphs.ligatures.1.1 = { string = Æ }
+digraphs.ligatures.1.2 = { remove }
+digraphs.ligatures.2.0 = { ae }
+digraphs.ligatures.2.1 = { string = æ }
+digraphs.ligatures.2.2 = { remove }
+digraphs.ligatures.3.0 = { O[Ee] }
+digraphs.ligatures.3.1 = { string = Œ }
+digraphs.ligatures.3.2 = { remove }
+digraphs.ligatures.4.0 = { oe }
+digraphs.ligatures.4.1 = { string = œ }
+digraphs.ligatures.4.2 = { remove }
+letters.noj.1.0 = { ([Jj]) }
+letters.noj.1.1 = { string = {1|Jj|Ii} }
+letters.uv.1.0 = { ([Uv]) }
+letters.uv.1.1 = { string = {1|Uv|Vu} }
diff --git a/locale/la/babel-la-x-medieval.ini b/locale/la/babel-la-x-medieval.ini
index 300c649..c2a3fe3 100644
--- a/locale/la/babel-la-x-medieval.ini
+++ b/locale/la/babel-la-x-medieval.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-11-15
name.english = Medieval Latin
tag.bcp47 = la-x-medieval
language.tag.bcp47 = la
@@ -149,3 +149,21 @@ hyphenationmin =
delimiters.quotes =
[counters]
+
+[transforms.prehyphenation]
+digraphs.ligatures.1.0 = { A[Ee] }
+digraphs.ligatures.1.1 = { string = Æ }
+digraphs.ligatures.1.2 = { remove }
+digraphs.ligatures.2.0 = { ae }
+digraphs.ligatures.2.1 = { string = æ }
+digraphs.ligatures.2.2 = { remove }
+digraphs.ligatures.3.0 = { O[Ee] }
+digraphs.ligatures.3.1 = { string = Œ }
+digraphs.ligatures.3.2 = { remove }
+digraphs.ligatures.4.0 = { oe }
+digraphs.ligatures.4.1 = { string = œ }
+digraphs.ligatures.4.2 = { remove }
+letters.noj.1.0 = { ([Jj]) }
+letters.noj.1.1 = { string = {1|Jj|Ii} }
+letters.uv.1.0 = { ([Uv]) }
+letters.uv.1.1 = { string = {1|Uv|Vu} }
diff --git a/locale/la/babel-la.ini b/locale/la/babel-la.ini
index aca5580..6da80d3 100644
--- a/locale/la/babel-la.ini
+++ b/locale/la/babel-la.ini
@@ -11,8 +11,8 @@
[identification]
charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-11-15
name.english = Latin
name.babel = latin
name.polyglossia = latin
@@ -150,3 +150,22 @@ hyphenationmin =
delimiters.quotes =
[counters]
+
+[transforms.prehyphenation]
+digraphs.ligatures.1.0 = { A[Ee] }
+digraphs.ligatures.1.1 = { string = Æ }
+digraphs.ligatures.1.2 = { remove }
+digraphs.ligatures.2.0 = { ae }
+digraphs.ligatures.2.1 = { string = æ }
+digraphs.ligatures.2.2 = { remove }
+digraphs.ligatures.3.0 = { O[Ee] }
+digraphs.ligatures.3.1 = { string = Œ }
+digraphs.ligatures.3.2 = { remove }
+digraphs.ligatures.4.0 = { oe }
+digraphs.ligatures.4.1 = { string = œ }
+digraphs.ligatures.4.2 = { remove }
+letters.noj.1.0 = { ([Jj]) }
+letters.noj.1.1 = { string = {1|Jj|Ii} }
+letters.uv.1.0 = { ([Uv]) }
+letters.uv.1.1 = { string = {1|Uv|Vu} }
+
More information about the latex3-commits
mailing list.