diff options
author | Karl Berry <karl@freefriends.org> | 2019-06-03 21:35:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-06-03 21:35:43 +0000 |
commit | 401c20d6a00afd1b7454fb25a283c88feff3ebfb (patch) | |
tree | 79600a79f1e126e48cc2fab056dbb3accd132d8d /Master/texmf-dist/tex/generic/babel/babel.def | |
parent | 2303aa63c28269972f5897573075238b9d80d5b2 (diff) |
babel (3jun19)
git-svn-id: svn://tug.org/texlive/trunk@51309 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.def | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index ba2a930334f..2500bdb4a0c 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/05/04 3.31 Babel common definitions] +\ProvidesFile{babel.def}[2019/06/03 3.32 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -187,6 +187,22 @@ \fi}% \expandafter\bbl@replace@aux#1#2\bbl@nil#2% \edef#1{\the\toks@}} +\expandafter\def\expandafter\bbl@parsedef\detokenize{macro:}#1->#2\relax{% + \def\bbl@tempa{#1}% + \def\bbl@tempb{#2}} +\def\bbl@sreplace#1#2#3{% + \begingroup + \expandafter\bbl@parsedef\meaning#1\relax + \def\bbl@tempc{#2}% + \edef\bbl@tempc{\expandafter\strip@prefix\meaning\bbl@tempc}% + \def\bbl@tempd{#3}% + \edef\bbl@tempd{\expandafter\strip@prefix\meaning\bbl@tempd}% + \bbl@exp{\\\bbl@replace\\\bbl@tempb{\bbl@tempc}{\bbl@tempd}}% + \bbl@exp{% + \endgroup + \\\makeatletter % "internal" macros with @ are assumed + \\\scantokens{\def\\#1\bbl@tempa{\bbl@tempb}}% + \catcode64=\the\catcode64\relax}} % Restore @ \def\bbl@exp#1{% \begingroup \let\\\noexpand @@ -296,6 +312,10 @@ \def\<bbl@e@#2>{\the\toks@{\bbl@ens@fontenc}}}} \def\bbl@ensure#1#2#3{% 1: include 2: exclude 3: fontenc \def\bbl@tempb##1{% elt for (excluding) \bbl@captionslist list + \ifx##1\@undefined % 3.32 - Don't assume the macros exists + \edef##1{\noexpand\bbl@nocaption + {\bbl@stripslash##1}{\languagename\bbl@stripslash##1}}% + \fi \ifx##1\@empty\else \in@{##1}{#2}% \ifin@\else @@ -1402,11 +1422,14 @@ \fi \bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}% \fi - % For Southeast Asian, if interspace in ini -- TODO: as hook + % For East Asian, Southeast Asian, if interspace in ini - TODO: as hook? + \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini + \bbl@csarg\edef{intsp@#2}{\bbl@KVP@intraspace}% + \fi \ifcase\bbl@engine\or \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else - \bbl@xin@{\bbl@cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore}% + \bbl@xin@{\bbl@cs{sbcp@\languagename}}{Hant,Hans,Jpan,Kore,Kana}% \ifin@ \bbl@cjkintraspace \directlua{ @@ -1414,19 +1437,13 @@ 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 + \bbl@exp{\\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}% \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 + \bbl@exp{\\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}% \directlua{ Babel = Babel or {} Babel.sea_ranges = Babel.sea_ranges or {} @@ -1438,9 +1455,6 @@ \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}% |