[latex3-commits] [git/LaTeX3-latex3-babel] main: BCP 47 variants and extensions. Option ensureinfo=off. Macro \BCPdata. (161aa2a)

Javier email at dante.de
Fri May 20 19:09:35 CEST 2022


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/161aa2abf165ce1f8176285f4c7af36d82614a7b

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

commit 161aa2abf165ce1f8176285f4c7af36d82614a7b
Author: Javier <email at localhost>
Date:   Fri May 20 19:09:35 2022 +0200

    BCP 47 variants and extensions. Option ensureinfo=off. Macro \BCPdata.


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

161aa2abf165ce1f8176285f4c7af36d82614a7b
 README.md                         |   2 +-
 babel.dtx                         |  54 +++++++++++++++++++++++++++++++++-----
 babel.ins                         |   2 +-
 babel.pdf                         | Bin 860737 -> 861823 bytes
 bbcompat.dtx                      |   2 +-
 locale/de/babel-de-1901.ini       |   4 +--
 locale/de/babel-de-1996.ini       |   4 +--
 locale/de/babel-de-AT-1901.ini    |   4 +--
 locale/de/babel-de-AT-1996.ini    |   4 +--
 locale/de/babel-de-CH-1901.ini    |   4 +--
 locale/de/babel-de-CH-1996.ini    |   4 +--
 locale/de/babel-de-CH.ini         |   4 +--
 locale/la/babel-la-x-classic.ini  |   4 +--
 locale/la/babel-la-x-ecclesia.ini |   4 +--
 locale/la/babel-la-x-medieval.ini |   4 +--
 locale/sr/babel-sr.ini            |   4 +--
 16 files changed, 72 insertions(+), 32 deletions(-)

diff --git a/README.md b/README.md
index d1b18a0..b26dbee 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.75.2742
+## Babel 3.75.2743
 
 ''(Development.)''
 
diff --git a/babel.dtx b/babel.dtx
index 387e6f6..43f3945 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2022/05/19 v3.75.2742 The Babel package]
+\ProvidesFile{babel.dtx}[2022/05/20 v3.75.2743 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -2908,9 +2908,21 @@ expandable, and the available fields are:
 \item[|script.name|], as provided by the Unicode CLDR.
 \item[|script.tag.bcp47|] is the BCP 47 tag of the script
   used by this locale. This is a required field for the fonts to be
-  correctly set up, and therefore it should be defined always.
+  correctly set up, and therefore it should be always defined.
 \item[|script.tag.opentype|] is the tag used by OpenType (usually,
   but not always, the same as BCP 47).
+\item[|region.tag.bcp47|] is the BCP 47 tag of the region or territory.
+  Defined only if the locale loaded actually contains it (eg, |es-MX|
+  does, but |es| doesn’t), which is how locales behave in the CLDR.
+  \New{3.75}
+\item[|variant.tag.bcp47|] is the BCP 47 tag of the variant (in the BCP 47
+  sense, like |1901| for German). \New{3.75}
+\item[|extension.|\m{s}|.tag.bcp47|] is the BCP 47 value of the
+  extension whose singleton is \m{s} (currently the recognized
+  singletons are |x|, |t| and |u|). The internal syntax can be somewhat
+  complex, and this feature is still somewhat tentative. An example is
+  \textsf{classiclatin} which sets |extension.x.tag.bcp47| to classic.
+  \New{3.75}
 \end{description}
 
 \begin{warning}
@@ -5128,8 +5140,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.75.2742>>
-%<<date=2022/05/19>>
+%<<version=3.75.2743>>
+%<<date=2022/05/20>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10381,8 +10393,23 @@ help from Bernd Raichle, for which I am grateful.
        Reported }}}
 %
 \let\bbl at release@transforms\@empty
