diff options
author | Karl Berry <karl@freefriends.org> | 2018-09-02 21:16:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-09-02 21:16:59 +0000 |
commit | 55a6ff0ef3957365f9946be6833ea0470f26dfe1 (patch) | |
tree | 09b5ef19104de5c1b7caceb8d86dbe7353cc404f /Master/texmf-dist/tex | |
parent | 48196732729473c093a5f7d4228ca2db256d0502 (diff) |
babel (2sep18)
git-svn-id: svn://tug.org/texlive/trunk@48551 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua | 23 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.def | 46 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/hyphen.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/nil.ldf | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/plain.def | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/switch.def | 6 |
7 files changed, 58 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua index 44e036b67c8..8fe47ecb80f 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua @@ -102,6 +102,9 @@ function Babel.bidi(head, ispar, hdir) local nodes = {} local outer_first = nil + local glue_d = nil + local glue_i = nil + local has_en = false local first_et = nil @@ -188,10 +191,23 @@ function Babel.bidi(head, ispar, hdir) new_d = false end + if glue_d then + if (d == 'l' and 'l' or 'r') ~= glue_d then + table.insert(nodes, {glue_i, 'on', nil}) + end + glue_d = nil + glue_i = nil + end + elseif item.id == DIR then d = nil new_d = true + elseif item.id == node.id'glue' and item.subtype == 13 then + glue_d = d + glue_i = item + d = nil + else d = nil end @@ -251,13 +267,6 @@ function Babel.bidi(head, ispar, hdir) end prev_d = d table.insert(nodes, {item, d, outer_first}) - else - -- Not sure about the following. Looks too 'ad hoc', but it's - -- required for numbers, so that 89 19 becomes 19 89. It also - -- affects n+cs/es+n. - if prev_d == 'an' or prev_d == 'en' then - table.insert(nodes, {item, 'on', nil}) - end end outer_first = nil diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index 5411afe6282..d13f7573336 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}[2018/06/05 3.22 Babel common definitions] +\ProvidesFile{babel.def}[2018/09/02 3.23 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -265,7 +265,7 @@ \def\bbl@elt##1{% \@nameuse{bbl@hk@##1}{\@nameuse{bbl@ev@##1@#1}#2}}% \@nameuse{bbl@ev@#1}} -\def\bbl@evargs{,% don't delete the comma +\def\bbl@evargs{,% <- don't delete this comma everylanguage=1,loadkernel=1,loadpatterns=1,loadexceptions=1,% adddialect=2,patterns=2,defaultcommands=0,encodedcommands=2,write=0,% beforeextras=0,afterextras=0,stopcommands=0,stringprocess=0,% @@ -680,6 +680,7 @@ \def\bbl@deactivate#1{% \bbl@ifshorthand{#1}{\bbl@s@deactivate{#1}}{}} \fi +\newcommand\ifbabelshorthand[3]{\bbl@ifunset{bbl@active@\string#1}{#3}{#2}} \def\bbl@prim@s{% \prime\futurelet\@let@token\bbl@pr@m@s} \def\bbl@if@primes#1#2{% @@ -1314,6 +1315,14 @@ \let\bbl@KVP@mapfont\@nil \let\bbl@KVP@maparabic\@nil \bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling + \ifx\bbl@KVP@import\@nil\else + \bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}% + {\begingroup + \def\BabelBeforeIni##1##2{\gdef\bbl@KVP@import{##1}\endinput}% + \InputIfFileExists{babel-#2.tex}{}{}% + \endgroup}% + {}% + \fi \ifx\bbl@KVP@captions\@nil \let\bbl@KVP@captions\bbl@KVP@import \fi @@ -1368,8 +1377,13 @@ \expandafter\expandafter\expandafter \bbl@setdigits\csname bbl@dgnat@\languagename\endcsname \ifx\bbl@KVP@maparabic\@nil\else - \expandafter\let\expandafter\@arabic - \csname bbl@counter@\languagename\endcsname + \ifx\bbl@latinarabic\@undefined + \expandafter\let\expandafter\@arabic + \csname bbl@counter@\languagename\endcsname + \else % ie, if layout=counters, which redefines \@arabic + \expandafter\let\expandafter\bbl@latinarabic + \csname bbl@counter@\languagename\endcsname + \fi \fi \fi}% \fi @@ -1647,16 +1661,17 @@ {}% \bbl@csarg\let{lsys@#1}\@empty \bbl@ifunset{bbl@sname@#1}{\bbl@csarg\gdef{sname@#1}{Default}}{}% - \bbl@ifunset{bbl@sotf#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% + \bbl@ifunset{bbl@sotf@#1}{\bbl@csarg\gdef{sotf@#1}{DFLT}}{}% \bbl@csarg\bbl@add@list{lsys@#1}{Script=\bbl@cs{sname@#1}}% \bbl@ifunset{bbl@lname@#1}{}% {\bbl@csarg\bbl@add@list{lsys@#1}{Language=\bbl@cs{lname@#1}}}% - \bbl@csarg\bbl@toglobal{lsys@#1}}% - % \bbl@exp{% TODO - should be global - % \<keys_if_exist:nnF>{fontspec-opentype/Script}{\bbl@cs{sname@#1}}% - % {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% - % \<keys_if_exist:nnF>{fontspec-opentype/Language}{\bbl@cs{lname@#1}}% - % {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} + \bbl@csarg\bbl@toglobal{lsys@#1}%}% + \bbl@exp{% TODO - should be global, but even local does its job + % I'm still not sure -- must investigate + \<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cs{sname@#1}}% + {\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}% + \<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl@cs{lname@#1}}% + {\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}} \def\bbl@ini@ids#1{% \def\BabelBeforeIni##1##2{% \begingroup @@ -1758,7 +1773,9 @@ \g@addto@macro\@resetactivechars{% \set@typeset@protect \expandafter\select@language@x\expandafter{\bbl@main@language}% - \let\protect\noexpand}% + \let\protect\noexpand + \edef\thepage{% + \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}% \fi} {\bbl@redefine\markright#1{% \bbl@ifblank{#1}% @@ -1766,7 +1783,7 @@ {\toks@{#1}% \bbl@exp{% \\\org@markright{\\\protect\\\foreignlanguage{\languagename}% - {\\\protect\\\bbl@restore@actives\the\toks@}}}}} + {\\\protect\\\bbl@restore@actives\the\toks@}}}}}% \ifx\@mkboth\markboth \def\bbl@tempc{\let\@mkboth\markboth} \else @@ -1857,7 +1874,8 @@ } \@onlypreamble\substitutefontfamily \bbl@trace{Encoding and fonts} -\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU,} +\newcommand\BabelNonASCII + {LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU,TS1,T3,TS3} \let\org@TeX\TeX \let\org@LaTeX\LaTeX \let\ensureascii\@firstofone diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index d7136f2a391..dca5d90e568 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -33,7 +33,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2018/06/05 3.22 The Babel package] +\ProvidesPackage{babel}[2018/09/02 3.23 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone} diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 673074b5cdf..45c35c3300c 100644 --- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg +++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg @@ -37,7 +37,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{hyphen.cfg}[2018/06/05 3.22 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2018/09/02 3.23 Babel hyphens] \xdef\bbl@format{\jobname} \ifx\AtBeginDocument\@undefined \def\@empty{} diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 20cac7c0203..736e1566b52 100644 --- a/Master/texmf-dist/tex/generic/babel/nil.ldf +++ b/Master/texmf-dist/tex/generic/babel/nil.ldf @@ -32,7 +32,7 @@ %% extension |.ins|) which are part of the distribution. %% -\ProvidesLanguage{nil}[2018/06/05 3.22 Nil language] +\ProvidesLanguage{nil}[2018/09/02 3.23 Nil language] \LdfInit{nil}{datenil} \ifx\l@nohyphenation\@undefined \@nopatterns{nil} diff --git a/Master/texmf-dist/tex/generic/babel/plain.def b/Master/texmf-dist/tex/generic/babel/plain.def index 3438b5d6785..506cf37dd58 100644 --- a/Master/texmf-dist/tex/generic/babel/plain.def +++ b/Master/texmf-dist/tex/generic/babel/plain.def @@ -156,9 +156,11 @@ \noexpand#1% \fi \noexpand\protect - \expandafter\noexpand\csname\bbl@stripslash#1 \endcsname + \expandafter\noexpand\csname + \expandafter\@gobble\string#1 \endcsname }% - \expandafter\new@command\csname\bbl@stripslash#1 \endcsname + \expandafter\new@command\csname + \expandafter\@gobble\string#1 \endcsname } \def\x@protect#1{% \ifx\protect\@typeset@protect\else diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def index 02ab5ee5838..37a3e1f7416 100644 --- a/Master/texmf-dist/tex/generic/babel/switch.def +++ b/Master/texmf-dist/tex/generic/babel/switch.def @@ -37,7 +37,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{switch.def}[2018/06/05 3.22 Babel switching mechanism] +\ProvidesFile{switch.def}[2018/09/02 3.23 Babel switching mechanism] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -58,8 +58,8 @@ \countdef\last@language=19 \def\addlanguage{\alloc@9\language\chardef\@cclvi} \fi -\def\bbl@version{3.22} -\def\bbl@date{2018/06/05} +\def\bbl@version{3.23} +\def\bbl@date{2018/09/02} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% |