summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/switch.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-05 21:58:16 +0000
committerKarl Berry <karl@freefriends.org>2018-06-05 21:58:16 +0000
commitf41ffa5c2e0677cf778dbb83fef33fbc6e1ffd2e (patch)
tree7c95b0c2c63007c3b5191898b59b06a756d474dc /Master/texmf-dist/tex/generic/babel/switch.def
parent13f153cc96f71f3c6176f898de6d38059aaed9b9 (diff)
babel (5jun18)
git-svn-id: svn://tug.org/texlive/trunk@47932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/switch.def')
-rw-r--r--Master/texmf-dist/tex/generic/babel/switch.def35
1 files changed, 24 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def
index 2d8ffc05430..02ab5ee5838 100644
--- a/Master/texmf-dist/tex/generic/babel/switch.def
+++ b/Master/texmf-dist/tex/generic/babel/switch.def
@@ -31,12 +31,13 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension |.ins|) which are part of the distribution.
%%
+
\ifx\ProvidesFile\@undefined
\def\ProvidesFile#1[#2 #3 #4]{%
\wlog{File: #1 #4 #3 <#2>}%
\let\ProvidesFile\@undefined}
\fi
-\ProvidesFile{switch.def}[2018/05/10 3.21 Babel switching mechanism]
+\ProvidesFile{switch.def}[2018/06/05 3.22 Babel switching mechanism]
\ifx\AtBeginDocument\@undefined
\input plain.def\relax
\fi
@@ -57,8 +58,8 @@
\countdef\last@language=19
\def\addlanguage{\alloc@9\language\chardef\@cclvi}
\fi
-\def\bbl@version{3.21}
-\def\bbl@date{2018/05/10}
+\def\bbl@version{3.22}
+\def\bbl@date{2018/06/05}
\def\adddialect#1#2{%
\global\chardef#1#2\relax
\bbl@usehooks{adddialect}{{#1}{#2}}%
@@ -143,9 +144,20 @@
\expandafter\bbl@switch\expandafter{\languagename}%
\fi}}
\def\babel@aux#1#2{%
- \select@language{#1}%
- \bbl@foreach\BabelContentsFiles{%
- \@writefile{##1}{\babel@toc{#1}{#2}}}} %% TODO - ok in plain?
+ \expandafter\ifx\csname date#1\endcsname\relax
+ \expandafter\ifx\csname bbl@auxwarn@#1\endcsname\relax
+ \@namedef{bbl@auxwarn@#1}{}%
+ \bbl@warning
+ {Unknown language `#1'. Very likely you\\%
+ requested it in a previous run. Expect some\\%
+ wrong results in this run, which should vanish\\%
+ in the next one. Reported}%
+ \fi
+ \else
+ \select@language{#1}%
+ \bbl@foreach\BabelContentsFiles{%
+ \@writefile{##1}{\babel@toc{#1}{#2}}}% %% TODO - ok in plain?
+ \fi}
\def\babel@toc#1#2{%
\select@language{#1}}
\let\select@language@x\select@language
@@ -373,13 +385,14 @@
{\let\bbl@info\@gobble
\let\bbl@warning\@gobble}
{}
-\def\bbl@nocaption#1#2{% 1: text to be printed 2: caption macro \langXname
- \gdef#2{\textbf{?#1?}}%
- #2%
+\def\bbl@nocaption{\protect\bbl@nocaption@i}
+\def\bbl@nocaption@i#1#2{% 1: text to be printed 2: caption macro \langXname
+ \global\@namedef{#2}{\textbf{?#1?}}%
+ \@nameuse{#2}%
\bbl@warning{%
- \string#2 not set. Please, define\\%
+ \@backslashchar#2 not set. Please, define\\%
it in the preamble with something like:\\%
- \string\renewcommand\string#2{..}\\%
+ \string\renewcommand\@backslashchar#2{..}\\%
Reported}}
\def\@nolanerr#1{%
\bbl@error