texlive[61433] Master/texmf-dist: babel (28dec21)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 28 23:51:16 CET 2021


Revision: 61433
          http://tug.org/svn/texlive?view=revision&revision=61433
Author:   karl
Date:     2021-12-28 23:51:15 +0100 (Tue, 28 Dec 2021)
Log Message:
-----------
babel (28dec21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/babel/README.md
    trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
    trunk/Master/texmf-dist/source/latex/babel/babel.dtx
    trunk/Master/texmf-dist/source/latex/babel/babel.ins
    trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
    trunk/Master/texmf-dist/source/latex/babel/locale.zip
    trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
    trunk/Master/texmf-dist/tex/generic/babel/babel.def
    trunk/Master/texmf-dist/tex/generic/babel/babel.sty
    trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
    trunk/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini
    trunk/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini
    trunk/Master/texmf-dist/tex/generic/babel/luababel.def
    trunk/Master/texmf-dist/tex/generic/babel/nil.ldf

Modified: trunk/Master/texmf-dist/doc/latex/babel/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/doc/latex/babel/README.md	2021-12-28 22:51:15 UTC (rev 61433)
@@ -1,4 +1,4 @@
-## Babel 3.67
+## Babel 3.68
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -8,9 +8,9 @@
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.67 are described in:
+Changes in version 3.68 are described in:
 
-https://latex3.github.io/babel/news/whats-new-in-babel-3.67.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.68.html
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -46,18 +46,14 @@
 
 ### Summary of Latest changes
 ```
-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 Lua attributes.
-
-3.66   2021-11-08
-       * Transforms for Greek:
-         - transliteration.omega
-         - sigma.final
-       * Fixes for bidi texts:
-         - For tcolorbox (#145, #146).
-         - Some improvements for tikz/pgf.
+3.68   2021-12-28
+       * Fixes:
+         - Assamese, Bengali, Gujarati set incorrectly prehyphenchar.
+         - The syntax provide=* didn’t work with Hebrew and a few other
+           languages.
+         - Wrong equation direction in first column in array and tabular
+           environment (#158).
+         - Tentative fixes for labels in displayed math (#159).
 ```
 
 ### Previous changes

Modified: trunk/Master/texmf-dist/doc/latex/babel/babel.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.dtx	2021-12-28 22:51:15 UTC (rev 61433)
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/11/29 v3.67 The Babel package]
+\ProvidesFile{babel.dtx}[2021/12/28 v3.68 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -5118,8 +5118,8 @@
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.67>>
-%<<date=2021/11/29>>
+%<<version=3.68>>
+%<<date=2021/12/28>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5196,10 +5196,11 @@
 %
 %   Now, just syntactical sugar, but it makes partial expansion of
 %   some code a lot more simple and readable. Here |\\| stands for
-%   |\noexpand| and |\<..>| for |\noexpand| applied to a built macro
-%   name (the latter does not define the macro if undefined to
-%   |\relax|, because it is created locally). The result may be
-%   followed by extra arguments, if necessary.
+%   |\noexpand|, |\<..>| for |\noexpand| applied to a built macro
+%   name (which does not define the macro if undefined to
+%   |\relax|, because it is created locally), and |\[..]| for one-level
+%   expansion (where |..| is the macro name without the backslash). The
+%   result may be followed by extra arguments, if necessary.
 %
 %    \begin{macrocode}
 \def\bbl at exp#1{%
@@ -5896,16 +5897,6 @@
 \fi
 %    \end{macrocode}
 %
-% Make sure the language set with `main` is the last one. 
-%
-%    \begin{macrocode}
-\ifx\bbl at opt@main\@nnil\else
-  \edef\bbl at language@opts{%
-    \ifx\bbl at language@opts\@empty\else\bbl at language@opts,\fi
-      \bbl at opt@main}
-\fi
-%    \end{macrocode}
-%
 % For |layout| an auxiliary macro is provided, available for packages
 % and language styles. Optimization: if there is no |layout|, just do
 % nothing.
@@ -10213,8 +10204,8 @@
   \ifeof\bbl at readstream
     \bbl at error
       {There is no ini file for the requested language\\%
-       (#1). Perhaps you misspelled it or your installation\\%
-       is not complete.}%
+       (#1: \languagename). Perhaps you misspelled it or your\\%
+       installation is not complete.}%
       {Fix the name or reinstall babel.}%
   \else
     % == Store ini data in \bbl at inidata ==
@@ -12133,103 +12124,84 @@
 \fi
 %    \end{macrocode}
 %
-%
 % Recognizing global options in packages not having a closed set of
-% them is not trivial, as for them to be processed they must be
-% defined explicitly. So, package options not yet taken into
-% account and stored in |bbl at language@opts| are assumed to be
-% languages (note this list also contains the language given with
-% |main|). If not declared above, the names of the option and the
-% file are the same.
+% them is not trivial, as for them to be processed they must be defined
+% explicitly. So, package options not yet taken into account and stored
+% in |bbl at language@opts| are assumed to be languages. If not declared
+% above, the names of the option and the file are the same. We first
+% pre-process the class and package options to determine the main
+% language, which is processed in the third ‘main’ pass,
+% \textit{except} if all files are ldf \textit{and} there is no |main|
+% key. In the latter case (|\bbl at opt@main| is still |\@nnil|), the
+% traditional way to set the main language is kept — the last loaded is
+% the main language.
 %
 %    \begin{macrocode}
-\let\bbl at tempc\relax
-\bbl at foreach\bbl at language@opts{%
-  \ifcase\bbl at iniflag  % Default
-    \bbl at ifunset{ds@#1}%
-      {\DeclareOption{#1}{\bbl at load@language{#1}}}%
-      {}%
-  \or    % provide=*
-    \@gobble % case 2 same as 1
-  \or    % provide+=*
-    \bbl at ifunset{ds@#1}%
-      {\IfFileExists{#1.ldf}{}%
-        {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
-      {}%
-    \bbl at ifunset{ds@#1}%
-      {\def\bbl at tempc{#1}%
-       \DeclareOption{#1}{%
-         \ifnum\bbl at iniflag>\@ne
-           \bbl at ldfinit
-           \babelprovide[import]{#1}%
-           \bbl at afterldf{}%
-         \else
-           \bbl at load@language{#1}%
-         \fi}}%
-      {}%
-  \or    % provide*=*
-    \def\bbl at tempc{#1}%
-    \bbl at ifunset{ds@#1}%
-      {\DeclareOption{#1}{%
-         \bbl at ldfinit
-         \babelprovide[import]{#1}%
-         \bbl at afterldf{}}}%
-      {}%
-  \fi}
+\ifx\bbl at opt@main\@nnil
+  \ifnum\bbl at iniflag>\z@  % if all ldf's: set implicitly, no main pass
+    \let\bbl at tempb\@empty
+    \edef\bbl at tempa{\@classoptionslist,\bbl at language@opts}%
+    \bbl at foreach\bbl at tempa{\edef\bbl at tempb{#1,\bbl at tempb}}%
+    \bbl at foreach\bbl at tempb{%    \bbl at tempb is a reversed list
+      \ifx\bbl at opt@main\@nnil % ie, if not yet assigned
+        \ifodd\bbl at iniflag % = *=
+          \IfFileExists{babel-#1.tex}{\def\bbl at opt@main{#1}}{}%
+        \else % n +=
+          \IfFileExists{#1.ldf}{\def\bbl at opt@main{#1}}{}%
+        \fi
+      \fi}%
+  \fi
+\fi
 %    \end{macrocode}
 %
-% Now, we make sure an option is explicitly declared for any language
-% set as global option, by checking if an |ldf| exists. The previous
-% step was, in fact, somewhat redundant, but that way we minimize
-% accessing the file system just to see if the option could be a
-% language.
+% A few languages are still defined explicitly. They are stored in case
+% they are needed in the ‘main’ pass (the value can be |\relax|).
 %
 %    \begin{macrocode}
-\let\bbl at tempb\@nnil
-\let\bbl at clsoptlst\@classoptionslist
-\bbl at foreach\@classoptionslist{%
-  \bbl at ifunset{ds@#1}%
-    {\IfFileExists{#1.ldf}%
-      {\def\bbl at tempb{#1}%
-       \DeclareOption{#1}{%
-         \ifnum\bbl at iniflag>\@ne
-           \bbl at ldfinit
-           \babelprovide[import]{#1}%
-           \bbl at afterldf{}%
-         \else
-           \bbl at load@language{#1}%
-         \fi}}%
-      {\IfFileExists{babel-#1.tex}% 
-        {\def\bbl at tempb{#1}%
-         \ifnum\bbl at iniflag>\z@
-           \DeclareOption{#1}{%
-             \ifnum\bbl at iniflag>\@ne
-               \bbl at ldfinit
-               \babelprovide[import]{#1}%
-               \bbl at afterldf{}%
-             \fi}%
-         \fi}%
-         {}}}%
-    {}}
+\ifx\bbl at opt@main\@nnil\else
+  \bbl at csarg\let{loadmain\expandafter}\csname ds@\bbl at opt@main\endcsname
+  \expandafter\let\csname ds@\bbl at opt@main\endcsname\relax
+\fi
 %    \end{macrocode}
 %
-%    If a main language has been set, store it for the third pass.
+% Now define the corresponding loaders. With package options, assume
+% the language exists. With class options, check if the option is a
+% language by checking if the correspondin file exists.
+% 
 %
 %    \begin{macrocode}
-\ifnum\bbl at iniflag=\z@\else
-  \ifx\bbl at opt@main\@nnil
-    \ifx\bbl at tempc\relax
-      \let\bbl at opt@main\bbl at tempb
-    \else
-      \let\bbl at opt@main\bbl at tempc
-    \fi
-  \fi
-\fi
-\ifx\bbl at opt@main\@nnil\else
-  \expandafter
-  \let\expandafter\bbl at loadmain\csname ds@\bbl at opt@main\endcsname
-  \expandafter\let\csname ds@\bbl at opt@main\endcsname\@empty
-\fi
+\bbl at foreach\bbl at language@opts{%
+  \def\bbl at tempa{#1}%
+  \ifx\bbl at tempa\bbl at opt@main\else
+    \bbl at ifunset{ds@#1}%
+      {\ifnum\bbl at iniflag<\tw@    % 0 ø (other = ldf)
+         \DeclareOption{#1}{\bbl at load@language{#1}}%
+       \else                      % + * (other = ini)
+         \DeclareOption{#1}{%
+           \bbl at ldfinit
+           \babelprovide[import]{#1}%
+           \bbl at afterldf{}}%
+       \fi}%
+      {}%
+  \fi}
+\bbl at foreach\@classoptionslist{%
+  \def\bbl at tempa{#1}%
+  \ifx\bbl at tempa\bbl at opt@main\else
+    \bbl at ifunset{ds@#1}%
+      {\ifnum\bbl at iniflag<\tw@    % 0 ø (other = ldf)
+         \IfFileExists{#1.ldf}%
+           {\DeclareOption{#1}{\bbl at load@language{#1}}}%
+           {}%
+       \else                      % + * (other = ini)
+         \IfFileExists{babel-#1.tex}% 
+           {\DeclareOption{#1}{%  
+              \bbl at ldfinit
+              \babelprovide[import]{#1}%
+              \bbl at afterldf{}}}%
+           {}%
+       \fi}%
+    {}%
+  \fi}
 %    \end{macrocode}
 %
 % And we are done, because all options for this pass has been
@@ -12237,8 +12209,7 @@
 % ignored.
 %
 % The options have to be processed in the order in which the user
-% specified them (except, of course, global options, which \LaTeX{}
-% processes before):
+% specified them (but remember class options are processes before):
 %
 %    \begin{macrocode}
 \def\AfterBabelLanguage#1{%
@@ -12247,12 +12218,14 @@
 \ProcessOptions*
 %    \end{macrocode}
 %
-% This finished the second pass. Now the third one begins, which
-% loads the main language set with the key |main|. A warning is
-% raised if the main language is not the same as the last named
-% one, or if the value of the key |main| is not a language. Then
-% execute directly the option (because it could be used only in
-% |main|). After loading all languages, we deactivate
+% This finished the second pass. Now the third one begins, which loads
+% the main language set with the key |main|. A warning is raised if the
+% main language is not the same as the last named one, or if the value
+% of the key |main| is not a language. With some options in |provide|,
+% the package |luatexbase| is loaded (and immediately used), and
+% therefore |\babelprovide| can’t go inside a |\DeclareOption|; this
+% explains why it’s executed directly, with a dummy declaration. Then
+% all languages have been loaded, so we deactivate
 % |\AfterBabelLanguage|.
 %
 %    \begin{macrocode}
@@ -12271,32 +12244,27 @@
       but the last processed one was '\bbl at tempb'.\\%
       The main language can't be set as both a global\\%
       and a package option. Use 'main=\bbl at tempc' as\\%
-      option. Reported}%
+      option. Reported}
   \fi
 \else
-  \ifodd\bbl at iniflag  % case 1,3
+  \ifodd\bbl at iniflag  % case 1,3 (main is ini)
     \bbl at ldfinit
     \let\CurrentOption\bbl at opt@main
-    \ifx\bbl at opt@provide\@nnil
-      \bbl at exp{\\\babelprovide[import,main]{\bbl at opt@main}}%
+    \bbl at exp{%  \bbl at opt@provide = empty if *
+       \\\babelprovide[\bbl at opt@provide,import,main]{\bbl at opt@main}}%
+    \bbl at afterldf{}
+    \DeclareOption{\bbl at opt@main}{}
+  \else % case 0,2 (main is ldf)
+    \ifx\bbl at loadmain\relax
+      \DeclareOption{\bbl at opt@main}{\bbl at load@language{\bbl at opt@main}}
     \else
-      \bbl at exp{\\\bbl at forkv{\@nameuse{@raw at opt@babel.sty}}}{%
-        \bbl at xin@{,provide,}{,#1,}%
-        \ifin@
-          \def\bbl at opt@provide{#2}%
-          \bbl at replace\bbl at opt@provide{;}{,}%
-        \fi}%
-      \bbl at exp{%
-        \\\babelprovide[\bbl at opt@provide,import,main]{\bbl at opt@main}}%
+      \DeclareOption{\bbl at opt@main}{\bbl at loadmain}
     \fi
-    \bbl at afterldf{}%
-  \else % case 0,2
-    \chardef\bbl at iniflag\z@  % Force ldf 
-    \expandafter\let\csname ds@\bbl at opt@main\endcsname\bbl at loadmain
     \ExecuteOptions{\bbl at opt@main}
-    \DeclareOption*{}%
-    \ProcessOptions*
+    \@namedef{ds@\bbl at opt@main}{}%
   \fi
+  \DeclareOption*{}
+  \ProcessOptions*
 \fi
 \def\AfterBabelLanguage{%
   \bbl at error
@@ -12304,10 +12272,9 @@
     {Languages have been loaded, so I can do nothing}}
 %    \end{macrocode}
 %      
-% In order to catch the case where the user forgot to specify a
+% In order to catch the case where the user didn’t specify a
 % language we check whether |\bbl at main@language|, has become
-% defined. If not, no language has been loaded and an error
-% message is displayed.
+% defined. If not, the |nil| language is loaded.
 %
 %    \begin{macrocode}
 \ifx\bbl at main@language\@undefined
@@ -14516,6 +14483,10 @@
   \frozen at everydisplay\expandafter{%
     \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
 \fi
+\def\bbl at truellap{%s
+  \ifcase\bbl at attr@dir\expandafter\llap\else\expandafter\rlap\fi}
+\def\bbl at truerlap{%
+  \ifcase\bbl at attr@dir\expandafter\rlap\else\expandafter\llap\fi}
 %    \end{macrocode}
 %
 % \subsection{Layout}
@@ -14543,11 +14514,37 @@
 %
 %    \begin{macrocode}
 \bbl at trace{Redefinitions for bidi layout}
+\AtBeginDocument{% amsmath
+  \ifx\place at tag\@undefined\else
+    \bbl at sreplace\place at tag{\llap}{\bbl at truellap}%
+    \bbl at sreplace\place at tag@gather{\llap}{\bbl at truellap}%
+    \bbl at sreplace\place at tag{\rlap}{\bbl at truerlap}%
+    \bbl at sreplace\place at tag@gather{\rlap}{\bbl at truerlap}%
+  \fi}
+\ifx\AddToHook\@undefined\else
+  \AddToHook{env/equation/before}{\pardir TLT }{}
+\fi
 \ifx\@eqnnum\@undefined\else
   \ifx\bbl at attr@dir\@undefined\else
-    \edef\@eqnnum{{%
-      \unexpanded{\ifcase\bbl at attr@dir\else\bbl at textdir\@ne\fi}%
-      \unexpanded\expandafter{\@eqnnum}}}
+    \bbl at xin@{,leqno,}{,\@classoptionslist,}%
+    \ifin@
+      \bbl at sreplace\@eqnnum{\rlap}{\bbl at leqno@aux}
+      \def\bbl at leqno@aux#1{%
+        \bbl at truerlap{%
+          \ifcase\bbl at attr@dir
+            #1%
+          \else
+            \bbl at textdir\@ne
+            #1%
+            \hskip-\displaywidth
+          \fi}}
+    \else
+      \bbl at exp{%
+        \def\\\@eqnnum{{%
+          \<ifcase>\\\bbl at attr@dir\<else>\\\bbl at textdir\@ne\<fi>%
+          \\\bbl at ifsamestring{\\\@currenvir}{equation}%
+             {}{\\\bbl at truellap}{\[@eqnnum]}}}}
+    \fi
   \fi
 \fi
 \ifx\bbl at opt@layout\@nnil\endinput\fi  % if no layout
@@ -21854,7 +21851,7 @@
 
     elseif item.id == DIR then
       d = nil
-      new_d = true
+      if head ~= item then new_d = true end
 
     elseif item.id == node.id'glue' and item.subtype == 13 then
       glue_d = d

Modified: trunk/Master/texmf-dist/source/latex/babel/babel.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/source/latex/babel/babel.ins	2021-12-28 22:51:15 UTC (rev 61433)
@@ -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/29}
+\def\filedate{2021/12/28}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 

Modified: trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/source/latex/babel/bbcompat.dtx	2021-12-28 22:51:15 UTC (rev 61433)
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/11/29 v3.67]
+\ProvidesFile{bbcompat.dtx}[2021/12/28 v3.68]
 %</dtx>
 %
 %% File 'bbcompat.dtx'

Modified: trunk/Master/texmf-dist/source/latex/babel/locale.zip
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua	2021-12-28 22:51:15 UTC (rev 61433)
@@ -209,7 +209,7 @@
 
     elseif item.id == DIR then
       d = nil
-      new_d = true
+      if head ~= item then new_d = true end
 
     elseif item.id == node.id'glue' and item.subtype == 13 then
       glue_d = d

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.def	2021-12-28 22:51:15 UTC (rev 61433)
@@ -40,7 +40,7 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{babel.def}[2021/11/29 3.67 Babel common definitions]
+\ProvidesFile{babel.def}[2021/12/28 3.68 Babel common definitions]
 \ifx\AtBeginDocument\@undefined  % TODO. change test.
   \def\@empty{}
 \def\loadlocalcfg#1{%
@@ -406,8 +406,8 @@
 \expandafter\newif\csname ifbbl at single\endcsname
 \chardef\bbl at bidimode\z@
 \fi
-\def\bbl at version{3.67}
-\def\bbl at date{2021/11/29}
+\def\bbl at version{3.68}
+\def\bbl at date{2021/12/28}
 \ifx\language\@undefined
   \csname newcount\endcsname\language
 \fi
@@ -2927,8 +2927,8 @@
   \ifeof\bbl at readstream
     \bbl at error
       {There is no ini file for the requested language\\%
-       (#1). Perhaps you misspelled it or your installation\\%
-       is not complete.}%
+       (#1: \languagename). Perhaps you misspelled it or your\\%
+       installation is not complete.}%
       {Fix the name or reinstall babel.}%
   \else
     % == Store ini data in \bbl at inidata ==

Modified: trunk/Master/texmf-dist/tex/generic/babel/babel.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/babel.sty	2021-12-28 22:51:15 UTC (rev 61433)
@@ -34,7 +34,7 @@
 %%
 
 \NeedsTeXFormat{LaTeX2e}[2005/12/01]
-\ProvidesPackage{babel}[2021/11/29 3.67 The Babel package]
+\ProvidesPackage{babel}[2021/12/28 3.68 The Babel package]
 \@ifpackagewith{babel}{debug}
   {\providecommand\bbl at trace[1]{\message{^^J[ #1 ]}}%
    \let\bbl at debug\@firstofone
@@ -441,11 +441,6 @@
 \ifx\bbl at opt@safe\@undefined
   \def\bbl at opt@safe{BR}
 \fi
-\ifx\bbl at opt@main\@nnil\else
-  \edef\bbl at language@opts{%
-    \ifx\bbl at language@opts\@empty\else\bbl at language@opts,\fi
-      \bbl at opt@main}
-\fi
 \bbl at trace{Defining IfBabelLayout}
 \ifx\bbl at opt@layout\@nnil
   \newcommand\IfBabelLayout[3]{#3}%
@@ -458,8 +453,8 @@
       \expandafter\@secondoftwo
     \fi}
 \fi
-\def\bbl at version{3.67}
-\def\bbl at date{2021/11/29}
+\def\bbl at version{3.68}
+\def\bbl at date{2021/12/28}
 \ifx\language\@undefined
   \csname newcount\endcsname\language
 \fi
@@ -2979,8 +2974,8 @@
   \ifeof\bbl at readstream
     \bbl at error
       {There is no ini file for the requested language\\%
-       (#1). Perhaps you misspelled it or your installation\\%
-       is not complete.}%
+       (#1: \languagename). Perhaps you misspelled it or your\\%
+       installation is not complete.}%
       {Fix the name or reinstall babel.}%
   \else
     % == Store ini data in \bbl at inidata ==
@@ -4202,79 +4197,57 @@
        Local config file '\bbl at opt@config.cfg' not found}{%
        Perhaps you misspelled it.}}%
 \fi
-\let\bbl at tempc\relax
+\ifx\bbl at opt@main\@nnil
+  \ifnum\bbl at iniflag>\z@  % if all ldf's: set implicitly, no main pass
+    \let\bbl at tempb\@empty
+    \edef\bbl at tempa{\@classoptionslist,\bbl at language@opts}%
+    \bbl at foreach\bbl at tempa{\edef\bbl at tempb{#1,\bbl at tempb}}%
+    \bbl at foreach\bbl at tempb{%    \bbl at tempb is a reversed list
+      \ifx\bbl at opt@main\@nnil % ie, if not yet assigned
+        \ifodd\bbl at iniflag % = *=
+          \IfFileExists{babel-#1.tex}{\def\bbl at opt@main{#1}}{}%
+        \else % n +=
+          \IfFileExists{#1.ldf}{\def\bbl at opt@main{#1}}{}%
+        \fi
+      \fi}%
+  \fi
+\fi
+\ifx\bbl at opt@main\@nnil\else
+  \bbl at csarg\let{loadmain\expandafter}\csname ds@\bbl at opt@main\endcsname
+  \expandafter\let\csname ds@\bbl at opt@main\endcsname\relax
+\fi
 \bbl at foreach\bbl at language@opts{%
-  \ifcase\bbl at iniflag  % Default
+  \def\bbl at tempa{#1}%
+  \ifx\bbl at tempa\bbl at opt@main\else
     \bbl at ifunset{ds@#1}%
-      {\DeclareOption{#1}{\bbl at load@language{#1}}}%
-      {}%
-  \or    % provide=*
-    \@gobble % case 2 same as 1
-  \or    % provide+=*
-    \bbl at ifunset{ds@#1}%
-      {\IfFileExists{#1.ldf}{}%
-        {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}%
-      {}%
-    \bbl at ifunset{ds@#1}%
-      {\def\bbl at tempc{#1}%
-       \DeclareOption{#1}{%
-         \ifnum\bbl at iniflag>\@ne
+      {\ifnum\bbl at iniflag<\tw@    % 0 ø (other = ldf)
+         \DeclareOption{#1}{\bbl at load@language{#1}}%
+       \else                      % + * (other = ini)
+         \DeclareOption{#1}{%
            \bbl at ldfinit
            \babelprovide[import]{#1}%
-           \bbl at afterldf{}%
-         \else
-           \bbl at load@language{#1}%
-         \fi}}%
+           \bbl at afterldf{}}%
+       \fi}%
       {}%
-  \or    % provide*=*
-    \def\bbl at tempc{#1}%
+  \fi}
+\bbl at foreach\@classoptionslist{%
+  \def\bbl at tempa{#1}%
+  \ifx\bbl at tempa\bbl at opt@main\else
     \bbl at ifunset{ds@#1}%
-      {\DeclareOption{#1}{%
-         \bbl at ldfinit
-         \babelprovide[import]{#1}%
-         \bbl at afterldf{}}}%
-      {}%
+      {\ifnum\bbl at iniflag<\tw@    % 0 ø (other = ldf)
+         \IfFileExists{#1.ldf}%
+           {\DeclareOption{#1}{\bbl at load@language{#1}}}%
+           {}%
+       \else                      % + * (other = ini)
+         \IfFileExists{babel-#1.tex}%
+           {\DeclareOption{#1}{%
+              \bbl at ldfinit
+              \babelprovide[import]{#1}%
+              \bbl at afterldf{}}}%
+           {}%
+       \fi}%
+    {}%
   \fi}
-\let\bbl at tempb\@nnil
-\let\bbl at clsoptlst\@classoptionslist
-\bbl at foreach\@classoptionslist{%
-  \bbl at ifunset{ds@#1}%
-    {\IfFileExists{#1.ldf}%
-      {\def\bbl at tempb{#1}%
-       \DeclareOption{#1}{%
-         \ifnum\bbl at iniflag>\@ne
-           \bbl at ldfinit
-           \babelprovide[import]{#1}%
-           \bbl at afterldf{}%
-         \else
-           \bbl at load@language{#1}%
-         \fi}}%
-      {\IfFileExists{babel-#1.tex}%
-        {\def\bbl at tempb{#1}%
-         \ifnum\bbl at iniflag>\z@
-           \DeclareOption{#1}{%
-             \ifnum\bbl at iniflag>\@ne
-               \bbl at ldfinit
-               \babelprovide[import]{#1}%
-               \bbl at afterldf{}%
-             \fi}%
-         \fi}%
-         {}}}%
-    {}}
-\ifnum\bbl at iniflag=\z@\else
-  \ifx\bbl at opt@main\@nnil
-    \ifx\bbl at tempc\relax
-      \let\bbl at opt@main\bbl at tempb
-    \else
-      \let\bbl at opt@main\bbl at tempc
-    \fi
-  \fi
-\fi
-\ifx\bbl at opt@main\@nnil\else
-  \expandafter
-  \let\expandafter\bbl at loadmain\csname ds@\bbl at opt@main\endcsname
-  \expandafter\let\csname ds@\bbl at opt@main\endcsname\@empty
-\fi
 \def\AfterBabelLanguage#1{%
   \bbl at ifsamestring\CurrentOption{#1}{\global\bbl at add\bbl at afterlang}{}}
 \DeclareOption*{}
@@ -4294,32 +4267,27 @@
       but the last processed one was '\bbl at tempb'.\\%
       The main language can't be set as both a global\\%
       and a package option. Use 'main=\bbl at tempc' as\\%
-      option. Reported}%
+      option. Reported}
   \fi
 \else
-  \ifodd\bbl at iniflag  % case 1,3
+  \ifodd\bbl at iniflag  % case 1,3 (main is ini)
     \bbl at ldfinit
     \let\CurrentOption\bbl at opt@main
-    \ifx\bbl at opt@provide\@nnil
-      \bbl at exp{\\\babelprovide[import,main]{\bbl at opt@main}}%
+    \bbl at exp{%  \bbl at opt@provide = empty if *
+       \\\babelprovide[\bbl at opt@provide,import,main]{\bbl at opt@main}}%
+    \bbl at afterldf{}
+    \DeclareOption{\bbl at opt@main}{}
+  \else % case 0,2 (main is ldf)
+    \ifx\bbl at loadmain\relax
+      \DeclareOption{\bbl at opt@main}{\bbl at load@language{\bbl at opt@main}}
     \else
-      \bbl at exp{\\\bbl at forkv{\@nameuse{@raw at opt@babel.sty}}}{%
-        \bbl at xin@{,provide,}{,#1,}%
-        \ifin@
-          \def\bbl at opt@provide{#2}%
-          \bbl at replace\bbl at opt@provide{;}{,}%
-        \fi}%
-      \bbl at exp{%
-        \\\babelprovide[\bbl at opt@provide,import,main]{\bbl at opt@main}}%
+      \DeclareOption{\bbl at opt@main}{\bbl at loadmain}
     \fi
-    \bbl at afterldf{}%
-  \else % case 0,2
-    \chardef\bbl at iniflag\z@  % Force ldf
-    \expandafter\let\csname ds@\bbl at opt@main\endcsname\bbl at loadmain
     \ExecuteOptions{\bbl at opt@main}
-    \DeclareOption*{}%
-    \ProcessOptions*
+    \@namedef{ds@\bbl at opt@main}{}%
   \fi
+  \DeclareOption*{}
+  \ProcessOptions*
 \fi
 \def\AfterBabelLanguage{%
   \bbl at error

Modified: trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/hyphen.cfg	2021-12-28 22:51:15 UTC (rev 61433)
@@ -38,10 +38,10 @@
     \wlog{File: #1 #4 #3 <#2>}%
     \let\ProvidesFile\@undefined}
 \fi
-\ProvidesFile{hyphen.cfg}[2021/11/29 3.67 Babel hyphens]
+\ProvidesFile{hyphen.cfg}[2021/12/28 3.68 Babel hyphens]
 \xdef\bbl at format{\jobname}
-\def\bbl at version{3.67}
-\def\bbl at date{2021/11/29}
+\def\bbl at version{3.68}
+\def\bbl at date{2021/12/28}
 \ifx\AtBeginDocument\@undefined
   \def\@empty{}
 \fi

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini	2021-12-28 22:51:15 UTC (rev 61433)
@@ -12,8 +12,8 @@
 
 [identification]
 charset = utf8
-version = 1.9
-date = 2021-06-25
+version = 1.10
+date = 2021-12-13
 name.local = অসমীয়া
 name.english = Assamese
 name.babel = assamese
@@ -116,7 +116,7 @@
 lefthyphenmin = 
 righthyphenmin = 
 hyphenchar = 
-prehyphenchar = 0
+prehyphenchar =
 posthyphenchar = 
 exhyphenchar = 
 preexhyphenchar = 

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini	2021-12-28 22:51:15 UTC (rev 61433)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.9
-date = 2021-06-25
+version = 1.10
+date = 2021-12-13
 name.local = বাংলা
 name.english = Bangla
 name.babel = bengali
@@ -116,7 +116,7 @@
 lefthyphenmin = 2
 righthyphenmin = 2
 hyphenchar = 
-prehyphenchar = 0
+prehyphenchar = 
 posthyphenchar = 
 exhyphenchar = 
 preexhyphenchar = 

Modified: trunk/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini	2021-12-28 22:51:15 UTC (rev 61433)
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.8
-date = 2021-06-25
+version = 1.9
+date = 2021-12-13
 name.local = ગુજરાતી
 name.english = Gujarati
 name.babel = gujarati
@@ -138,7 +138,7 @@
 lefthyphenmin = 
 righthyphenmin = 
 hyphenchar = 
-prehyphenchar = 0
+prehyphenchar =
 posthyphenchar = 
 exhyphenchar = 
 preexhyphenchar = 

Modified: trunk/Master/texmf-dist/tex/generic/babel/luababel.def
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/luababel.def	2021-12-28 22:51:15 UTC (rev 61433)
@@ -1334,12 +1334,42 @@
   \frozen at everydisplay\expandafter{%
     \expandafter\bbl at mathboxdir\the\frozen at everydisplay}
 \fi
+\def\bbl at truellap{%s
+  \ifcase\bbl at attr@dir\expandafter\llap\else\expandafter\rlap\fi}
+\def\bbl at truerlap{%
+  \ifcase\bbl at attr@dir\expandafter\rlap\else\expandafter\llap\fi}
 \bbl at trace{Redefinitions for bidi layout}
+\AtBeginDocument{% amsmath
+  \ifx\place at tag\@undefined\else
+    \bbl at sreplace\place at tag{\llap}{\bbl at truellap}%
+    \bbl at sreplace\place at tag@gather{\llap}{\bbl at truellap}%
+    \bbl at sreplace\place at tag{\rlap}{\bbl at truerlap}%
+    \bbl at sreplace\place at tag@gather{\rlap}{\bbl at truerlap}%
+  \fi}
+\ifx\AddToHook\@undefined\else
+  \AddToHook{env/equation/before}{\pardir TLT }{}
+\fi
 \ifx\@eqnnum\@undefined\else
   \ifx\bbl at attr@dir\@undefined\else
-    \edef\@eqnnum{{%
-      \unexpanded{\ifcase\bbl at attr@dir\else\bbl at textdir\@ne\fi}%
-      \unexpanded\expandafter{\@eqnnum}}}
+    \bbl at xin@{,leqno,}{,\@classoptionslist,}%
+    \ifin@
+      \bbl at sreplace\@eqnnum{\rlap}{\bbl at leqno@aux}
+      \def\bbl at leqno@aux#1{%
+        \bbl at truerlap{%
+          \ifcase\bbl at attr@dir
+            #1%
+          \else
+            \bbl at textdir\@ne
+            #1%
+            \hskip-\displaywidth
+          \fi}}
+    \else
+      \bbl at exp{%
+        \def\\\@eqnnum{{%
+          \<ifcase>\\\bbl at attr@dir\<else>\\\bbl at textdir\@ne\<fi>%
+          \\\bbl at ifsamestring{\\\@currenvir}{equation}%
+             {}{\\\bbl at truellap}{\[@eqnnum]}}}}
+    \fi
   \fi
 \fi
 \ifx\bbl at opt@layout\@nnil\endinput\fi  % if no layout

Modified: trunk/Master/texmf-dist/tex/generic/babel/nil.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-12-28 22:49:47 UTC (rev 61432)
+++ trunk/Master/texmf-dist/tex/generic/babel/nil.ldf	2021-12-28 22:51:15 UTC (rev 61433)
@@ -33,7 +33,7 @@
 %% extension |.ins|) which are part of the distribution.
 %%
 
-\ProvidesLanguage{nil}[2021/11/29 3.67 Nil language]
+\ProvidesLanguage{nil}[2021/12/28 3.68 Nil language]
 \LdfInit{nil}{datenil}
 \ifx\l at nil\@undefined
   \newlanguage\l at nil



More information about the tex-live-commits mailing list.