summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/babel/babel.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/babel/babel.dtx')
-rw-r--r--Master/texmf-dist/source/latex/babel/babel.dtx72
1 files changed, 55 insertions, 17 deletions
diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx
index aa4c096b0d2..4bf1f3e84de 100644
--- a/Master/texmf-dist/source/latex/babel/babel.dtx
+++ b/Master/texmf-dist/source/latex/babel/babel.dtx
@@ -1,7 +1,7 @@
% \iffalse
% This document requires lualatex
%%
-%% Copyright (C) 2012-2023 Javier Bezos and Johannes L. Braams.
+%% Copyright (C) 2012-2024 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/12/10 v3.99 The Babel package]
+\ProvidesFile{babel.dtx}[2024/01/07 v24.1 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -90,17 +90,23 @@
localization}}
\ExplSyntaxOn
\newcommand\New[1]{%
- \regex_extract_once:nnN{(\d\d?)\.(\d\d)}{#1}\bbltempa
+ \regex_extract_once:nnN{(\d\d?)\.(\d\d?)}{#1}\bbltempa
\seq_pop_right:NN\bbltempa\bbltempb
\seq_pop_right:NN\bbltempa\bbltempa
\colorbox[rgb]{.92, .86, .73}%
{New~#1%
\quark_if_no_value:NTF\bbltempb{}%
- {~\ifnum\bbltempa>2 \ifnum\bbltempb>34
+ {~
+ \ifnum\bbltempa>2 \ifnum\bbltempb>34
\href{https://latex3.github.io/babel/news/%
whats-new-in-babel-\bbltempa.\bbltempb.html}%
{\raisebox{.15ex}{$\oplus$}}%
- \fi\fi}}\enspace\ignorespaces}
+ \fi\fi
+ \ifnum\bbltempa>23
+ \href{https://latex3.github.io/babel/news/%
+ whats-new-in-babel-\bbltempa.\bbltempb.html}%
+ {\raisebox{.15ex}{$\oplus$}}%
+ \fi}}\enspace\ignorespaces}
\ExplSyntaxOff
\definecolor{thered}{rgb}{0.65,0.04,0.07}
\definecolor{thegrey}{gray}{0.8}
@@ -275,7 +281,8 @@ are highlighted with \New{X.XX}\hspace{-.5em}
(\raisebox{.15ex}{$\oplus$} is a link to the \babel{} site), and there
are some notes for the latest versions in
\href{https://latex3.github.io/babel/}{the \babel{} site}. The most
-recent features can be still unstable.
+recent features can be still unstable. Remember version 24.1 follows
+3.99, because of a new numbering scheme.
\item[\sffamily\color{messages}Can I help?] Sure! If you are interested
in the \TeX{} multilingual support, please join the
@@ -1465,7 +1472,7 @@ Or also:
\item[Hebrew] Niqqud marks seem to work in both engines, but depending
on the font cantillation marks might be misplaced (\xetex{} or
\luatex{} with Harfbuzz seems better).
-\item[Devanagari] In \luatex{} and the the default renderer many fonts
+\item[Devanagari] In \luatex{} and the default renderer many fonts
work, but some others do not, the main issue being the ‘ra’. You may
need to set explicitly the script to either |deva| or |dev2|, eg:
\begin{verbatim}
@@ -2972,7 +2979,7 @@ line breaking mode is not really ‘sloppy’ (in other words, overfull
boxes are reported as usual).
The second and the third are for the Arabic script. It sets the
-linebreaking and justification method, which can be based on the the
+linebreaking and justification method, which can be based on the
\textsc{arabic tatweel} character or in the ‘justification
alternatives’ OpenType table (\texttt{jalt}). For an explanation see
the
@@ -3628,6 +3635,9 @@ a non-syllabic preposition or conjunction into a non-breaking space.}
\trans{Finnish}{prehyphen.nobreak}{Line breaks just after hyphens
prepended to words are prevented, like in “pakastekaapit ja -arkut”.}
+\trans{French}{punctuation.space}{Rules for proper spacing with
+characters \textit{;:!?«»} are applied.}
+
\trans{Greek}{diaeresis.hyphen}{Removes the diaeresis above iota and
upsilon if hyphenated just before. It works with the three variants.}
@@ -3901,6 +3911,13 @@ current language.
however, must be large enough for many uses).
\end{warning}
+\Describe{interchar=}{\meta{interchar-list}}
+
+\New{24.1} This key in |\babelprovide| activates predefined rules for
+the ‘provided’ locale. Currently there is a set of rules for French
+named |punctuation.space|, which applies proper spacing with characters
+\textit{;:!?«»}.
+
\subsection{Selection based on BCP 47 tags}
\label{bcp47}
@@ -5678,8 +5695,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.99>>
-%<<date=2023/12/10>>
+%<<version=24.1>>
+%<<date=2024/01/07>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10202,7 +10219,7 @@ wouldn’t exist.
\bbl@vforeach{captions,date,import,main,script,language,%
hyphenrules,linebreaking,justification,mapfont,maparabic,%
mapdigits,intraspace,intrapenalty,onchar,transforms,alph,%
- Alph,labels,labels*,calendar,date,casing}%
+ Alph,labels,labels*,calendar,date,casing,interchar}%
{\bbl@csarg\let{KVP@##1}\@nnil}%
\global\let\bbl@release@transforms\@empty
\global\let\bbl@release@casing\@empty
@@ -12872,9 +12889,17 @@ wouldn’t exist.
\csname bbl@mod@\CurrentOption\endcsname
\bbl@exp{\\\AtBeginDocument{%
\\\bbl@usehooks@lang{\CurrentOption}{begindocument}{{\CurrentOption}}}}}%
- {\bbl@error{%
+ {\IfFileExists{babel-#1.tex}%
+ {\def\bbl@tempa{%
+ .\\There is a locale ini file for this language.\\%
+ If it’s the main language, try adding `provide=*'\\%
+ to the babel package options}}%
+ {\let\bbl@tempa\empty}%
+ \bbl@error{%
Unknown option '\CurrentOption'. Either you misspelled it\\%
- or the language definition file \CurrentOption.ldf was not found}{%
+ or the language definition file \CurrentOption.ldf\\%
+ was not found%
+ \bbl@tempa}{%
Valid options are, among others: shorthands=, KeepShorthandsActive,\\%
activeacute, activegrave, noconfigs, safe=, main=, math=\\%
headfoot=, strings=, config=, hyphenmap=, or a language name.}}}
@@ -13954,6 +13979,18 @@ wouldn’t exist.
% special case, hyphens are stored as |\bbl@upto|, to deal with ranges.
%
% \begin{macrocode}
+\newcommand\IfBabelIntercharT[1]{%
+ \let\bbl@tempa\@gobble % Assume to ignore
+ \edef\bbl@tempb{\zap@space#1 \@empty}%
+ \ifx\bbl@KVP@interchar\@nnil\else
+ \bbl@replace\bbl@KVP@interchar{ }{,}%
+ \bbl@foreach\bbl@tempb{%
+ \bbl@xin@{,##1,}{,\bbl@KVP@interchar,}%
+ \ifin@
+ \let\bbl@tempa\@firstofone
+ \fi}%
+ \fi
+ \bbl@tempa}
\newcommand\babelcharclass[3]{%
\EnableBabelHook{babel-interchar}%
\bbl@csarg\newXeTeXintercharclass{xeclass@#2@#1}%
@@ -14013,9 +14050,9 @@ wouldn’t exist.
\bbl@exp{\\\bbl@for\\\bbl@tempb{\zap@space#4 \@empty}}{%
\XeTeXinterchartoks
\@nameuse{bbl@xeclass@\bbl@tempa @%
- \bbl@ifunset{bbl@xeclass@\bbl@tempa @#2}{}{#2}}
+ \bbl@ifunset{bbl@xeclass@\bbl@tempa @#2}{}{#2}} %
\@nameuse{bbl@xeclass@\bbl@tempb @%
- \bbl@ifunset{bbl@xeclass@\bbl@tempb @#2}{}{#2}}
+ \bbl@ifunset{bbl@xeclass@\bbl@tempb @#2}{}{#2}} %
= \expandafter{%
\csname bbl@ic@\bbl@kv@label @#2\expandafter\endcsname
\csname\zap@space bbl@xeinter@\bbl@kv@label
@@ -14151,7 +14188,8 @@ wouldn’t exist.
% \subsection{8-bit TeX}
%
% Which start just above, because some code is shared with \xetex. Now,
-% 8-bit specific stuff.
+% 8-bit specific stuff. If just one encoding has been declared, then
+% asume no switching is necessary (1).
%
% \begin{macrocode}
%<*texxet>
@@ -14165,7 +14203,7 @@ wouldn’t exist.
\bbl@foreach\bbl@tempe{%
\def\bbl@tempd{##1}% Save last declared
\advance\count@\@ne}%
- \ifnum\count@>\@ne
+ \ifnum\count@>\@ne % (1)
\getlocaleproperty*\bbl@tempa{#1}{identification/encodings}%
\ifx\bbl@tempa\relax \let\bbl@tempa\@empty \fi
\bbl@replace\bbl@tempa{ }{,}%