[latex3-commits] [git/LaTeX3-latex3-babel] main: New fixes for amsmath and the default math displays (lua). (c04dcf5)
Javier
email at dante.de
Wed Jan 19 18:02:34 CET 2022
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/c04dcf5ba728b8974d1a2b7b35642c5c1dfa72ed
>---------------------------------------------------------------
commit c04dcf5ba728b8974d1a2b7b35642c5c1dfa72ed
Author: Javier <email at localhost>
Date: Wed Jan 19 18:02:34 2022 +0100
New fixes for amsmath and the default math displays (lua).
* But still not perfect: some wrong vertical and horizontal skips.
>---------------------------------------------------------------
c04dcf5ba728b8974d1a2b7b35642c5c1dfa72ed
README.md | 9 ++--
babel.dtx | 147 +++++++++++++++++++++++++++++++----------------------------
babel.ins | 2 +-
babel.pdf | Bin 862296 -> 863260 bytes
bbcompat.dtx | 2 +-
5 files changed, 85 insertions(+), 75 deletions(-)
diff --git a/README.md b/README.md
index bbb2de2..34fdee5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.69.2610
+## Babel 3.69.2622
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -8,9 +8,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.69 are described in:
+Changes in version 3.70 are described in:
-https://latex3.github.io/babel/news/whats-new-in-babel-3.69.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.70.html
Apart from the manual, you can find information on some aspects of babel at:
@@ -48,7 +48,8 @@ respective authors.
```
3.70 2022-01-?? (dev)
* Finnish: transform 'prehyphen.nobreak'.
- * Fixes for amsmath (in progress).
+ * Better fixes for amsmath, as well as for the default
+ 'equation' and 'eqnarray' (but still not perfect).
3.69 2021-12-30
* Fixes a severe bug with amsmath and mathtools introduced in
diff --git a/babel.dtx b/babel.dtx
index a1fe82d..0dd21b9 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2022/01/07 v3.69.2610 The Babel package]
+\ProvidesFile{babel.dtx}[2022/01/19 v3.69.2622 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -5119,8 +5119,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.69.2610>>
-%<<date=2022/01/07>>
+%<<version=3.69.2622>>
+%<<date=2022/01/19>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -14516,76 +14516,85 @@ end
% \begin{macrocode}
\bbl at trace{Redefinitions for bidi layout}
\ifnum\bbl at bidimode>\z@
-% \iffalse
+ \let\bbl at eqnodir\relax
\AtBeginDocument{%
- \ifx\maketag@@@\@undefined\else
- \let\@eqnnum\bbl at savedeqnnum
- \bbl at sreplace\intertext@{\normalbaselines}%
- {\normalbaselines
- \bbl at ifunset{bbl at outertextdir}{}{\bbl at pardir\@ne\bbl at textdir\@ne}}
- \def\bbl at ams@tagbox#1#2{% #1=\hbox|\bbl at ams@lap
- \bbl at ifunset{bbl at outertextdir}%
- {#1{#2}}%
- {#1{\bbl at textdir\bbl at outertextdir#2}}}
- \def\bbl at ams@eqtagbox#1{%
- \bbl at ifunset{bbl at outertextdir}%
- {\hbox to 0.01pt{%
- \ifx\bbl at ams@lap\hbox
- \expandafter\rlap\else\expandafter\llap\fi{#1}}}%
- {\hbox to 0.01pt{%
- \hskip\ifx\bbl at ams@lap\hbox-\fi\displaywidth
- \bbl at ams@tagbox\bbl at ams@lap{#1}}}}
- \def\bbl at ams@preset#1{%
- \bbl at add\ignorespacesafterend{\hrule\@height\z@}%
- \ifnum\bbl at thetextdir>\z@
- % \hrule\@height\z@
- \let\bbl at outertextdir\@ne
- \bbl at textdir\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}%
- {\let\bbl at ams@lap\llap}%
- %%% \AddToHook{env/aligned/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/align/begin}{\bbl at ams@preset\bbl at ams@lap}%
- \AddToHook{env/flalign/begin}{\bbl at ams@preset\hbox}%
- \AddToHook{env/align*/begin}{\bbl at ams@preset\bbl at ams@lap}%
- \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
- \let\bbl at outertextdir\@ne
- \bbl at textdir\z@
- \bbl at sreplace\maketag@@@{\hbox}{\bbl at ams@eqtagbox}%
- \fi}%
- \fi}
- \ifx\@eqnnum\@undefined\else
- \let\bbl at savedeqnnum\@eqnnum
- \ifx\bbl at attr@dir\@undefined\else
+ \ifx\maketag@@@\@undefined % Normal equation, eqnarray
+ \AddToHook{env/eqnarray/begin}{%
+ \ifnum\bbl at thetextdir>\z@
+ \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
+ \chardef\bbl at thetextdir\z@
+ \bbl at add\normalfont{\bbl at eqnodir}%
+ \fi}%
+ \AddToHook{env/equation/begin}{%
+ \ifnum\bbl at thetextdir>\z@
+ \edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
+ \chardef\bbl at thetextdir\z@
+ \bbl at add\normalfont{\bbl at eqnodir}%
+ \pardir TLT % dir for \eqno is \pardir!
+ \fi}%
\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]}}}}
+ \def\@eqnnum{%
+ \setbox\z@\hbox{\normalfont\normalcolor(\theequation)}%
+ \hbox to0.01pt{\hss\hbox to\displaywidth{\box\z@\hss}}}%
\fi
- \fi
- \fi
+ \else % amstex
+ \bbl at sreplace\intertext@{\normalbaselines}%
+ {\normalbaselines
+ \ifx\bbl at eqnodir\relax\else\bbl at pardir\@ne\bbl at textdir\@ne\fi}
+ \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\wd\z@{%
+ \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}%
+ \fi}
\fi
\ifx\bbl at opt@layout\@nnil\endinput\fi % if no layout
\ifnum\bbl at bidimode>\z@
diff --git a/babel.ins b/babel.ins
index 8f68372..c237399 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/01/07}
+\def\filedate{2022/01/19}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 3ac62a6..ff35fdd 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 6db98a3..509497c 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/01/07 v3.69.2610]
+\ProvidesFile{bbcompat.dtx}[2022/01/19 v3.69.2622]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.