[latex3-commits] [latex3/babel] main: Casing in ini: <x> notation. (243b89e)
github at latex-project.org
github at latex-project.org
Sat Dec 2 12:52:55 CET 2023
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/243b89e3c570ec23d2432e17db30bd67e690f318
>---------------------------------------------------------------
commit 243b89e3c570ec23d2432e17db30bd67e690f318
Author: Javier <email at localhost>
Date: Sat Dec 2 12:52:55 2023 +0100
Casing in ini: <x> notation.
>---------------------------------------------------------------
243b89e3c570ec23d2432e17db30bd67e690f318
README.md | 8 +++---
babel-code.pdf | Bin 640141 -> 641802 bytes
babel.dtx | 86 ++++++++++++++++++++++++++++++++-------------------------
babel.ins | 2 +-
babel.pdf | Bin 417881 -> 417650 bytes
bbcompat.dtx | 2 +-
6 files changed, 54 insertions(+), 44 deletions(-)
diff --git a/README.md b/README.md
index 60f058d..bd0b70e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-## Babel 3.97.33470
+## Babel 3.97.33650
-2023-11-30
+2023-02-02
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -10,9 +10,9 @@ is a set of ini files for about 275 languages.
The latest stable version is available on <https://ctan.org/pkg/babel>.
-Changes in version 3.97 are described in:
+Changes in version 3.98 are described in:
-https://latex3.github.io/babel/news/whats-new-in-babel-3.97.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.98.html
Apart from the manual, you can find information on some aspects of babel at:
diff --git a/babel-code.pdf b/babel-code.pdf
index af8b8d6..cecd093 100644
Binary files a/babel-code.pdf and b/babel-code.pdf differ
diff --git a/babel.dtx b/babel.dtx
index 56ba459..fd5cf0f 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2023/11/30 v3.97.33470 The Babel package]
+\ProvidesFile{babel.dtx}[2023/12/02 v3.97.33650 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -582,6 +582,16 @@ _\usepackage[vietnamese,danish]{babel}_
BCP47 tag. See section \ref{bcp47} for further details.
\end{note}
+\begin{note}
+ Documents with several input encodings are not frequent, but
+ sometimes are useful. You can set different encodings for different
+ languages as the following example shows:
+\begin{verbatim}
+\addto\extrasfrench{\inputencoding{latin1}}
+\addto\extrasrussian{\inputencoding{koi8-r}}
+\end{verbatim}
+\end{note}
+
\subsection{Mostly monolingual documents}
\label{mostlymono}
@@ -2624,16 +2634,18 @@ provided by the |ini| file, like extra counters.
{\marg{locale-name}\marg{codepoint}\marg{output}}
\DescribeOther{\BabelLowercaseMapping}
{\marg{locale-name}\marg{codepoint}\marg{output}}
+\DescribeOther{\BabelTitlecaseMapping}
+ {\marg{locale-name}\marg{codepoint}\marg{output}}
\New{3.90} These macros are devised as a high level interface for
declaring case mappings, based on the locale name as declared by or
-with \babel. They are the equivalent of |\DeclareUppercaseMapping| and
-|\DeclareLowercaseMapping| (see \textsf{usrguide.pdf}). The purpose is
-twofold: (1) a user-friendly way to declare them, because
-often BCP 47 tags are not known (and sometimes can be complex);
-(2) if for some reason the tag changes (eg, you decide to tag
-|english| as |en-001| instead of |en-US|), the new mappings will be
-still assigned to that language.
+with \babel. They are the equivalent of |\DeclareUppercaseMapping|,
+|\DeclareLowercaseMapping|, and |\DeclareTitlecaseMapping| (see
+\textsf{usrguide.pdf}). The purpose is twofold: (1) a user-friendly way
+to declare them, because often BCP 47 tags are not known (and sometimes
+can be complex); (2) if for some reason the tag changes (eg, you decide
+to tag |english| as |en-001| instead of |en-US|), the new mappings will
+be still assigned to that language.
\begin{example} For Classical Latin (no need to know the tag is
\texttt{la-x-classic}):
@@ -4680,13 +4692,6 @@ options (like paragraph direction with |bidi.text|).
with the correct catcodes for \verb/|/ and
\verb|:|).\catcode`\|=\active
-\item Documents with several input encodings are not frequent, but
- sometimes are useful. You can set different encodings for different
- languages as the following example shows:
-\begin{verbatim}
-\addto\extrasfrench{\inputencoding{latin1}}
-\addto\extrasrussian{\inputencoding{koi8-r}}
-\end{verbatim}
\item For the hyphenation to work correctly, lccodes cannot change,
because \TeX{} only takes into account the values when the
paragraph is hyphenated, i.e., when it has been
@@ -5458,18 +5463,6 @@ to define |\abmoniname|, |\abmoniiname|, etc. (and similarly with
\end{verbatim}
|#1| is replaced by the roman numeral.
-% \Describe\SetCase{\oarg{map-list}\marg{toupper-code}%
-% \marg{tolower-code}\qquad\textit{Deprecated}}
-%
-% \begin{warning}
-% This feature doesn’t work any longer after some changes in the \LaTeX{}
-% kernel. It’s now deprecated and an alternative is on the way.
-% \end{warning}
-
-\Describe{\SetCaseMapping}{}
-
-\textit{Work in progress.}
-
\Describe{\SetHyphenMap}{\marg{to-lower-macros}}
\New{3.9g} Case mapping for hyphenation is handled with |\SetHyphenMap|
and controlled with the package option |hyphenmap|.
@@ -5653,8 +5646,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.97.33470>>
-%<<date=2023/11/30>>
+%<<version=3.97.33650>>
+%<<date=2023/12/02>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -9421,7 +9414,7 @@ wouldn’t exist.
% \end{macrocode}
%
% A little auxiliary command sets the string. TODO: Formerly used with
-% casing. Very likely no longer necessary, although its used in
+% casing. Very likely no longer necessary, although it’s used in
% |\setlocalecaption|.
%
% \begin{macrocode}
@@ -10498,6 +10491,11 @@ wouldn’t exist.
\ifx\bbl at tempb\@empty\else
,variant=\bbl at tempb
\fi}%
+ % == Case mapping ==
+ \bbl at ifunset{bbl at casng@\languagename}{}%
+ {\expandafter\ifx\csname bbl at casng@\languagename\endcsname\@empty\else
+ \bbl at exp{\\\SetCaseMapping{\languagename}{\[bbl at casng@\languagename]}}%
+ \fi}%
% == engine specific extensions ==
% Defined in XXXbabel.def
\bbl at provide@extra{#2}%
@@ -10977,6 +10975,7 @@ wouldn’t exist.
\bbl at exportkey{intsp}{typography.intraspace}{}%
\bbl at exportkey{frspc}{typography.frenchspacing}{u}%
\bbl at exportkey{chrng}{characters.ranges}{}%
+ \bbl at exportkey{casng}{characters.casing}{}%
\bbl at exportkey{quote}{characters.delimiters.quotes}{}%
\bbl at exportkey{dgnat}{numbers.digits.native}{}%
\ifnum#1=\tw@ % only (re)new
@@ -11005,7 +11004,6 @@ wouldn’t exist.
\let\bbl at inikv@date\bbl at inikv
\let\bbl at inikv@typography\bbl at inikv
\let\bbl at inikv@characters\bbl at inikv
-\bbl at csarg\let{bbl at inikv@characters.casing}\bbl at inikv
\let\bbl at inikv@numbers\bbl at inikv
% \end{macrocode}
%
@@ -11640,7 +11638,8 @@ wouldn’t exist.
\def\bbl at tempa##1 ##2{%
\bbl at casemapping{##1}%
\ifx\@empty##2\else\bbl at afterfi\bbl at tempa##2\fi}%
- \edef\bbl at tempe{#1}% Language
+ \edef\bbl at templ{#1}% Language
+ \def\bbl at tempe{0}% Mode (upper/lower...)
\def\bbl at tempc{#2 }% Casing list
\expandafter\bbl at tempa\bbl at tempc\@empty}
\def\bbl at casemapping#1{%
@@ -11653,13 +11652,24 @@ wouldn’t exist.
\fi
\expandafter\bbl at casemapping@i\bbl at tempb\@@}
\def\bbl at casemapping@i#1#2#3\@@{%
- \ifx\relax#3\relax
- \BabelUppercaseMapping{\bbl at tempe}{\bbl at utftocode{#1}}{#2}%
- \BabelLowercaseMapping{\bbl at tempe}{\bbl at utftocode{#2}}{#1}%
+ \in@{#1#3}{<>}%
+ \ifin@
+ \edef\bbl at tempe{%
+ \if#2u1 \else\if#2l2 \else\if#2t3 \else\if#2m4 \fi\fi\fi\fi}%
\else
- \BabelTitlecaseMapping{\bbl at tempe}{\bbl at utftocode{#1}}{#2}%
- \BabelUppercaseMapping{\bbl at tempe}{\bbl at utftocode{#1}}{#3}%
- \BabelLowercaseMapping{\bbl at tempe}{\bbl at utftocode{#3}}{#1}%
+ \ifcase\bbl at tempe\relax
+ \BabelUppercaseMapping{\bbl at templ}{\bbl at utftocode{#1}}{#2}%
+ \BabelLowercaseMapping{\bbl at templ}{\bbl at utftocode{#2}}{#1}%
+ \or
+ \BabelUppercaseMapping{\bbl at templ}{\bbl at utftocode{#1}}{#2}%
+ \or
+ \BabelLowercaseMapping{\bbl at templ}{\bbl at utftocode{#1}}{#2}%
+ \or
+ \BabelTitlecaseMapping{\bbl at templ}{\bbl at utftocode{#1}}{#2}%
+ \or
+ \@namedef{c__text_uppercase_\string#1_tl}{#2}%
+ \@namedef{c__text_lowercase_\string#2_tl}{#1}%
+ \fi
\fi}
% \end{macrocode}
%
diff --git a/babel.ins b/babel.ins
index 8167ecb..5a16d02 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{2023/11/30}
+\def\filedate{2023/12/02}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 0da3b71..6debc75 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index c72cf0d..f4fb9af 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2023/11/30 v3.97.33470]
+\ProvidesFile{bbcompat.dtx}[2023/12/02 v3.97.33650]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.