summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/babel.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-24 21:27:50 +0000
committerKarl Berry <karl@freefriends.org>2021-03-24 21:27:50 +0000
commit45491db9ecb6686384257f5f3c0b3927716f7393 (patch)
tree6c3c9017ea55245586c4a3602be5d31698869f9b /Master/texmf-dist/tex/generic/babel/babel.def
parent4b61c48d71003f644004c8031f91a916d0a3b23a (diff)
babel (24mar21)
git-svn-id: svn://tug.org/texlive/trunk@58684 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel.def')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def42
1 files changed, 39 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index 60c7c172e36..98495230347 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.def
+++ b/Master/texmf-dist/tex/generic/babel/babel.def
@@ -39,7 +39,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{babel.def}[2021/03/03 3.55 Babel common definitions]
+\ProvidesFile{babel.def}[2021/03/24 3.56 Babel common definitions]
\ifx\AtBeginDocument\@undefined % TODO. change test.
% == Code for plain ==
\def\@empty{}
@@ -397,8 +397,8 @@
\fi
\countdef\last@language=19 % TODO. why? remove?
\def\addlanguage{\csname newlanguage\endcsname}
-\def\bbl@version{3.55}
-\def\bbl@date{2021/03/03}
+\def\bbl@version{3.56}
+\def\bbl@date{2021/03/24}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%
@@ -2335,6 +2335,7 @@
\let\bbl@KVP@intraspace\@nil
\let\bbl@KVP@intrapenalty\@nil
\let\bbl@KVP@onchar\@nil
+ \let\bbl@KVP@transforms\@nil
\let\bbl@KVP@alph\@nil
\let\bbl@KVP@Alph\@nil
\let\bbl@KVP@labels\@nil
@@ -2377,6 +2378,10 @@
\ifx\bbl@KVP@captions\@nil
\let\bbl@KVP@captions\bbl@KVP@import
\fi
+ % ==
+ \ifx\bbl@KVP@transforms\@nil\else
+ \bbl@replace\bbl@KVP@transforms{ }{,}%
+ \fi
% Load ini
\bbl@ifunset{date#2}%
{\bbl@provide@new{#2}}%
@@ -2893,6 +2898,7 @@
From babel-\bbl@cs{lini@\languagename}.ini:\\%
\bbl@cs{@kv@identification.warning#1}\\%
Reported }}}
+\let\bbl@release@transforms\@empty
\def\bbl@ini@exports#1{%
% Identification always exported
\bbl@iniwarning{}%
@@ -2918,6 +2924,8 @@
\ifbbl@bcptoname
\bbl@csarg\xdef{bcp@map@\bbl@cl{tbcp}}{\languagename}%
\fi
+ % Finish here transforms, too
+ \bbl@release@transforms\relax % \relax closes the last item.
% Conditional
\ifnum#1>\z@ % 0 = only info, 1, 2 = basic, (re)new
\bbl@exportkey{lnbrk}{typography.linebreaking}{h}%
@@ -3208,6 +3216,34 @@
\bbl@replace@finish@iii\bbl@toreplace}
\def\bbl@datecntr{\expandafter\bbl@xdatecntr\expandafter}
\def\bbl@xdatecntr[#1|#2]{\localenumeral{#2}{#1}}
+\let\bbl@release@transforms\@empty
+\@namedef{bbl@inikv@transforms.prehyphenation}{%
+ \bbl@transforms\babelprehyphenation}
+\@namedef{bbl@inikv@transforms.posthyphenation}{%
+ \bbl@transforms\babelposthyphenation}
+\def\bbl@transforms@aux#1#2#3,#4\relax{#1{#2}{#3}{#4}}
+\begingroup
+ \catcode`\%=12
+ \catcode`\&=14
+ \gdef\bbl@transforms#1#2#3{&%
+ \ifx\bbl@KVP@transforms\@nil\else
+ \directlua{
+ str = [==[#2]==]
+ str = str:gsub('%.%d+%.%d+$', '')
+ tex.print([[\def\string\babeltempa{]] .. str .. [[}]])
+ }&%
+ \bbl@xin@{,\babeltempa,}{,\bbl@KVP@transforms,}&%
+ \ifin@
+ \in@{.0$}{#2$}&%
+ \ifin@
+ \bbl@add\bbl@release@transforms{&%
+ \relax\bbl@transforms@aux#1{\languagename}{#3}}&%
+ \else
+ \bbl@add\bbl@release@transforms{, {#3}}&%
+ \fi
+ \fi
+ \fi}
+\endgroup
\def\bbl@provide@lsys#1{%
\bbl@ifunset{bbl@lname@#1}%
{\bbl@load@info{#1}}%