[latex3-commits] [git/LaTeX3-latex3-babel] main: Added \IfBabelSelectorTF. (24588b8)
Javier
email at dante.de
Tue Nov 9 12:49:04 CET 2021
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/24588b81d197293ad25db7aa357d5b73e2df7565
>---------------------------------------------------------------
commit 24588b81d197293ad25db7aa357d5b73e2df7565
Author: Javier <email at localhost>
Date: Tue Nov 9 12:49:04 2021 +0100
Added \IfBabelSelectorTF.
>---------------------------------------------------------------
24588b81d197293ad25db7aa357d5b73e2df7565
README.md | 9 ++++++---
babel.dtx | 35 +++++++++++++++++++++++++++++------
babel.ins | 2 +-
babel.pdf | Bin 854250 -> 855301 bytes
bbcompat.dtx | 2 +-
5 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 078385c..8570d97 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.66
+## Babel 3.66.2551
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.66 are described in:
+Changes in version 3.67 are described in:
-https://latex3.github.io/babel/news/whats-new-in-babel-3.66.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.67.html
Apart from the manual, you can find information on some aspects of babel at:
@@ -46,6 +46,9 @@ respective authors.
### Summary of Latest changes
```
+3.67 2021-11-?? (dev)
+ * \IfBabelSelectorTF
+
3.66 2021-11-08
* Transforms for Greek:
- transliteration.omega
diff --git a/babel.dtx b/babel.dtx
index a8d8834..f10e2a5 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/11/08 v3.66 The Babel package]
+\ProvidesFile{babel.dtx}[2021/11/09 v3.66.2551 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -5063,8 +5063,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.66>>
-%<<date=2021/11/08>>
+%<<version=3.66.2551>>
+%<<date=2021/11/09>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6234,6 +6234,9 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macrocode}
\expandafter\def\csname selectlanguage \endcsname#1{%
+ \ifx\bbl at selectorname\@empty
+ \def\bbl at selectorname{select}%
+ \fi
\ifnum\bbl at hymapsel=\@cclv\let\bbl at hymapsel\tw@\fi
\bbl at push@language
\aftergroup\bbl at pop@language
@@ -6312,7 +6315,10 @@ help from Bernd Raichle, for which I am grateful.
\newif\ifbbl at bcpallowed
\bbl at bcpallowedfalse
\def\select at language#1{% from set@, babel at aux
+ \ifx\bbl at selectorname\@empty
+ \def\bbl at selectorname{select}%
% set hymap
+ \fi
\ifnum\bbl at hymapsel=\@cclv\chardef\bbl at hymapsel4\relax\fi
% set name
\edef\languagename{#1}%
@@ -6453,7 +6459,8 @@ help from Bernd Raichle, for which I am grateful.
\else
\expandafter\expandafter\expandafter\set at hyphenmins
\csname #1hyphenmins\endcsname\relax
- \fi}
+ \fi
+ \let\bbl at selectorname\@empty}
% \end{macrocode}
%
% \begin{environment}{otherlanguage}
@@ -6468,6 +6475,7 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macrocode}
\long\def\otherlanguage#1{%
+ \def\bbl at selectorname{other}%
\ifnum\bbl at hymapsel=\@cclv\let\bbl at hymapsel\thr@@\fi
\csname selectlanguage \endcsname{#1}%
\ignorespaces}
@@ -6493,6 +6501,7 @@ help from Bernd Raichle, for which I am grateful.
\expandafter\def\csname otherlanguage*\endcsname{%
\@ifnextchar[\bbl at otherlanguage@s{\bbl at otherlanguage@s[]}}
\def\bbl at otherlanguage@s[#1]#2{%
+ \def\bbl at selectorname{other*}%
\ifnum\bbl at hymapsel=\@cclv\chardef\bbl at hymapsel4\relax\fi
\def\bbl at select@opts{#1}%
\foreign at language{#2}}
@@ -6556,6 +6565,7 @@ help from Bernd Raichle, for which I am grateful.
\@ifstar\bbl at foreign@s\bbl at foreign@x}
\providecommand\bbl at foreign@x[3][]{%
\begingroup
+ \def\bbl at selectorname{foreign}%
\def\bbl at select@opts{#1}%
\let\BabelText\@firstofone
\bbl at beforeforeign
@@ -6566,6 +6576,7 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl at foreign@s#1#2{% TODO - \shapemode, \@setpar, ?\@@par
\begingroup
{\par}%
+ \def\bbl at selectorname{foreign*}%
\let\bbl at select@opts\@empty
\let\BabelText\@firstofone
\foreign at language{#1}%
@@ -6612,7 +6623,20 @@ help from Bernd Raichle, for which I am grateful.
\expandafter\bbl at switch\expandafter{\languagename}}}
% \end{macrocode}
%
-% \end{macro}
+% \end{macro}
+%
+% The following macro executes conditionally some code based on the
+% selector being used.
+%
+% \begin{macrocode}
+\def\IfBabelSelectorTF#1{%
+ \bbl at xin@{,\bbl at selectorname,}{,\zap at space#1 \@empty,}%
+ \ifin@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+% \end{macrocode}
%
% \begin{macro}{\bbl at patterns}
%
@@ -6781,7 +6805,6 @@ help from Bernd Raichle, for which I am grateful.
\let\uselocale\setlocale
\let\locale\setlocale
\let\selectlocale\setlocale
-\let\localename\setlocale
\let\textlocale\setlocale
\let\textlanguage\setlocale
\let\languagetext\setlocale
diff --git a/babel.ins b/babel.ins
index 387ab64..28a91e2 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/11/08}
+\def\filedate{2021/11/09}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 9d0a796..b2a6f27 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 5936dfa..47b44ab 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/11/08 v3.66]
+\ProvidesFile{bbcompat.dtx}[2021/11/09 v3.66.2551]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.