[latex3-commits] [git/LaTeX3-latex3-babel] main: Fixes for amsmath: indent after environments; some wrong dirs in text. (f0a6e8b)

Javier email at dante.de
Thu Feb 10 18:29:26 CET 2022


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

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

commit f0a6e8b0ad01fee2a6b16a6232b876d638548e70
Author: Javier <email at localhost>
Date:   Thu Feb 10 18:29:26 2022 +0100

    Fixes for amsmath: indent after environments; some wrong dirs in text.


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

f0a6e8b0ad01fee2a6b16a6232b876d638548e70
 README.md                   |  10 +--
 babel.dtx                   | 153 ++++++++++++++++++++++++--------------------
 babel.ins                   |   2 +-
 babel.pdf                   | Bin 854630 -> 855033 bytes
 bbcompat.dtx                |   2 +-
 locale/sa/babel-sa-Deva.ini |   2 +-
 6 files changed, 90 insertions(+), 79 deletions(-)

diff --git a/README.md b/README.md
index eb4da9f..639011f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.70.2639
+## Babel 3.70.2644
 
 (Development.)
 
@@ -10,9 +10,9 @@ is a set of ini files for about 250 languages.
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.70 are described in:
+Changes in version 3.71 are described in:
 
-https://latex3.github.io/babel/news/whats-new-in-babel-3.70.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.71.html
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -48,14 +48,14 @@ respective authors.
 
 ### Summary of Latest changes
 ```
-3.71   2022-02-?? (dev)
+3.71   2022-02-14?? (dev)
+       * IAST transliteration for Sanskrit (by Maximilian Mehner).
        * Fixes:
          - Bad interraction between bidi option and mathtools (#166).
          - 'provide+=' didn’t work with 'hebrew' as a secondary
            language.
          - Wrong equation direction in 'cases' and 'array' (#167).
 
-
 3.70   2022-01-26
        * Finnish: transform 'prehyphen.nobreak'.
        * Better fixes for amsmath, as well as for the default
diff --git a/babel.dtx b/babel.dtx
index cda0061..84bb301 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2022/02/05 v3.70.2639 The Babel package]
+\ProvidesFile{babel.dtx}[2022/02/10 v3.70.2644 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -3449,15 +3449,16 @@ differ in the way `weak' numeric characters are ordered (eg, Arabic
 
 \begin{warning}
   The current code for \textbf{text} in \luatex{} should be considered
