[latex3-commits] [git/LaTeX3-latex3-babel] main: Fix #141 (options manager rewritten). (771ee46)
Javier
email at dante.de
Fri Aug 6 17:10:33 CEST 2021
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/771ee4606b8d9213adb6bd8313e09a4b0a440cfe
>---------------------------------------------------------------
commit 771ee4606b8d9213adb6bd8313e09a4b0a440cfe
Author: Javier <email at localhost>
Date: Fri Aug 6 17:10:33 2021 +0200
Fix #141 (options manager rewritten).
>---------------------------------------------------------------
771ee4606b8d9213adb6bd8313e09a4b0a440cfe
README.md | 2 +-
babel.dtx | 56 +++++++++++++++++++++++++++++++-------------------------
babel.ins | 2 +-
babel.pdf | Bin 848856 -> 849288 bytes
bbcompat.dtx | 2 +-
5 files changed, 34 insertions(+), 28 deletions(-)
diff --git a/README.md b/README.md
index 8bb975a..9815c3c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.63.2449
+## Babel 3.63.2456
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
diff --git a/babel.dtx b/babel.dtx
index 8d80add..9cbc4b5 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/07/30 v3.63.2449 The Babel package]
+\ProvidesFile{babel.dtx}[2021/08/06 v3.63.2456 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -788,9 +788,11 @@ group.
|\text...| is heavily overloaded in \LaTeX{} and conflicts with
existing macros may arise (|\textlatin|, |\textbar|, |\textit|,
|\textcolor| and many others). The same applies to environments,
- because |arabic| conflicts with |\arabic|. Except if there is a
- reason for this ‘syntactical sugar’, the best option is to stick to
- the default selectors or to define your own alternatives.
+ because |arabic| conflicts with |\arabic|. Furthermore, and because of
+ this overloading, detecting the language of a chunk of text by
+ external tools can become impossible. Except if there is a reason for
+ this ‘syntactical sugar’, the best option is to stick to the default
+ selectors or to define your own alternatives.
\end{warning}
\begin{example}
@@ -5024,8 +5026,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.63.2449>>
-%<<date=2021/07/30>>
+%<<version=3.63.2456>>
+%<<date=2021/08/06>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5739,7 +5741,7 @@ help from Bernd Raichle, for which I am grateful.
\ifin@
\def\bbl at opt@provide{#2}%
\bbl at replace\bbl at opt@provide{;}{,}%
- \fi
+ \fi}
\fi
%
% \end{macrocode}
@@ -6901,21 +6903,24 @@ help from Bernd Raichle, for which I am grateful.
\bbl at xin@{,#1,}{\bbl at language@opts}% Match non-last
\ifin@
\bbl at replace\bbl at language@opts{,#1,}{,,}%
- \edef\bbl at tempe{\bbl at tempe\bbl at elt{0}{#1}}%
+ \edef\bbl at tempe{\bbl at tempe\bbl at elt{3}{#1}}%
\else
- \IfFileExists{#1.ldf}%
- {\edef\bbl at tempe{\bbl at tempe\bbl at elt{1}{#1}}}%
- {\ifnum\bbl at iniflag>\z@ % Optimization
- \IfFileExists{babel-#1.tex}%
- {\edef\bbl at tempe{\bbl at tempe\bbl at elt{2}{#1}}}%
- {}%
- \fi}%
+ \babel at savecnt\z@ % Use as temp
+ \ifnum\bbl at iniflag<\thr@@ % Optimization: 3 = always ini
+ \IfFileExists{#1.ldf}{\advance\babel at savecnt\@ne}{}%
+ \fi
+ \ifnum\bbl at iniflag>\z@ % Optimization: 0 = always ldf
+ \IfFileExists{babel-#1.tex}{\advance\babel at savecnt\tw@}{}%
+ \fi
+ \ifnum\babel at savecnt>\z@
+ \edef\bbl at tempe{\bbl at tempe\bbl at elt{\the\babel at savecnt}{#1}}%
+ \fi
\fi
\fi}
%
\let\bbl at savemain\@empty
\bbl at foreach\bbl at language@opts{%
- \edef\bbl at tempe{\bbl at tempe\bbl at elt{0}{#1}}}
+ \edef\bbl at tempe{\bbl at tempe\bbl at elt{3}{#1}}}
\def\bbl at elt#1#2#3{%
\ifx#3\relax % if last
\bbl at ifunset{ds@#2}{}%
@@ -6926,13 +6931,13 @@ help from Bernd Raichle, for which I am grateful.
\DeclareOption{#2}{}%
\else
\ifnum\bbl at iniflag<\tw@ % other as ldf
- \ifnum#1<\tw@ % Class: if ldf exists 1. Package: always 0
+ \ifodd#1\relax % Class: if ldf exists 1,3. Package: always 3
\bbl at ifunset{ds@#2}%
{\DeclareOption{#2}{\bbl at load@language{#2}}}%
{}%
\fi
\else % other as ini
- \ifodd#1\relax\else % Class: if ini exists 2. Package: always 0
+ \ifnum#1>\@ne % % Class: if ini exists 2,3. Package: always 3
\DeclareOption{#2}{%
\bbl at ldfinit
\babelprovide[import]{#2}%
@@ -6995,14 +7000,15 @@ help from Bernd Raichle, for which I am grateful.
\fi
\def\bbl at elt#1#2{% main
\ifodd\bbl at iniflag % as ini = 1,3
- \ifodd#1\relax\else % Class: if ini exists 2. Package: always 0
- \DeclareOption{#2}{%
- \bbl at ldfinit
- \babelprovide[\bbl at opt@provide,import]{#2}%
- \bbl at afterldf{}}%
+ \ifnum#1>\@ne % % Class: if ini exists 2,3. Package: always 3
+ \def\CurrentOption{#2}% Directly, because luatexbase
+ \bbl at ldfinit
+ \babelprovide[\bbl at opt@provide,main,import]{#2}%
+ \bbl at afterldf{}%
+ \DeclareOption{#2}{}%
\fi
\else % as ldf = 0,2
- \ifnum#1<\tw@ % Class: if ldf exists 1. Package: always 0
+ \ifodd#1\relax % Class: if ldf exists 1,3. Package: always 3
\bbl at ifunset{ds@#2}%
{\DeclareOption{#2}{\bbl at load@language{#2}}}%
{}%
@@ -12875,7 +12881,7 @@ help from Bernd Raichle, for which I am grateful.
\<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl at cl{lname}}%
{\\\newfontlanguage{\bbl at cl{lname}}{\bbl at cl{lotf}}}%
\\\renewfontfamily\\#4%
- [\bbl at cs{lsys@\languagename},#2]}{#3}% ie \bbl at exp{..}{#3}
+ [\bbl at cl{lsys},#2]}{#3}% ie \bbl at exp{..}{#3}
\begingroup
#4%
\xdef#1{\f at family}% eg, \bbl at rmdflt@lang{FreeSerif(0)}
diff --git a/babel.ins b/babel.ins
index b2598b6..e644b78 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/07/30}
+\def\filedate{2021/08/06}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index e943fa5..e67ad43 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 90bf21f..04e9d6e 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/07/30 v3.63.2449]
+\ProvidesFile{bbcompat.dtx}[2021/08/06 v3.63.2456]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.