diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.sty | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index eab6b9801f0..2f1039ca17e 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -34,7 +34,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2023/05/11 v3.89 The Babel package] +\ProvidesPackage{babel}[2023/06/26 v3.90 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone @@ -470,8 +470,8 @@ \expandafter\@secondoftwo \fi} \fi -\def\bbl@version{3.89} -\def\bbl@date{2023/05/11} +\def\bbl@version{3.90} +\def\bbl@date{2023/06/26} \ifx\language\@undefined \csname newcount\endcsname\language \fi @@ -1190,12 +1190,13 @@ \string\providecommand\string\babel@aux[2]{}}% \immediate\write\@mainaux{\string\@nameuse{bbl@beforestart}}% \fi - \expandafter\selectlanguage\expandafter{\bbl@main@language}% \ifbbl@single % must go after the line above. \renewcommand\selectlanguage[1]{}% \renewcommand\foreignlanguage[2]{#2}% \global\let\babel@aux\@gobbletwo % Also as flag \fi} +\AddToHook{begindocument/before}{% + \expandafter\selectlanguage\expandafter{\bbl@main@language}} \ifcase\bbl@engine\or \AtBeginDocument{\pagedir\bodydir} % TODO - a better place \fi @@ -2592,9 +2593,10 @@ \let\\\@Alph\<bbl@cntr@\bbl@KVP@Alph @\languagename>}}% \fi % == Casing == - \bbl@exp{\def\<bbl@casing@\languagename>% - {\<bbl@lbcp@\languagename>% - \ifx\bbl@KVP@casing\@nnil\else-x-\bbl@KVP@casing\fi}}% + \ifx\bbl@KVP@casing\@nnil\else + \bbl@csarg\xdef{casing@\languagename}% + {\@nameuse{bbl@casing@\languagename}-x-\bbl@KVP@casing}% + \fi % == Calendars == \ifx\bbl@KVP@calendar\@nnil \edef\bbl@KVP@calendar{\bbl@cl{calpr}}% @@ -2962,9 +2964,9 @@ \bbl@exp{\\\bbl@exportkey{lname}{identification.name.opentype}% {\csname bbl@elname@\languagename\endcsname}}% \bbl@exportkey{tbcp}{identification.tag.bcp47}{}% - \bbl@exportkey{lbcp}{identification.language.tag.bcp47}{}% % Somewhat hackish. TODO - \bbl@exportkey{casing}{identification.language.tag.bcp47}{}% + \bbl@exportkey{casing}{identification.tag.bcp47}{}% + \bbl@exportkey{lbcp}{identification.language.tag.bcp47}{}% \bbl@exportkey{lotf}{identification.tag.opentype}{dflt}% \bbl@exportkey{esname}{identification.script.name}{}% \bbl@exp{\\\bbl@exportkey{sname}{identification.script.name.opentype}% @@ -3505,6 +3507,16 @@ {\bbl@cs{\csname bbl@info@#1.tag.bcp47\endcsname @#2}}}} \fi \@namedef{bbl@info@casing.tag.bcp47}{casing} +\newcommand\BabelUppercaseMapping[3]{% + \let\bbl@tempx\languagename + \edef\languagename{#1}% + \DeclareUppercaseMapping[\BCPdata{casing}]{#2}{#3}% + \let\languagename\bbl@tempx} +\newcommand\BabelLowercaseMapping[3]{% + \let\bbl@tempx\languagename + \edef\languagename{#1}% + \DeclareLowercaseMapping[\BCPdata{casing}]{#2}{#3}% + \let\languagename\bbl@tempx} \let\bbl@ensureinfo\@gobble \newcommand\BabelEnsureInfo{% \ifx\InputIfFileExists\@undefined\else @@ -3924,7 +3936,7 @@ \bbl@trace{Loading basic (internal) bidi support} \ifodd\bbl@engine \else % TODO. Move to txtbabel - \ifnum\bbl@bidimode>100 \ifnum\bbl@bidimode<200 + \ifnum\bbl@bidimode>100 \ifnum\bbl@bidimode<200 % Any xe+lua bidi= \bbl@error {The bidi method 'basic' is available only in\\% luatex. I'll continue with 'bidi=default', so\\% @@ -3942,7 +3954,7 @@ \bbl@loadfontspec % bidi needs fontspec \usepackage#1{bidi}}% \fi} - \ifnum\bbl@bidimode>200 + \ifnum\bbl@bidimode>200 % Any xe bidi= \ifcase\expandafter\@gobbletwo\the\bbl@bidimode\or \bbl@tentative{bidi=bidi} \bbl@loadxebidi{} @@ -3953,7 +3965,7 @@ \fi \fi \fi -\ifnum\bbl@bidimode=\@ne +\ifnum\bbl@bidimode=\@ne % Any bidi= except default=1 \let\bbl@beforeforeign\leavevmode \ifodd\bbl@engine \newattribute\bbl@attr@dir @@ -4065,7 +4077,7 @@ \newtoks\everypar \everypar=\bbl@severypar \bbl@severypar{\bbl@xeeverypar\the\everypar}} - \ifnum\bbl@bidimode>200 + \ifnum\bbl@bidimode>200 % Any xe bidi= \let\bbl@textdir@i\@gobbletwo \let\bbl@xebidipar\@empty \AddBabelHook{bidi}{foreign}{% |