[latex3-commits] [git/LaTeX3-latex3-babel] main: Bump to 3.85. (8b88ac1)
Javier
email at dante.de
Mon Jan 23 17:39:03 CET 2023
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/8b88ac183c5d268fec1fe5dfa4c76f152165e14e
>---------------------------------------------------------------
commit 8b88ac183c5d268fec1fe5dfa4c76f152165e14e
Author: Javier <email at localhost>
Date: Mon Jan 23 17:39:03 2023 +0100
Bump to 3.85.
>---------------------------------------------------------------
8b88ac183c5d268fec1fe5dfa4c76f152165e14e
README.md | 17 ++-------
babel.dtx | 101 ++++++++++++++++++++++++++++++++++---------------
babel.ins | 4 +-
babel.pdf | Bin 914738 -> 917543 bytes
bbcompat.dtx | 2 +-
samples/lua-arabic.pdf | Bin 115532 -> 115514 bytes
samples/lua-arabic.tex | 4 +-
7 files changed, 80 insertions(+), 48 deletions(-)
diff --git a/README.md b/README.md
index 3e72473..ccb3cdd 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-## Babel 3.84.2989
+## Babel 3.85
-(dev)
+2023-01-23
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -48,24 +48,15 @@ respective authors.
### Summary of latest changes
```
-3.85 (dev)
- * Spaces allowed as separators in layout=.
+3.85 2023-01-23
* A high-level interface to enable and disable transforms (lua).
* Font-dependent transforms (lua).
+ * Spaces allowed as separators in layout=.
* Fixes:
- \babelprehyphenation was not applied with 'onchar'.
- In some rare cases the hyphenrules weren’t correctly set.
- Partial fix for bidi in tabular (broken after an attempt to
fix amsmath).
-
-3.84 2022-12-26
- * Automatic selection of encodings with \babelprovide and pdftex.
- * Fixes:
- - With 'select.write = omit' the main language wasn’t selected
- in the aux file.
- - Incorrect link box in end of line if it is preceded by a
- non-Arabic character (#207)
- - New option counters* the pre-expand \thepage. See #26.
```
### Previous changes
diff --git a/babel.dtx b/babel.dtx
index efcffc9..dc01255 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -1,7 +1,7 @@
% \iffalse
% This document requires lualatex
%%
-%% Copyright (C) 2012-2022 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2023 Javier Bezos and Johannes L. Braams.
%% Copyright (C) 1989-2012 Johannes L. Braams and
%% any individual authors listed elsewhere in this file.
%% All rights reserved.
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2023/01/21 v3.84.2989 The Babel package]
+\ProvidesFile{babel.dtx}[2022/01/23 v3.85 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -3363,6 +3363,34 @@ to \textit{ύ}, so that the diaeresis is removed.
This feature is activated with the first |\babelposthyphenation| or
|\babelprehyphenation|.
+\New{3.85} Another option is |label|, which takes a value similar to
+those in |\babelprovide| key |transforms| (in fact, the latter just
+applies this option). This label can be used to turn on and off
+transforms with a higher level interface, by means of
+|\enablelocaletransform| and |\disablelocaletransform| (see below).
+
+\New{3.85} When used in conjunction with |label|, this key makes a
+transform font dependent. As an example, the rules for Arabic kashida
+can differ depending on the font design. The value consists in a list
+of space-separated font tags:
+\begin{verbatim}
+\babelprehyphenation[label=transform.name, fonts=rm sf]{..}{..}
+\end{verbatim}
+Tags can adopt two forms: a family, such as |rm| or |tt|, or the set
+family/series/shape. If a font matches one of these conditions, the
+transform is enabled. The second tag in |rm rm/n/it| is redundant.
+There are no wildcards; so, for italics you may want to write something
+like |sf/m/it sf/b/it|.
+
+Transforms set for specific fonts (at least once in any language) are
+always reset with a font selector.
+
+In |\babelprovide|, transform labels can be tagged before its name,
+with a list separated with colons, like:
+\begin{verbatim}
+transforms = _rm:sf:_transform.name
+\end{verbatim}
+
\New{3.67} With the optional argument you can associate a user defined
transform to an attribute, so that it’s active only when it’s set
(currently its attribute value is ignored). With this mechanism
@@ -3372,7 +3400,7 @@ LaTeX kernel provides the macros |\newattribute|, |\setattribute| and
|\unsetattribute|. The following example shows how to use it, provided
an attribute named |\latinnoj| has been declared:
\begin{verbatim}
- \babelprehyphenation[attribute=\latinnoj]{latin}{ J }{ string = I }
+\babelprehyphenation[attribute=\latinnoj]{latin}{ J }{ string = I }
\end{verbatim}
See the
@@ -3445,6 +3473,12 @@ This feature is activated with the first |\babelposthyphenation| or
linked to fonts, not to languages.
\end{note}
+\Describe{\enablelocaletransform}{\marg{label}}
+\DescribeOther{\disablelocaletransform}{\marg{label}}
+
+\New{3.85} Enables and disables the transform with the given label in
+the current language.
+
\subsection{Selection based on BCP 47 tags}
\label{bcp47}
@@ -3719,8 +3753,8 @@ Arabic as @1فصحى العصر@0 \textit{fuṣḥā l-ʻaṣr} (MSA) and
\newcommand\refrange[2]{\babelsublr{\texthe{\ref{#1}}-\texthe{\ref{#2}}}}
\end{verbatim}
- In the future a more complete method, reading recursively boxed text, may
- be added.
+ In the future a more complete method, reading recursively boxed text,
+ may be added.
\end{note}
\Describe{layout=}{\texttt{sectioning} $\string|$
@@ -3737,9 +3771,10 @@ Arabic as @1فصحى العصر@0 \textit{fuṣḥā l-ʻaṣr} (MSA) and
adapted in bidi documents, including some text elements (except with
options loading the |bidi| package, which provides its own mechanism to
control these elements). You may use several options with a
-dot-separated list (eg, |layout=counters.contents.sectioning|). This
-list will be expanded in future releases. Note not all options are
-required by all engines.
+space-separated list, like |layout=counters contents sectioning| (in
+\New{3.85} spaces are to be preferred over dots, which was the former
+syntax). This list will be expanded in future releases. Note not all
+options are required by all engines.
\begin{description}
\renewcommand\makelabel[1]{%
@@ -3820,7 +3855,7 @@ the same for \textsf{pgf/tikz}. Somewhat experimental. \New{3.32}.
Typically, in an Arabic document you would need:
\begin{verbatim}
\usepackage[bidi=basic,
- layout=counters.tabular]{babel}
+ layout=counters tabular]{babel}
\end{verbatim}
\end{example}
@@ -4755,6 +4790,11 @@ curly braces. The macros |\bbl at add@special|\meta{char} and
|\bbl at remove@special|\meta{char} add and remove the character
\meta{char} to these two sets.
+\DescribeMacro{\@safe at activestrue}
+\DescribeMacro{\@safe at activesfalse}
+Enables and disables the “safe” mode. It is a tool for package and class
+authors. See the description below.
+
\subsection{Support for saving macro definitions}
Language definition files may want to \emph{re}define macros that
@@ -5246,8 +5286,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.84.2989>>
-%<<date=2023/01/21>>
+%<<version=3.85>>
+%<<date=2022/01/23>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -7844,15 +7884,17 @@ help from Bernd Raichle, for which I am grateful.
% \end{macro}
%
% \begin{macro}{\if at safe@actives}
-% In some circumstances it is necessary to be able to set the catcode
-% of a shorthand to ‘other’ on the fly (for example, if things like
-% |\char"AA| are expected). For this purpose the switch
-% |@safe at actives| is available. The setting of this switch should be
-% checked in the first level expansion of |\active at char|\m{char}. When
-% this expansion mode is active, something like
-% |"|$\sb{13}$|"|$\sb{13}$ becomes |"|$\sb{12}$|"|$\sb{12}$ (in other
-% words, they are |\string|’ed). This contrasts with
-% |\protected at edef|, where catcodes are left unchanged.
+% In some circumstances it is necessary to be able to reset the
+% shorthand to its ‘normal’ value (usually the character with catcode
+% ‘other’) on the fly. For this purpose the switch |@safe at actives| is
+% available. The setting of this switch should be checked in the first
+% level expansion of |\active at char|\m{char}. When this expansion mode
+% is active (with |\@safe at activestrue|), something like
+% |"|$\sb{13}$|"|$\sb{13}$ becomes |"|$\sb{12}$|"|$\sb{12}$ in an
+% |\edef| (in other words, shorthands are |\string|’ed). This
+% contrasts with |\protected at edef|, where catcodes are always left
+% unchanged. Once converted, they can be used safely even after this
+% expansion mode is deactivated (with |\@safe at activefalse|).
%
% \begin{macrocode}
\newif\if at safe@actives
@@ -14863,6 +14905,7 @@ end
\def\bbl at textdir#1{%
\bbl at setluadir{text}\textdir{#1}%
\chardef\bbl at thetextdir#1\relax
+ % par/text 0..8 = l/l l/r l/al r/l r/r r/al al/l al/r al/al
\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{%
@@ -14882,13 +14925,10 @@ end
\fi}
\def\bbl at mathboxdir@aux#1{%
\@ifnextchar\egroup{}{\textdir T#1T\relax}}
- \def\bbl at everymath{%
- \bbl at mathboxdir
- \def\bbl at insidemath{1}}
+ \def\bbl at everymath{\bbl at mathboxdir}
\def\bbl at everydisplay{%
\bbl at mathboxdir
- \def\bbl at everymath{\bbl at mathboxdir}%
- \def\bbl at insidemath{2}}
+ \def\bbl at everymath{\bbl at mathboxdir}}
\frozen at everymath\expandafter{%
\expandafter\bbl at everymath\the\frozen at everymath}
\frozen at everydisplay\expandafter{%
@@ -14982,7 +15022,7 @@ end
\ifx\maketag@@@\@undefined % Normal equation, eqnarray
\AddToHook{env/equation/begin}{%
\ifnum\bbl at thetextdir>\z@
- \let\bbl at mathboxdir\relax
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}%
\let\@eqnnum\bbl at eqnum
\edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
\chardef\bbl at thetextdir\z@
@@ -14998,7 +15038,8 @@ end
\fi
\AddToHook{env/eqnarray/begin}{%
\ifnum\bbl at thetextdir>\z@
- \let\bbl at mathboxdir\relax
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}%
\edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
\chardef\bbl at thetextdir\z@
\bbl at add\normalfont{\bbl at eqnodir}%
@@ -15036,7 +15077,7 @@ end
\hbox to 0.01pt{\hbox to\displaywidth{\hss{#1}}\hss}}%
\fi
\def\bbl at ams@preset#1{%
- \let\bbl at mathboxdir\relax
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}%
\ifnum\bbl at thetextdir>\z@
\edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
\bbl at sreplace\textdef@{\hbox}{\bbl at ams@tagbox\hbox}%
@@ -15044,7 +15085,7 @@ end
\fi}%
\ifnum\bbl at eqnpos=\tw@\else
\def\bbl at ams@equation{%
- \let\bbl at mathboxdir\relax
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}%
\ifnum\bbl at thetextdir>\z@
\edef\bbl at eqnodir{\noexpand\bbl at textdir{\the\bbl at thetextdir}}%
\chardef\bbl at thetextdir\z@
@@ -15070,7 +15111,7 @@ end
\\\AddToHook{env/align*/end}{\<iftag@>\<else>\\\tag*{}\<fi>}}%
\AddToHook{env/flalign/begin}{\bbl at ams@preset\hbox}%
\AddToHook{env/split/before}{%
- \let\bbl at mathboxdir\relax
+ \def\bbl at mathboxdir{\def\bbl at insidemath{1}}%
\ifnum\bbl at thetextdir>\z@
\bbl at ifsamestring\@currenvir{equation}%
{\ifx\bbl at ams@lap\hbox % leqno
diff --git a/babel.ins b/babel.ins
index 816940d..fbea84e 100644
--- a/babel.ins
+++ b/babel.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright 2012-2022 Javier Bezos and Johannes L. Braams.
+%% Copyright 2012-2023 Javier Bezos and Johannes L. Braams.
%% Copyright 1989-2008 Johannes L. Braams and any individual authors
%% listed elsewhere in this file. All rights reserved.
%%
@@ -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{2023/01/21}
+\def\filedate{2022/01/23}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 8a3186e..ce98f96 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 376766b..eb860ed 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2023/01/21 v3.84.2989]
+\ProvidesFile{bbcompat.dtx}[2022/01/23 v3.85]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/samples/lua-arabic.pdf b/samples/lua-arabic.pdf
index a89437a..9222676 100644
Binary files a/samples/lua-arabic.pdf and b/samples/lua-arabic.pdf differ
diff --git a/samples/lua-arabic.tex b/samples/lua-arabic.tex
index ab79ebe..2b954b0 100644
--- a/samples/lua-arabic.tex
+++ b/samples/lua-arabic.tex
@@ -6,7 +6,7 @@
\usepackage[english,
bidi=basic,
headfoot=arabic, % an alternative is layout=sectioning
- layout=counters.tabular]{babel}
+ layout=counters tabular]{babel}
\babelprovide[import, main,
justification = kashida,
transforms = kashida.plain
@@ -17,7 +17,7 @@
% \usepackage[english, arabic, provide=*,
% bidi=basic,
% headfoot=arabic, % an alternative is layout=sectioning
-% layout=counters.tabular]{babel}
+% layout=counters tabular]{babel}
% =====================
More information about the latex3-commits
mailing list.