-  essentially stable, but, of course, it is not bug-free and there
-  can be improvements in the future, because setting bidi text has
-  many subtleties (see for example <https://www.w3.org/TR/html-bidi/>).
-  A basic stable version for other engines must wait. This applies to
+  essentially stable, but, of course, it is not bug-free and there can
+  be improvements in the future, because setting bidi text has many
+  subtleties (see for example <https://www.w3.org/TR/html-bidi/>). A
+  basic stable version for other engines must wait. This applies to
   text; there is a basic support for \textbf{graphical} elements,
   including the |picture| environment (with \textsf{pict2e}) and
   \textsf{pfg/tikz}. Also, indexes and the like are under study, as
-  well as math (there is progress in the latter, too, but for
-  example |cases| may fail).
+  well as math (there are progresses in the latter, including
+  \textsf{amsmath} and \textsf{mathtools} too, but for example
+  |gathered| may fail).
 
   An effort is being made to avoid incompatibilities in the future
   (this one of the reason currently bidi must be explicitly requested
@@ -5122,8 +5123,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.70.2639>>
-%<<date=2022/02/05>>
+%<<version=3.70.2644>>
+%<<date=2022/02/10>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -14485,9 +14486,11 @@ end
       #2 TRT\relax
     \fi
   \fi}
+\def\bbl at thedir{0}
 \def\bbl at textdir#1{%
   \bbl at setluadir{text}\textdir{#1}%
   \chardef\bbl at thetextdir#1\relax
+  \edef\bbl at thedir{\the\numexpr\bbl at thepardir*3+#1}%
   \setattribute\bbl at attr@dir{\numexpr\bbl at thepardir*3+#1}}
 \def\bbl at pardir#1{%
   \bbl at setluadir{par}\pardir{#1}%
@@ -14522,7 +14525,11 @@ end
           if Babel.hlist_has_bidi(head) then
             local d = node.new(node.id'dir')
             d.dir = '+TRT'
-            node.insert_before(head, head, d)
+            node.insert_before(head, node.has_glyph(head), d)
+            for item in node.traverse(head) do
+              node.set_attribute(item,
+                Babel.attr_dir, token.get_macro('bbl at thedir'))
+            end
           end
         end
         return head
@@ -14558,6 +14565,7 @@ end
 %
 %    \begin{macrocode}
 \bbl at trace{Redefinitions for bidi layout}
+\def\BabelNoAMSMath{\let\bbl at noamsmath\relax}
 \ifnum\bbl at bidimode>\z@
   \let\bbl at eqnodir\relax
   \AtBeginDocument{%
@@ -14582,67 +14590,70 @@ end
           \hbox to0.01pt{\hss\hbox to\displaywidth{\box\z@\hss}}}%
       \fi
     \else % amstex
-      \edef\bbl at tempa{%
-        \catcode58=\the\catcode58\relax
-        \catcode95=\the\catcode95\relax}%  
-      \catcode58=11
-      \catcode95=11
-      \bbl at sreplace\intertext@{\normalbaselines}%
-        {\normalbaselines
-         \ifx\bbl at eqnodir\relax\else\bbl at pardir\@ne\bbl at textdir\@ne\fi}%
-      \bbl at tempa
-      \def\bbl at ams@tagbox#1#2{#1{\bbl at eqnodir#2}}% #1=\hbox|ams at lap
-      \def\bbl at ams@eqtagbox#1{%
-        \setbox\z@\hbox{\bbl at eqnodir#1}%
-        \hbox to 0.01pt{%
-          \ifx\bbl at ams@lap\hbox
-            \hss\hbox to\displaywidth{\box\z@\hss}%
-          \else
-            \hbox to\displaywidth{\hss\box\z@}\hss
-          \fi}}
-      \def\bbl at ams@preset#1{%
-        \ifnum\bbl at thetextdir>\z@
-          \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
-          \chardef\bbl at thetextdir\z@
-          \bbl at sreplace\textdef@{\hbox}{\bbl at ams@tagbox\hbox}%
-          \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@tagbox#1}%
-        \fi}
-      \@ifpackagewith{amsmath}{leqno}%
-        {\let\bbl at ams@lap\hbox}% = leqno
-        {\let\bbl at ams@lap\llap}% = default
-      % Not required?: split, alignat
-      \AddToHook{env/cases/begin}{\bbl at ams@preset\bbl at ams@lap}%
-      \AddToHook{env/multline/begin}{\bbl at ams@preset\hbox}%
-      \AddToHook{env/gather/begin}{\bbl at ams@preset\bbl at ams@lap}%
-      \AddToHook{env/gather*/begin}{\bbl at ams@preset\bbl at ams@lap}%
-      \AddToHook{env/align/begin}{\bbl at ams@preset\bbl at ams@lap}%
-      \AddToHook{env/align*/begin}{\bbl at ams@preset\bbl at ams@lap}%
-      % Hackish, for proper alignment-don’t ask me why it works! :-)
-      \bbl at exp{%
-        \\\AddToHook{env/align*/end}{\<iftag@>\<else>\\\tag*{}\<fi>}}%
-      \AddToHook{env/flalign/begin}{\bbl at ams@preset\hbox}%
-      \AddToHook{env/split/before}{%
-        \def\bbl at tempa{equation}%
-        \ifx\@currenvir\bbl at tempa
-          \def\bbl at ams@eqtagbox#1{%
-            \setbox\z@\hbox{\bbl at eqnodir#1}%
-            \hbox to\wd\z@{\box\z@}}%
-        \fi}
-      \AddToHook{env/equation/begin}{%
-        \bbl at add\ignorespacesafterend{\hrule\@height\z@}%
-        \ifnum\bbl at thetextdir>\z@
-          \ifx\bbl at ams@lap\llap\hrule\@height\z@\fi        
-          \def\bbl at eqnodir{\bbl at textdir\@ne}%
-          \bbl at textdir\z@
-          \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@eqtagbox}%
-        \fi}%
-      \AddToHook{env/equation*/begin}{%
-        \bbl at add\ignorespacesafterend{\hrule\@height\z@}%
-        \ifnum\bbl at thetextdir>\z@            
-          \def\bbl at eqnodir{\bbl at textdir\@ne}%
-          \bbl at textdir\z@
-          \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@eqtagbox}%
-        \fi}%
+      \ifx\bbl at noamsmath\@undefined
+        \edef\bbl at tempa{%
+          \catcode58=\the\catcode58\relax
+          \catcode95=\the\catcode95\relax}%
+        \catcode58=11
+        \catcode95=11
+        \bbl at sreplace\intertext@{\normalbaselines}%
+          {\normalbaselines
+           \ifx\bbl at eqnodir\relax\else\bbl at pardir\@ne\bbl at eqnodir\fi}%
+        \bbl at tempa
+        \def\bbl at ams@tagbox#1#2{#1{\bbl at eqnodir#2}}% #1=\hbox|ams at lap
+        \def\bbl at ams@eqtagbox#1{%
+          \setbox\z@\hbox{\bbl at eqnodir#1}%
+          \hbox to 0.01pt{%
+            \ifx\bbl at ams@lap\hbox
+              \hbox to\displaywidth{\hss\box\z@}\hss
+            \else
+              \hss\hbox to\displaywidth{\box\z@\hss}%
+            \fi}}
+        \def\bbl at ams@preset#1{%
+          \ifnum\bbl at thetextdir>\z@
+            \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
+            \chardef\bbl at thetextdir\z@
+            \bbl at sreplace\textdef@{\hbox}{\bbl at ams@tagbox\hbox}%
+            \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@tagbox#1}%
+          \fi}
+        \@ifpackagewith{amsmath}{leqno}%
+          {\let\bbl at ams@lap\hbox}% = leqno
+          {\let\bbl at ams@lap\llap}% = default
+        % 
+        \AddToHook{env/cases/begin}{\bbl at ams@preset\bbl at ams@lap}%
+        \AddToHook{env/multline/begin}{\bbl at ams@preset\hbox}%
+        \AddToHook{env/gather/begin}{\bbl at ams@preset\bbl at ams@lap}%
+        \AddToHook{env/gather*/begin}{\bbl at ams@preset\bbl at ams@lap}%
+        \AddToHook{env/align/begin}{\bbl at ams@preset\bbl at ams@lap}%
+        \AddToHook{env/align*/begin}{\bbl at ams@preset\bbl at ams@lap}%
+        % Hackish, for proper alignment-don’t ask me why it works! :-)
+        \bbl at exp{%
+          \\\AddToHook{env/align*/end}{\<iftag@>\<else>\\\tag*{}\<fi>}}%
+        \AddToHook{env/flalign/begin}{\bbl at ams@preset\hbox}%
+        \AddToHook{env/split/before}{%
+          \ifnum\bbl at thetextdir>\z@
+            \def\bbl at tempa{equation}%
+            \ifx\@currenvir\bbl at tempa
+              \def\bbl at ams@eqtagbox#1{%
+                \ifx\bbl at ams@lap\hbox
+                  \hbox to0.01pt{\hss\bbl at eqnodir#1}% leqno
+                \else
+                  \hbox to0.01pt{\bbl at eqnodir#1\hss}% eqno
+                \fi}
+            \fi
+          \fi}
+        \AddToHook{env/equation/begin}{%
+          \ifnum\bbl at thetextdir>\z@
+            \ifx\bbl at ams@lap\llap\hrule\@height\z@\fi
+            \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
+            \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@eqtagbox}%
+          \fi}%
+        \AddToHook{env/equation*/begin}{%
+          \ifnum\bbl at thetextdir>\z@
+            \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
+            \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@eqtagbox}%
+          \fi}%
+        \fi
       \fi}
 \fi
 \ifx\bbl at opt@layout\@nnil\endinput\fi  % if no layout
diff --git a/babel.ins b/babel.ins
index 91abd82..37a204d 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/02/05}
+\def\filedate{2022/02/10}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 07334e7..9c2863e 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 068dcb5..954024b 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/02/05 v3.70.2639]
+\ProvidesFile{bbcompat.dtx}[2022/02/10 v3.70.2644]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/locale/sa/babel-sa-Deva.ini b/locale/sa/babel-sa-Deva.ini
index 56c9ffa..af9b9fb 100644
--- a/locale/sa/babel-sa-Deva.ini
+++ b/locale/sa/babel-sa-Deva.ini
@@ -12,7 +12,7 @@
 [identification]
 charset = utf8
 version = 0.12
-date = 2022-02-05
+date = 2022-02-06
 name.local = संस्कृत
 name.english = Sanskrit
 name.babel = sanskrit





More information about the latex3-commits mailing list.