[latex3-commits] [git/LaTeX3-latex3-babel] main: Fix #158 (wrong math dir in tabular). (d6156c9)
Javier
email at dante.de
Sat Dec 18 13:58:50 CET 2021
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/d6156c9b814f9f3ca76a390797348ce53b64110f
>---------------------------------------------------------------
commit d6156c9b814f9f3ca76a390797348ce53b64110f
Author: Javier <email at localhost>
Date: Sat Dec 18 13:58:50 2021 +0100
Fix #158 (wrong math dir in tabular).
* Improved the language loader.
>---------------------------------------------------------------
d6156c9b814f9f3ca76a390797348ce53b64110f
README.md | 12 ++---
babel.dtx | 148 +++++++++++++++++++++++++++--------------------------------
babel.ins | 2 +-
babel.pdf | Bin 859641 -> 859247 bytes
bbcompat.dtx | 2 +-
5 files changed, 73 insertions(+), 91 deletions(-)
diff --git a/README.md b/README.md
index 71dea36..fc32c72 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.67.2585
+## Babel 3.67.2590
(*Development.*)
@@ -53,19 +53,13 @@ respective authors.
- 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).
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.
```
### Previous changes
diff --git a/babel.dtx b/babel.dtx
index 66daa1b..a3aa5cb 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/12/13 v3.67.2585 The Babel package]
+\ProvidesFile{babel.dtx}[2021/12/18 v3.67.2590 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -5118,8 +5118,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.67.2585>>
-%<<date=2021/12/13>>
+%<<version=3.67.2590>>
+%<<date=2021/12/18>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -12124,17 +12124,16 @@ help from Bernd Raichle, for which I am grateful.
% \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. 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, the traditional way to set the
-% main language is kept — the last loaded is the main language
-% (|\bbl at opt@main| is |\@nnil|.
+% 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}
\ifx\bbl at opt@main\@nnil
@@ -12164,47 +12163,44 @@ help from Bernd Raichle, for which I am grateful.
\fi
% \end{macrocode}
%
-% Now define the corresponding loaders. With package options,
-% assume the language exists. With class options, check if the
-% option is a language.
+% 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}
\bbl at foreach\bbl at language@opts{%
- \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}%
- {}}
+ \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{%
- \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}%
- {}}
-% \end{macrocode}
-%
-% If a main language has been set, disable it here and delay it to the
-% ’main’ pass.
-%
-% \begin{macrocode}
-\ifx\bbl at opt@main\@nnil\else
- \DeclareOption{\bbl at opt@main}{}
-\fi
+ \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
@@ -12212,8 +12208,7 @@ help from Bernd Raichle, for which I am grateful.
% ignored.
%
% The options have to be processed in the order in which the user
-% specified them (except, of course, class options, which \LaTeX{}
-% processes before):
+% specified them (but remember class options are processes before):
%
% \begin{macrocode}
\def\AfterBabelLanguage#1{%
@@ -12222,12 +12217,14 @@ help from Bernd Raichle, for which I am grateful.
\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}
@@ -12246,35 +12243,27 @@ help from Bernd Raichle, for which I am grateful.
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}}%
- \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}}%
- \fi
- \bbl at afterldf{}%
- \else % case 0,2
+ \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
\DeclareOption{\bbl at opt@main}{\bbl at loadmain}
\fi
\ExecuteOptions{\bbl at opt@main}
- \DeclareOption*{}%
- \ProcessOptions*
+ \@namedef{ds@\bbl at opt@main}{}%
\fi
+ \DeclareOption*{}
+ \ProcessOptions*
\fi
\def\AfterBabelLanguage{%
\bbl at error
@@ -12282,10 +12271,9 @@ help from Bernd Raichle, for which I am grateful.
{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
@@ -21832,7 +21820,7 @@ function Babel.bidi(head, ispar, hdir)
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
diff --git a/babel.ins b/babel.ins
index b29dc22..50d96e7 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{2021/12/13}
+\def\filedate{2021/12/18}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 491402b..88482d9 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 03e0c4a..cf7aa60 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/12/13 v3.67.2585]
+\ProvidesFile{bbcompat.dtx}[2021/12/18 v3.67.2590]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.