[latex3-commits] [git/LaTeX3-latex3-babel] master: Bump to 3.46 (6dde3ab)

Javier email at dante.de
Tue Jul 7 17:31:21 CEST 2020


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/6dde3ab4842b76942c973229986b2e4cb95c03e0

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

commit 6dde3ab4842b76942c973229986b2e4cb95c03e0
Author: Javier <email at localhost>
Date:   Tue Jul 7 17:31:21 2020 +0200

    Bump to 3.46


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

6dde3ab4842b76942c973229986b2e4cb95c03e0
 README.md    |  15 +++--
 babel.dtx    | 180 +++++++++++++++++++++++++++++------------------------------
 babel.ins    |   2 +-
 babel.pdf    | Bin 793693 -> 793176 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 100 insertions(+), 99 deletions(-)

diff --git a/README.md b/README.md
index b18be28..6ac28f4 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.45.2053
+## Babel 3.46
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -44,15 +44,18 @@ respective authors.
 ### Latest changes
 
 ```
-3.46   2020-07-??
-       - \BabelEnsureInfo now loads the basic data for the main
-         language. 
+3.46   2020-07-06
+       - \BabelEnsureInfo now loads the basic data for the requested
+         languages immediately (formerly it was done at the end of the
+         preamble).
        - Fixes:
          - Getting rid of the hyphen in XeTeX was not working as
            expected. A new procedure has been devised.
-         - tag.bcp47 (#79).
+         - tag.bcp47 now contains what its name promises, instead of
+           just the language subtag (#70).
          - Locale info was not loaded if the name had uppercase letters
-           in some OS (#80).
+           in some OSs (#80).
+         - The [..|..] syntax in ini dates didn't recognize 'digits'.
          
 3.45   2020-06-10
        - Minor fixes in Hindi, Ancient Greek, Macedonian.
diff --git a/babel.dtx b/babel.dtx
index e0eea9d..736f7e2 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/06/29 v3.45.2053 The Babel package]
+\ProvidesFile{babel.dtx}[2020/07/07 v3.46 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -2693,7 +2693,7 @@ expandable, and the available fields are:
 %%% activated because the bug in \languagename is far from trivial.
 \item[|tag.ini|] is the tag of the |ini| file (the way this
   file is identified in its name).
-\item[|tag.bcp47|] is the full BCP 47 tag.
+\item[|tag.bcp47|] is the full BCP 47 tag (see the warning below).
 \item[|language.tag.bcp47|] is the BCP 47 language tag.
 \item[|tag.opentype|] is the tag used by OpenType (usually, but not
   always, the same as BCP 47).
@@ -2704,6 +2704,12 @@ expandable, and the available fields are:
   but not always, the same as BCP 47).
 \end{description}
 
+\begin{warning}
+  \New{3.46} As of version 3.46 |tag.bcp47| returns the full BCP 47
+  tag. Formerly it returned just the language subtag, which was clearly
+  counterintuitive.
+\end{warning}
+
 \Describe{\getlocaleproperty}{\marg{macro}\marg{locale}\marg{property}}
 
 \New{3.42} The value of any locale property as set by the |ini| files
@@ -2984,6 +2990,18 @@ The behaviour is adjusted with |\babeladjust| with the following parameters:
   \texttt{bcp47-}. You may change it with this key.
 \end{description}
 
+\New{3.46} If an |ldf| file has been loaded, you can enable the
+corresponding language tags as selector names with:
+\begin{verbatim}
+\babeladjust{ bcp47.toname = on }
+\end{verbatim}
+(You can deactivate it with |off|.) So, if |dutch| is one of the
+package (or class) options, you can write |\selectlanguage{nl}|. Note
+the language name does not change (in this example is still |dutch|),
+but you can get it with |\localeinfo| or |\getlanguageproperty|. It
+must be turned on explicitly for similar reasons to those explained
+above.
+
 \subsection{Selecting scripts}
 
 Currently \babel{} provides no standard interface to select
@@ -4664,8 +4682,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.45.2053>>
-%<<date=2020/06/29>>
+%<<version=3.46>>
+%<<date=2020/07/07>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10288,7 +10306,7 @@ help from Bernd Raichle, for which I am grateful.
       {\ifx\bbl at initoload\relax
          \begingroup
            \def\BabelBeforeIni##1##2{\gdef\bbl at KVP@import{##1}\endinput}%
-           \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#2.tex}{}{}}}%
+           \bbl at input@ini{#2}%
          \endgroup
        \else
          \xdef\bbl at KVP@import{\bbl at initoload}%
@@ -10321,37 +10339,8 @@ help from Bernd Raichle, for which I am grateful.
      \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
   % At this point all parameters are defined if 'import'. Now we
   % execute some code depending on them. But what about if nothing was
-  % imported? We just load the very basic parameters: ids and a few
-  % more. 
-  \bbl at ifunset{bbl at lname@#2}%  TODO. Duplicated
-    {\def\BabelBeforeIni##1##2{%
-       \begingroup
-         \catcode`\[=12 \catcode`\]=12 \catcode`\==12
-         \catcode`\;=12 \catcode`\|=12 %
-         \let\bbl at ini@captions at aux\@gobbletwo
-         \def\bbl at inidate ####1.####2.####3.####4\relax ####5####6{}%
-         \bbl at read@ini{##1}{basic data}%
-         \bbl at exportkey{chrng}{characters.ranges}{}%
-         \bbl at exportkey{dgnat}{numbers.digits.native}{}%
-         \bbl at exportkey{prehc}{typography.prehyphenchar}{}%
-         \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
-         \bbl at exportkey{lfthm}{typography.lefthyphenmin}{2}%
-         \bbl at exportkey{rgthm}{typography.righthyphenmin}{3}%
-         \bbl at exportkey{hyphr}{typography.hyphenrules}{}%
-         \bbl at exportkey{hyotl}{typography.hyphenate.other.locale}{}%
-         \bbl at exportkey{hyots}{typography.hyphenate.other.script}{}%
-         \bbl at exportkey{intsp}{typography.intraspace}{}%
-         \ifx\bbl at initoload\relax\endinput\fi
-       \endgroup}%
-     \begingroup       % boxed, to avoid extra spaces:
-       \ifx\bbl at initoload\relax
-         \setbox\z@\hbox{%
-           \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#2.tex}{}{}}}}%
-       \else
-         \setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
-       \fi
-     \endgroup}%
-    {}%
+  % imported? We just load the very basic parameters.
+  \bbl at load@basic{#2}%
   % == script, language ==
   % Override the values from ini or defines them
   \ifx\bbl at KVP@script\@nil\else
@@ -10559,8 +10548,7 @@ help from Bernd Raichle, for which I am grateful.
        \let\BabelBeforeIni\@gobbletwo
        \chardef\atcatcode=\catcode`\@
        \catcode`\@=11\relax
-       \bbl at exp{\lowercase{\\\InputIfFileExists  
-         {babel-\bbl at cs{rqtex@\languagename}.tex}{}{}}}%
+       \bbl at input@ini{\bbl at cs{rqtex@\languagename}}%
        \catcode`\@=\atcatcode
        \let\atcatcode\relax
      \fi}%
@@ -10631,9 +10619,9 @@ help from Bernd Raichle, for which I am grateful.
       \expandafter\bbl at tempb\bbl at captionslist\@empty
     \else
       \ifx\bbl at initoload\relax
-        \bbl at read@ini{\bbl at KVP@captions}{data}%  Here letters cat = 11
+        \bbl at read@ini{\bbl at KVP@captions}0%  Here letters cat = 11
       \else
-        \bbl at read@ini{\bbl at initoload}{data}%  Here all letters cat = 11
+        \bbl at read@ini{\bbl at initoload}0%  Here all letters cat = 11
       \fi
       \bbl at after@ini
       \bbl at savestrings
@@ -10647,38 +10635,7 @@ help from Bernd Raichle, for which I am grateful.
       \bbl at savedate
     \fi
   \bbl at endcommands
-  \bbl at ifsamestring{\bbl at ensured@main}{#1}%
-    {\bbl at csarg\let{bbl at lname@#1}\relax
-     \let\bbl at ensured@main\relax}%
-    {}%
-  \bbl at ifunset{bbl at lname@#1}%     TODO. Duplicated
-    {\def\BabelBeforeIni##1##2{%
-       \begingroup
-         \catcode`\[=12 \catcode`\]=12 \catcode`\==12
-         \catcode`\;=12 \catcode`\|=12 %
-         \let\bbl at ini@captions at aux\@gobbletwo
-         \def\bbl at inidate ####1.####2.####3.####4\relax ####5####6{}%
-         \bbl at read@ini{##1}{basic data}%
-         \bbl at exportkey{prehc}{typography.prehyphenchar}{}%
-         \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
-         \bbl at exportkey{lfthm}{typography.lefthyphenmin}{2}%
-         \bbl at exportkey{rgthm}{typography.righthyphenmin}{3}%
-         \bbl at exportkey{hyotl}{typography.hyphenate.other.locale}{}%
-         \bbl at exportkey{hyots}{typography.hyphenate.other.script}{}%
-         \bbl at exportkey{intsp}{typography.intraspace}{}%
-         \bbl at exportkey{chrng}{characters.ranges}{}%
-         \bbl at exportkey{dgnat}{numbers.digits.native}{}%
-         \ifx\bbl at initoload\relax\endinput\fi
-       \endgroup}%
-     \begingroup       % boxed, to avoid extra spaces:
-       \ifx\bbl at initoload\relax
-         \setbox\z@\hbox{%
-           \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}%
-       \else
-         \setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
-       \fi
-     \endgroup}%
-    {}%
+  \bbl at load@basic{#1}%
   \bbl at exp{%
     \gdef\<#1hyphenmins>{%
       {\bbl at ifunset{bbl at lfthm@#1}{2}{\bbl at cs{lfthm@#1}}}%
@@ -10690,7 +10647,7 @@ help from Bernd Raichle, for which I am grateful.
 \def\bbl at provide@renew#1{%
   \ifx\bbl at KVP@captions\@nil\else
     \StartBabelCommands*{#1}{captions}%
-      \bbl at read@ini{\bbl at KVP@captions}{data}%   Here all letters cat = 11
+      \bbl at read@ini{\bbl at KVP@captions}0%   Here all letters cat = 11
       \bbl at after@ini
       \bbl at savestrings
     \EndBabelCommands
@@ -10703,6 +10660,44 @@ help from Bernd Raichle, for which I am grateful.
   \fi
   % == hyphenrules ==
   \bbl at provide@hyphens{#1}}
+% Load the basic parameters (ids, typography, counters, and a few
+% more), while captions and dates are left out. But it may happen some
+% data has been loaded before automatically, so we first discard the
+% saved values.
+\def\bbl at load@basic#1{%
+  \bbl at ifunset{bbl at inidata@\languagename}{}%
+    {\getlocaleproperty\bbl at tempa{\languagename}{identification/load.level}%
+     \ifcase\bbl at tempa\else
+       \bbl at csarg\let{lname@\languagename}\relax
+     \fi}%
+  \bbl at ifunset{bbl at lname@#1}% 
+    {\def\BabelBeforeIni##1##2{%
+       \begingroup
+         \catcode`\[=12 \catcode`\]=12 \catcode`\==12
+         \catcode`\;=12 \catcode`\|=12 %
+         \let\bbl at ini@captions at aux\@gobbletwo
+         \def\bbl at inidate ####1.####2.####3.####4\relax ####5####6{}%
+         \bbl at read@ini{##1}0%
+         \bbl at exportkey{prehc}{typography.prehyphenchar}{}%
+         \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
+         \bbl at exportkey{lfthm}{typography.lefthyphenmin}{2}%
+         \bbl at exportkey{rgthm}{typography.righthyphenmin}{3}%         
+         \bbl at exportkey{hyphr}{typography.hyphenrules}{}%
+         \bbl at exportkey{hyotl}{typography.hyphenate.other.locale}{}%
+         \bbl at exportkey{hyots}{typography.hyphenate.other.script}{}%
+         \bbl at exportkey{intsp}{typography.intraspace}{}%
+         \bbl at exportkey{chrng}{characters.ranges}{}%
+         \bbl at exportkey{dgnat}{numbers.digits.native}{}%
+         \ifx\bbl at initoload\relax\endinput\fi
+       \endgroup}%
+     \begingroup       % boxed, to avoid extra spaces:
+       \ifx\bbl at initoload\relax
+         \bbl at input@ini{#1}%
+       \else
+         \setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
+       \fi
+     \endgroup}%
+    {}}
 %    \end{macrocode}
 %
 % The |hyphenrules| option is handled with an auxiliary macro.
@@ -10753,6 +10748,8 @@ help from Bernd Raichle, for which I am grateful.
 \ifx\bbl at readstream\@undefined
   \csname newread\endcsname\bbl at readstream
 \fi
+\def\bbl at input@ini#1{%
+  \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}
 \def\bbl at inipreread#1=#2\@@{%
   \bbl at trim@def\bbl at tempa{#1}% Redundant below !!
   \bbl at trim\toks@{#2}%
@@ -10773,14 +10770,18 @@ help from Bernd Raichle, for which I am grateful.
        is not complete.}%
       {Fix the name or reinstall babel.}%
   \else
-    \bbl at exp{\def\\\bbl at inidata{\\\bbl at elt{identification}{tag.ini}{#1}}}%
+    \bbl at exp{\def\\\bbl at inidata{%
+      \\\bbl at elt{identification}{tag.ini}{#1}%
+      \\\bbl at elt{identification}{load.level}{#2}}}%
     \let\bbl at section\@empty
     \let\bbl at savestrings\@empty
     \let\bbl at savetoday\@empty
     \let\bbl at savedate\@empty
     \let\bbl at inireader\bbl at iniskip
-    \bbl at info{Importing #2 for \languagename\\%
-             from babel-#1.ini. Reported}%
+    \bbl at info{Importing
+                \ifcase#2 \or font and identification \or basic \fi
+                data for \languagename\\%
+              from babel-#1.ini. Reported}%
     \loop
     \if T\ifeof\bbl at readstream F\fi T\relax % Trick, because inside \loop
       \endlinechar\m at ne
@@ -11187,11 +11188,10 @@ help from Bernd Raichle, for which I am grateful.
       \bbl at add\bbl at secpost@identification{\closein\bbl at readstream }%
       \catcode`\[=12 \catcode`\]=12 \catcode`\==12
       \catcode`\;=12 \catcode`\|=12 %
-      \bbl at read@ini{##1}{font and identification data}%      
+      \bbl at read@ini{##1}1%    
       \endinput          % babel- .tex may contain onlypreamble's
     \endgroup}%            boxed, to avoid extra spaces:
-  {\setbox\z@\hbox{%
-    \bbl at exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}}}
+  {\bbl at input@ini{#1}}}
 %    \end{macrocode}
 %
 % Alphabetic counters must be converted from a space separated list to
@@ -11271,18 +11271,14 @@ help from Bernd Raichle, for which I am grateful.
 \@namedef{bbl at info@script.tag.bcp47}{sbcp} 
 \@namedef{bbl at info@script.tag.opentype}{sotf} 
 \let\bbl at ensureinfo\@gobble
-\let\bbl at ensured@main\relax
 \newcommand\BabelEnsureInfo{%
-  \AddBabelHook{babel-ensureinfo}{beforestart}{%
-    \bbl at foreach\bbl at loaded{{%  TODO. Always with bcp47.toname?
-      \def\languagename{####1}%
-      \bbl at ensureinfo{####1}}}}%
-  \def\bbl at ensureinfo##1{%
-    \ifx\InputIfFileExists\@undefined\else  % not in plain - move out
-      \bbl at ifunset{bbl at lname@##1}{\bbl at ini@basic{##1}}{}%
-    \fi}%
-  \bbl at ensureinfo{\bbl at main@language}%
-  \let\bbl at ensured@main\bbl at main@language}  % A flag. TODO. Better solution.
+  \ifx\InputIfFileExists\@undefined\else
+    \def\bbl at ensureinfo##1{%
+      \bbl at ifunset{bbl at lname@##1}{\bbl at ini@basic{##1}}{}}%
+  \fi
+  \bbl at foreach\bbl at loaded{{%
+    \def\languagename{##1}%
+    \bbl at ensureinfo{##1}}}}
 %    \end{macrocode}
 %
 % More general, but non-expandable, is |\getlocaleproperty|. To inspect
@@ -11389,7 +11385,9 @@ help from Bernd Raichle, for which I am grateful.
   \def\bbl at autoload@bcpoptions{#1}}
 \newif\ifbbl at bcptoname
 \@namedef{bbl at ADJ@bcp47.toname at on}{%
-  \bbl at bcptonametrue}
+  \bbl at bcptonametrue
+  \BabelEnsureInfo
+  }
 \@namedef{bbl at ADJ@bcp47.toname at off}{%
   \bbl at bcptonamefalse}
 % TODO: use babel name, override 
diff --git a/babel.ins b/babel.ins
index c1a304d..5c8abdc 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{2020/06/29}
+\def\filedate{2020/07/07}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index d84071b..0a1444e 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 4796958..84777f9 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/06/29 v3.45.2053]
+\ProvidesFile{bbcompat.dtx}[2020/07/07 v3.46]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.