+%    \end{macrocode}
+%
+% BCP 47 extensions are separated by a single letter (eg,
+% |latin-x-medieval|. The following macro handles this special case to
+% create correctly the correspondig info.
 %
-\def\bbl at ini@extension#1{}
+%    \begin{macrocode}
+\def\bbl at ini@extension#1{%
+  \def\bbl at tempa{#1}%
+  \bbl at replace\bbl at tempa{extension.}{}%
+  \bbl at replace\bbl at tempa{.tag.bcp47}{}%
+  \bbl at ifunset{bbl at info@#1}%
+    {\bbl at csarg\xdef{info@#1}{ext/\bbl at tempa}%
+     \bbl at exp{%   
+       \\\g at addto@macro\\\bbl at moreinfo{%
+         \\\bbl at exportkey{ext/\bbl at tempa}{identification.#1}{}}}}%
+    {}}
 \let\bbl at moreinfo\@empty
 %
 \def\bbl at ini@exports#1{%
@@ -11008,6 +11035,18 @@ help from Bernd Raichle, for which I am grateful.
 \@namedef{bbl at info@variant.tag.bcp47}{vbcp}
 % extensions are dealt with in a special way
 \let\bbl at ensureinfo\@gobble
+% An internal \LaTeX{} macro:
+\providecommand\BCPdata[1]{\localeinfo*{#1.tag.bcp47}}
+%    \end{macrocode}
+%
+% Now |\BabelEnsureInfo| is executed always, but there is an option to
+% disable it.
+% 
+%    \begin{macrocode} 
+%<<*More package options>>
+\DeclareOption{ensureinfo=off}{}
+%<</More package options>>
+%
 \newcommand\BabelEnsureInfo{%
   \ifx\InputIfFileExists\@undefined\else
     \def\bbl at ensureinfo##1{%
@@ -11016,8 +11055,9 @@ help from Bernd Raichle, for which I am grateful.
   \bbl at foreach\bbl at loaded{{%
     \def\languagename{##1}%
     \bbl at ensureinfo{##1}}}}
-\AtEndOfPackage{% Test for plain.
-  \ifx\@undefined\bbl at loaded\else\BabelEnsureInfo\fi}
+\@ifpackagewith{babel}{ensureinfo=off}{}%
+  {\AtEndOfPackage{% Test for plain.
+    \ifx\@undefined\bbl at loaded\else\BabelEnsureInfo\fi}}
 %    \end{macrocode}
 %
 % More general, but non-expandable, is |\getlocaleproperty|. To inspect
diff --git a/babel.ins b/babel.ins
index 3911901..fee950a 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{2022/05/19}
+\def\filedate{2022/05/20}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 692228f..2577c92 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 24bfb1e..93792de 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/05/19 v3.75.2742]
+\ProvidesFile{bbcompat.dtx}[2022/05/20 v3.75.2743]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/locale/de/babel-de-1901.ini b/locale/de/babel-de-1901.ini
index 87dffa1..d9b0c7c 100644
--- a/locale/de/babel-de-1901.ini
+++ b/locale/de/babel-de-1901.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = german
diff --git a/locale/de/babel-de-1996.ini b/locale/de/babel-de-1996.ini
index c421218..9624e48 100644
--- a/locale/de/babel-de-1996.ini
+++ b/locale/de/babel-de-1996.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = german
diff --git a/locale/de/babel-de-AT-1901.ini b/locale/de/babel-de-AT-1901.ini
index 3502451..1d0d649 100644
--- a/locale/de/babel-de-AT-1901.ini
+++ b/locale/de/babel-de-AT-1901.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = austrian german-austria german-at
diff --git a/locale/de/babel-de-AT-1996.ini b/locale/de/babel-de-AT-1996.ini
index fc89811..a220440 100644
--- a/locale/de/babel-de-AT-1996.ini
+++ b/locale/de/babel-de-AT-1996.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = austrian german-austria german-at
diff --git a/locale/de/babel-de-CH-1901.ini b/locale/de/babel-de-CH-1901.ini
index b354fd6..6ce1d61 100644
--- a/locale/de/babel-de-CH-1901.ini
+++ b/locale/de/babel-de-CH-1901.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2021-09-29
+version = 1.5
+date = 2022-05-1729
 name.local = Deutsch
 name.english = German
 name.babel = german-switzerland german-ch nswissgerman
diff --git a/locale/de/babel-de-CH-1996.ini b/locale/de/babel-de-CH-1996.ini
index 50fb5bd..7af819b 100644
--- a/locale/de/babel-de-CH-1996.ini
+++ b/locale/de/babel-de-CH-1996.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2021-09-29
+version = 1.5
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = german-switzerland german-ch nswissgerman
diff --git a/locale/de/babel-de-CH.ini b/locale/de/babel-de-CH.ini
index 672200b..cf39b6e 100644
--- a/locale/de/babel-de-CH.ini
+++ b/locale/de/babel-de-CH.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2021-09-29
+version = 1.5
+date = 2022-05-17
 name.local = Deutsch
 name.english = German
 name.babel = german-switzerland german-ch nswissgerman
diff --git a/locale/la/babel-la-x-classic.ini b/locale/la/babel-la-x-classic.ini
index 94aa8ff..6860238 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.3
-date = 2021-11-15
+version = 1.4
+date = 2022-05-17
 name.english = Classic Latin
 tag.bcp47 = la-x-classic
 language.tag.bcp47 = la
diff --git a/locale/la/babel-la-x-ecclesia.ini b/locale/la/babel-la-x-ecclesia.ini
index 4c351e9..72959e1 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.3
-date = 2021-11-15
+version = 1.4
+date = 2022-05-17
 name.english = Ecclesiastic Latin
 tag.bcp47 = la-x-ecclesia
 language.tag.bcp47 = la
diff --git a/locale/la/babel-la-x-medieval.ini b/locale/la/babel-la-x-medieval.ini
index 3b45e5b..dff24c0 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.3
-date = 2021-11-15
+version = 1.4
+date = 2022-05-17
 name.english = Medieval Latin
 tag.bcp47 = la-x-medieval
 language.tag.bcp47 = la
diff --git a/locale/sr/babel-sr.ini b/locale/sr/babel-sr.ini
index 690fefd..d78a179 100644
--- a/locale/sr/babel-sr.ini
+++ b/locale/sr/babel-sr.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2021-04-24
+version = 1.5
+date = 2022-05-14
 name.local = српски
 name.english = Serbian
 name.babel = serbian





More information about the latex3-commits mailing list.