diff options
Diffstat (limited to 'Master/texmf-dist/tex')
12 files changed, 118 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index 87b4bc87125..d26dea6ff9c 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/09/26 3.24 Babel common definitions] +\ProvidesFile{babel.def}[2018/10/03 3.25 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -1314,6 +1314,8 @@ \let\bbl@KVP@hyphenrules\@nil \let\bbl@KVP@mapfont\@nil \let\bbl@KVP@maparabic\@nil + \let\bbl@KVP@intraspace\@nil + \let\bbl@KVP@intrapenalty\@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}}% @@ -1345,12 +1347,14 @@ \\\foreignlanguage{\languagename}% {####1}}}}% {}% + % To override script and language names \ifx\bbl@KVP@script\@nil\else \bbl@csarg\edef{sname@#2}{\bbl@KVP@script}% \fi \ifx\bbl@KVP@language\@nil\else \bbl@csarg\edef{lname@#2}{\bbl@KVP@language}% \fi + % For bidi texts, to switch the language based on direction \ifx\bbl@KVP@mapfont\@nil\else \bbl@ifsamestring{\bbl@KVP@mapfont}{direction}{}% {\bbl@error{Option `\bbl@KVP@mapfont' unknown for\\% @@ -1366,13 +1370,16 @@ \let\bbl@mapselect\relax \edef\bbl@prefontid{\fontid\font}}% \def\bbl@mapdir##1{% - {\def\languagename{##1}\bbl@switchfont + {\def\languagename{##1}% + \let\bbl@ifrestoring\@firstoftwo % avoid font warning + \bbl@switchfont \directlua{Babel.fontmap [\the\csname bbl@wdir@##1\endcsname]% [\bbl@prefontid]=\fontid\font}}}% \fi \bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}% \fi + % For Southeast Asian, if interspace in ini \ifcase\bbl@engine\or \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else @@ -1398,8 +1405,30 @@ \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@ \fi}% \or - %% TODO - xetex + \bbl@ifunset{bbl@intsp@\languagename}{}% + {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else + \ifx\bbl@KVP@intraspace\@nil + \bbl@exp{% + \\\bbl@intraspace\bbl@cs{intsp@\languagename}\\\@@}% + \fi + \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 + \ifx\bbl@ispacesize\@undefined + \AtBeginDocument{% + \expandafter\bbl@add + \csname selectfont \endcsname{\bbl@ispacesize}}% + \def\bbl@ispacesize{\bbl@cs{xeisp@\bbl@cs{sbcp@\languagename}}}% + \fi}% \fi + % Native digits, if provided in ini \ifcase\bbl@engine\else \bbl@ifunset{bbl@dgnat@\languagename}{}% {\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else @@ -1416,6 +1445,7 @@ \fi \fi}% \fi + % To load or reaload the babel-*.tex, if require.babel in ini \bbl@ifunset{bbl@rqtex@\languagename}{}% {\expandafter\ifx\csname bbl@rqtex@\languagename\endcsname\@empty\else \let\BabelBeforeIni\@gobbletwo @@ -1708,13 +1738,7 @@ \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, 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}}}}} + \bbl@csarg\bbl@toglobal{lsys@#1}} \def\bbl@ini@ids#1{% \def\BabelBeforeIni##1##2{% \begingroup diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index 6a16f6bb909..221bc62f33b 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/09/26 3.24 The Babel package] +\ProvidesPackage{babel}[2018/10/03 3.25 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 ace448f12bb..31a45fe1d36 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/09/26 3.24 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2018/10/03 3.25 Babel hyphens] \xdef\bbl@format{\jobname} \ifx\AtBeginDocument\@undefined \def\@empty{} diff --git a/Master/texmf-dist/tex/generic/babel/locale/km/babel-khmer.tex b/Master/texmf-dist/tex/generic/babel/locale/km/babel-khmer.tex index f8cf086111a..3ba0fa6a5b7 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/km/babel-khmer.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/km/babel-khmer.tex @@ -9,4 +9,23 @@ \fi \BabelBeforeIni{km}{% } + +\addto\datekhmer{% + \babel@save\BabelDated + \def\BabelDated#1{{\expandafter\khmerdigits\expandafter{#1}}}% + \babel@save\BabelDatey + \def\BabelDatey#1{{\expandafter\khmerdigits\expandafter{#1}}}} + +\ifcase\bbl@engine\or\or + \bbl@tentative{khmer}% + \bbl@add\extraskhmer{% + \XeTeXlinebreaklocale "kh" + \bbl@xeisp@Khmr + \bbl@xeipn@Khmr + } + \bbl@add\noextraskhmer{% + \XeTeXlinebreaklocale "en" + } +\fi + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini index 701fe382291..e1982e22111 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/km/babel-km.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2018-09-07 +version = 1.3 +date = 2018-10-02 name.local = ខ្មែរ name.english = Khmer name.babel = khmer @@ -24,6 +24,7 @@ script.tag.opentype = khmr level = 1 encodings = derivate = no +require.babel = khmer [captions] preface = អារម្ភកថា diff --git a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lao.tex b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lao.tex index d2d995ffacf..af23d42cb97 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lao.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lao.tex @@ -9,4 +9,15 @@ \fi \BabelBeforeIni{lo}{% } + +\ifcase\bbl@engine\or\or + \bbl@tentative{lao}% + \addto\extraslao{% + \XeTeXlinebreaklocale "lo" + \bbl@xeisp@Laoo + \bbl@xeipn@Laoo} + \addto\noextraslao{% + \XeTeXlinebreaklocale "en"} +\fi + \endinput
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini index 255e260db93..885852cb907 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/lo/babel-lo.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.2 -date = 2018-09-07 +version = 1.3 +date = 2018-10-02 name.local = ລາວ name.english = Lao name.babel = lao @@ -24,6 +24,7 @@ script.tag.opentype = lao level = 1 encodings = derivate = no +require.babel = lao [captions] preface = ຄໍານໍາ diff --git a/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex b/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex index 994b33fe302..e8c2517a87d 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex +++ b/Master/texmf-dist/tex/generic/babel/locale/th/babel-thai.tex @@ -16,10 +16,10 @@ \ifcase\bbl@engine\or\or \bbl@tentative{thai}% - % \XeTeXlinebreakskip should be reset with \fontsize \addto\extrasthai{% \XeTeXlinebreaklocale "th" - \XeTeXlinebreakskip 0em plus .1em} + \bbl@xeisp@Thai + \bbl@xeipn@Thai} \addto\noextrasthai{% \XeTeXlinebreaklocale "en"} \fi diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 22bc238a7c7..8d7467cf185 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -417,10 +417,11 @@ \ifx\fontspec\@undefined \usepackage{fontspec}% \fi - \EnableBabelHook{babel-fontspec}% + \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} \newcommand\bbl@bblfont[2][]{% 1=features 2=fontname \bbl@ifunset{\bbl@tempb family}{\bbl@providefam{\bbl@tempb}}{}% + % For the default font, just in case: \bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% \expandafter\bbl@ifblank\expandafter{\bbl@tempa}% {\bbl@csarg\edef{\bbl@tempb dflt@}{<>{#1}{#2}}% save bbl@rmdflt@ @@ -457,8 +458,9 @@ \def\bbl@tempa{% \bbl@warning{The current font is not a standard family:\\% \fontname\font\\% - Script and Language are not applied. Consider defining a\\% - new family with \string\babelfont. Reported}}% + Script and Language are not applied. Consider\\% + defining a new family with \string\babelfont.\\% + Reported}}% \bbl@foreach\bbl@font@fams{% don't gather with prev for \bbl@ifunset{bbl@##1dflt@\languagename}% {\bbl@cs{famrst@##1}% @@ -481,8 +483,18 @@ \def\bbl@fontspec@set#1#2#3{% eg \bbl@rmdflt@lang fnt-opt fnt-nme \let\bbl@tempe\bbl@mapselect \let\bbl@mapselect\relax - \bbl@exp{\<fontspec_set_family:Nnn>\\#1% - {\bbl@cs{lsys@\languagename},#2}}{#3}% + \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@\languagename}}% + {\\\newfontscript{\bbl@cs{sname@\languagename}}% + {\bbl@cs{sotf@\languagename}}}% + \<keys_if_exist:nnF>{fontspec-opentype}% + {Language/\bbl@cs{lname@\languagename}}% + {\\\newfontlanguage{\bbl@cs{lname@\languagename}}% + {\bbl@cs{lotf@\languagename}}}% + \<fontspec_set_family:Nnn>\\#1% + {\bbl@cs{lsys@\languagename},#2}}{#3}% ie \bbl@exp{..}{#3} \let\bbl@mapselect\bbl@tempe \bbl@toglobal#1}% \def\bbl@font@rst#1#2#3#4{% diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 8790e7636f2..588216ac805 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/09/26 3.24 Nil language] +\ProvidesLanguage{nil}[2018/10/03 3.25 Nil language] \LdfInit{nil}{datenil} \ifx\l@nohyphenation\@undefined \@nopatterns{nil} diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def index ad9c532c5da..3487910b226 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/09/26 3.24 Babel switching mechanism] +\ProvidesFile{switch.def}[2018/10/03 3.25 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.24} -\def\bbl@date{2018/09/26} +\def\bbl@version{3.25} +\def\bbl@date{2018/10/03} \def\adddialect#1#2{% \global\chardef#1#2\relax \bbl@usehooks{adddialect}{{#1}{#2}}% diff --git a/Master/texmf-dist/tex/generic/babel/xebabel.def b/Master/texmf-dist/tex/generic/babel/xebabel.def index 4e1433a00bc..cd47364b3c6 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -45,6 +45,12 @@ \AddBabelHook{xetex}{stopcommands}{% \xebbl@stop \let\xebbl@stop\relax} +\def\bbl@intraspace#1 #2 #3\@@{% + \bbl@csarg\gdef{xeisp@\bbl@cs{sbcp@\languagename}}% + {\XeTeXlinebreakskip #1em plus #2em minus #3em\relax}} +\def\bbl@intrapenalty#1\@@{% + \bbl@csarg\gdef{xeipn@\bbl@cs{sbcp@\languagename}}% + {\XeTeXlinebreakpenalty #1\relax}} \AddBabelHook{xetex}{loadkernel}{% \begingroup % Reset chars "80-"C0 to category "other", no case mapping: @@ -85,10 +91,11 @@ \ifx\fontspec\@undefined \usepackage{fontspec}% \fi - \EnableBabelHook{babel-fontspec}% + \EnableBabelHook{babel-fontspec}% Just calls \bbl@switchfont \bbl@bblfont} \newcommand\bbl@bblfont[2][]{% 1=features 2=fontname \bbl@ifunset{\bbl@tempb family}{\bbl@providefam{\bbl@tempb}}{}% + % For the default font, just in case: \bbl@ifunset{bbl@lsys@\languagename}{\bbl@provide@lsys{\languagename}}{}% \expandafter\bbl@ifblank\expandafter{\bbl@tempa}% {\bbl@csarg\edef{\bbl@tempb dflt@}{<>{#1}{#2}}% save bbl@rmdflt@ @@ -125,8 +132,9 @@ \def\bbl@tempa{% \bbl@warning{The current font is not a standard family:\\% \fontname\font\\% - Script and Language are not applied. Consider defining a\\% - new family with \string\babelfont. Reported}}% + Script and Language are not applied. Consider\\% + defining a new family with \string\babelfont.\\% + Reported}}% \bbl@foreach\bbl@font@fams{% don't gather with prev for \bbl@ifunset{bbl@##1dflt@\languagename}% {\bbl@cs{famrst@##1}% @@ -149,8 +157,18 @@ \def\bbl@fontspec@set#1#2#3{% eg \bbl@rmdflt@lang fnt-opt fnt-nme \let\bbl@tempe\bbl@mapselect \let\bbl@mapselect\relax - \bbl@exp{\<fontspec_set_family:Nnn>\\#1% - {\bbl@cs{lsys@\languagename},#2}}{#3}% + \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@\languagename}}% + {\\\newfontscript{\bbl@cs{sname@\languagename}}% + {\bbl@cs{sotf@\languagename}}}% + \<keys_if_exist:nnF>{fontspec-opentype}% + {Language/\bbl@cs{lname@\languagename}}% + {\\\newfontlanguage{\bbl@cs{lname@\languagename}}% + {\bbl@cs{lotf@\languagename}}}% + \<fontspec_set_family:Nnn>\\#1% + {\bbl@cs{lsys@\languagename},#2}}{#3}% ie \bbl@exp{..}{#3} \let\bbl@mapselect\bbl@tempe \bbl@toglobal#1}% \def\bbl@font@rst#1#2#3#4{% |