summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/babel.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel.def')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.def73
1 files changed, 50 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def
index 1b65f99346f..ba2a930334f 100644
--- a/Master/texmf-dist/tex/generic/babel/babel.def
+++ b/Master/texmf-dist/tex/generic/babel/babel.def
@@ -41,7 +41,7 @@
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{babel.def}[2019/04/22 3.30 Babel common definitions]
+\ProvidesFile{babel.def}[2019/05/04 3.31 Babel common definitions]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -379,6 +379,8 @@
\def\main@language#1{%
\def\bbl@main@language{#1}%
\let\languagename\bbl@main@language
+ \bbl@id@assign
+ \chardef\localeid\@nameuse{bbl@id@@\languagename}%
\bbl@patterns{\languagename}}
\AtBeginDocument{%
\expandafter\selectlanguage\expandafter{\bbl@main@language}%
@@ -1361,7 +1363,6 @@
\catcode`\[=12 \catcode`\]=12 \catcode`\==12 %
\let\bbl@ini@captions@aux\@gobbletwo
\def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}%
- \let\bbl@inikv@typography\bbl@iniskip
\bbl@read@ini{##1}%
\bbl@exportkey{chrng}{characters.ranges}{}%
\bbl@exportkey{dgnat}{numbers.digits.native}{}%
@@ -1405,27 +1406,44 @@
\ifcase\bbl@engine\or
\bbl@ifunset{bbl@intsp@\languagename}{}%
{\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else
- \bbl@seaintraspace
- \ifx\bbl@KVP@intraspace\@nil
- \bbl@exp{%
- \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
- \fi
- \directlua{
- Babel = Babel or {}
- Babel.sea_ranges = Babel.sea_ranges or {}
- Babel.set_chranges('\bbl@cs{sbcp@\languagename}',
- '\bbl@cs{chrng@\languagename}')
- }
- \ifx\bbl@KVP@intrapenalty\@nil
- \bbl@intrapenalty0\@@
- \fi
- \fi
- \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
- \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@
- \fi
- \ifx\bbl@KVP@intrapenalty\@nil\else
- \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
- \fi}%
+ \bbl@xin@{\bbl@cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore}%
+ \ifin@
+ \bbl@cjkintraspace
+ \directlua{
+ Babel = Babel or {}
+ Babel.locale_props = Babel.locale_props or {}
+ Babel.locale_props[\the\localeid].linebreak = 'c'
+ }%
+ \ifx\bbl@KVP@intraspace\@nil
+ \bbl@exp{%
+ \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil
+ \bbl@intrapenalty0\@@
+ \fi
+ \else
+ \bbl@seaintraspace
+ \ifx\bbl@KVP@intraspace\@nil
+ \bbl@exp{%
+ \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}%
+ \fi
+ \directlua{
+ Babel = Babel or {}
+ Babel.sea_ranges = Babel.sea_ranges or {}
+ Babel.set_chranges('\bbl@cs{sbcp@\languagename}',
+ '\bbl@cs{chrng@\languagename}')
+ }%
+ \ifx\bbl@KVP@intrapenalty\@nil
+ \bbl@intrapenalty0\@@
+ \fi
+ \fi
+ \fi
+ \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini
+ \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@
+ \fi
+ \ifx\bbl@KVP@intrapenalty\@nil\else
+ \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@
+ \fi}%
\or
\bbl@xin@{\bbl@cs{sbcp@\languagename}}{Thai,Laoo,Khmr}%
\ifin@
@@ -2089,6 +2107,15 @@
\fi
\else
\global\bbl@csarg\chardef{wdir@#1}\z@
+ \fi
+ \ifodd\bbl@engine
+ \bbl@csarg\ifcase{wdir@#1}%
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'l' }%
+ \or
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'r' }%
+ \or
+ \directlua{ Babel.locale_props[\the\localeid].textdir = 'al' }%
+ \fi
\fi}
\def\bbl@switchdir{%
\bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}%