diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/luababel.def')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 8d7467cf185..0f08afd5b2a 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -475,16 +475,18 @@ \def\bbl@font@set#1#2#3{% eg \bbl@rmdflt@lang \rmdefault \rmfamily \bbl@xin@{<>}{#1}% \ifin@ - \bbl@exp{\\\bbl@fontspec@set\\#1\expandafter\@gobbletwo#1}% + \bbl@exp{\\\bbl@fontspec@set\\#1\expandafter\@gobbletwo#1\\#3}% \fi \bbl@exp{% - \def\\#2{#1}% eg, \rmdefault{\bbl@rmdflt@lang} + \def\\#2{#1}% eg, \rmdefault{\bbl@rmdflt@lang} \\\bbl@ifsamestring{#2}{\f@family}{\\#3\let\\\bbl@tempa\relax}{}}} -\def\bbl@fontspec@set#1#2#3{% eg \bbl@rmdflt@lang fnt-opt fnt-nme +\def\bbl@fontspec@set#1#2#3#4{% eg \bbl@rmdflt@lang fnt-opt fnt-nme \xxfamily \let\bbl@tempe\bbl@mapselect \let\bbl@mapselect\relax - \bbl@exp{% TODO - should be global, but even local does its job - % I'm still not sure -- must investigate + \let\bbl@temp@fam#4% eg, '\rmfamily', to be restored below + \let#4\relax % So that can be used with \newfontfamily + \bbl@exp{% + \let\\\bbl@temp@pfam\<\bbl@stripslash#4\space>% eg, '\rmfamily ' \<keys_if_exist:nnF>{fontspec-opentype}% {Script/\bbl@cs{sname@\languagename}}% {\\\newfontscript{\bbl@cs{sname@\languagename}}% @@ -493,10 +495,15 @@ {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}% + \\\newfontfamily\\#4% + [\bbl@cs{lsys@\languagename},#2]}{#3}% ie \bbl@exp{..}{#3} + \begingroup + #4% + \xdef#1{\f@family}% eg, \bbl@rmdflt@lang{FreeSerif(0)} + \endgroup + \let#4\bbl@temp@fam + \bbl@exp{\let\<\bbl@stripslash#4\space>}\bbl@temp@pfam + \let\bbl@mapselect\bbl@tempe}% \def\bbl@font@rst#1#2#3#4{% \bbl@csarg\def{famrst@#4}{\bbl@font@set{#1}#2#3}} \def\bbl@font@fams{rm,sf,tt} @@ -549,9 +556,9 @@ \fi \ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout \ifx\bbl@beforeforeign\leavevmode % A poor test for bidi= - \def\bbl@nextfake#1{% - \mathdir\bodydir % non-local, use always inside a group! + \def\bbl@nextfake#1{% non-local changes - always inside a group! \bbl@exp{% + \mathdir\the\bodydir #1% Once entered in math, set boxes to restore values \everyvbox{% \the\everyvbox |