summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/babel.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel.sty')
-rw-r--r--Master/texmf-dist/tex/generic/babel/babel.sty39
1 files changed, 25 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty
index e866fbbdd6a..d4da81cfb83 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}[2019/07/19 3.33 The Babel package]
+\ProvidesPackage{babel}[2019/09/27 3.34 The Babel package]
\@ifpackagewith{babel}{debug}
{\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}%
\let\bbl@debug\@firstofone}
@@ -72,6 +72,12 @@
#2}}
\long\def\bbl@afterelse#1\else#2\fi{\fi#1}
\long\def\bbl@afterfi#1\fi{\fi#1}
+\def\bbl@exp#1{%
+ \begingroup
+ \let\\\noexpand
+ \def\<##1>{\expandafter\noexpand\csname##1\endcsname}%
+ \edef\bbl@exp@aux{\endgroup#1}%
+ \bbl@exp@aux}
\def\bbl@tempa#1{%
\long\def\bbl@trim##1##2{%
\futurelet\bbl@trim@a\bbl@trim@c##2\@nil\@nil#1\@nil\relax{##1}}%
@@ -138,9 +144,10 @@
\fi}%
\expandafter\bbl@replace@aux#1#2\bbl@nil#2%
\edef#1{\the\toks@}}
-\expandafter\def\expandafter\bbl@parsedef\detokenize{macro:}#1->#2\relax{%
+\bbl@exp{\def\\\bbl@parsedef##1\detokenize{macro:}}#2->#3\relax{%
\def\bbl@tempa{#1}%
- \def\bbl@tempb{#2}}
+ \def\bbl@tempb{#2}%
+ \def\bbl@tempe{#3}}
\def\bbl@sreplace#1#2#3{%
\begingroup
\expandafter\bbl@parsedef\meaning#1\relax
@@ -148,18 +155,20 @@
\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{%
+ \bbl@xin@{\bbl@tempc}{\bbl@tempe}% If not in macro, do nothing
+ \ifin@
+ \bbl@exp{\\\bbl@replace\\\bbl@tempe{\bbl@tempc}{\bbl@tempd}}%
+ \def\bbl@tempc{% Expanded an executed below as 'uplevel'
+ \\\makeatletter % "internal" macros with @ are assumed
+ \\\scantokens{%
+ \bbl@tempa\\\@namedef{\bbl@stripslash#1}\bbl@tempb{\bbl@tempe}}%
+ \catcode64=\the\catcode64\relax}% Restore @
+ \else
+ \let\bbl@tempc\@empty % Not \relax
+ \fi
+ \bbl@exp{% For the 'uplevel' assignments
\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
- \def\<##1>{\expandafter\noexpand\csname##1\endcsname}%
- \edef\bbl@exp@aux{\endgroup#1}%
- \bbl@exp@aux}
+ \bbl@tempc}} % empty or expand to set #1 with changes
\def\bbl@ifsamestring#1#2{%
\begingroup
\protected@edef\bbl@tempb{#1}%
@@ -313,6 +322,8 @@
\DeclareOption{silent}{}
\DeclareOption{mono}{}
\DeclareOption{shorthands=off}{\bbl@tempa shorthands=\bbl@tempa}
+\newif\ifbbl@single
+\DeclareOption{selectors=off}{\bbl@singletrue}
\DeclareOption{math=active}{}
\DeclareOption{math=normal}{\def\bbl@mathnormal{\noexpand\textormath}}
\DeclareOption{nocase}{}