From f179cfe8b834f54150dcfb4a1eec882f36dd1136 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 15 Oct 2019 22:02:11 +0000 Subject: babel (15oct19) git-svn-id: svn://tug.org/texlive/trunk@52400 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/babel/README.md | 16 +- Master/texmf-dist/doc/latex/babel/babel.pdf | Bin 701228 -> 702531 bytes Master/texmf-dist/source/latex/babel/babel.dtx | 184 +++++++++++++-------- Master/texmf-dist/source/latex/babel/babel.ins | 2 +- Master/texmf-dist/source/latex/babel/bbcompat.dtx | 2 +- Master/texmf-dist/source/latex/babel/locale.zip | Bin 710458 -> 710458 bytes .../tex/generic/babel/babel-bidi-basic-r.lua | 6 +- .../tex/generic/babel/babel-bidi-basic.lua | 3 +- .../tex/generic/babel/babel-data-bidi.lua | 7 +- Master/texmf-dist/tex/generic/babel/babel.def | 105 +++++++----- Master/texmf-dist/tex/generic/babel/babel.sty | 38 +++-- Master/texmf-dist/tex/generic/babel/hyphen.cfg | 2 +- Master/texmf-dist/tex/generic/babel/luababel.def | 9 +- Master/texmf-dist/tex/generic/babel/nil.ldf | 2 +- Master/texmf-dist/tex/generic/babel/switch.def | 6 +- Master/texmf-dist/tex/generic/babel/xebabel.def | 9 +- 16 files changed, 243 insertions(+), 148 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index 5c1718d7638..d0aa4349451 100644 --- a/Master/texmf-dist/doc/latex/babel/README.md +++ b/Master/texmf-dist/doc/latex/babel/README.md @@ -1,4 +1,4 @@ -## Babel 3.34 +## Babel 3.35 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -51,18 +51,24 @@ respective authors. ### Latest changes ``` +3.35 2019-10-15 + - \markboth and \markright made robust with a recent LaTeX. + - Shorthands work in bibs and refs even with safe=none. + - Fix - Another issue related to \ensureascii and LGR (#30) + - A temporary hack for issue #25. + 3.34 2019-09-27 - Improved compatibility for \babelfont vs \setmainfont. - - Fix - active ' entered in an infinite loop with lua. + - Fix - active ' entered in an infinite loop with lua (#27). - Fix - main in \babelprovide was not set until begin document. - + 3.33 2019-07-19 - \prehyphenchar set to 0 in languages requiring it: kannada, marathi, tamil, etc. (lua). - \AddBabelHook can be set for specific languages. - - Fix - !\grq in T1 behaved like the ligature !`. + - Fix - !\grq in T1 behaved like the ligature !` (#19). - Minimal preliminary support for the experimental harftex. - + 3.32 2019-06-03 - CJK line breaking is now disabled in verbatim (lua). - New - \babelcharproperty, to change the direction, mirroring diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf index 5d548ccc3ef..fe5f5e86d2e 100644 Binary files a/Master/texmf-dist/doc/latex/babel/babel.pdf and b/Master/texmf-dist/doc/latex/babel/babel.pdf differ diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index 86d4890e348..398c5e4ae3b 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -31,7 +31,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2019/09/27 v3.34 The Babel package] +\ProvidesFile{babel.dtx}[2019/10/15 v3.35 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -1023,11 +1023,13 @@ using them; see above. shorthands is safe. With \texttt{safe=bib} only |\nocite|, |\bibcite| and |\bibitem| are redefined. With |safe=ref| only |\newlabel|, |\ref| and |\pageref| are redefined (as well as a few macros from -\textsf{varioref} and \textsf{ifthen}). With |safe=none| no macro is -redefined. This option is strongly recommended, because a good deal of -incompatibilities and errors are related to these redefinitions -- of -course, in such a case you cannot use shorthands in these macros, but -this is not a real problem (just use ``allowed'' characters). +\textsf{varioref} and \textsf{ifthen}). + +With |safe=none| no macro is redefined. This option is strongly +recommended, because a good deal of incompatibilities and errors are +related to these redefinitions. As of \New{3.34}, in $\epsilon$\TeX{} +based engines (ie, almost every engine except the oldest ones) +shorthands can be used in these macros (formerly you could not). \Describe{math=}{\texttt{active} $\string|$ \texttt{normal}} Shorthands are mainly intended for text, not for math. By setting this @@ -4071,8 +4073,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<> -%<> +%<> +%<> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -4210,25 +4212,30 @@ help from Bernd Raichle, for which I am grateful. % it is based on |\ifcsname|, which is more efficient, and do not % waste memory. % +% \changes{babel~3.35}{2019/09/22}{Inside a group, so that \cs{ifcsname} +% is still undefined.} +% % \begin{macrocode} -\def\bbl@ifunset#1{% - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi} -\bbl@ifunset{ifcsname}% - {}% - {\def\bbl@ifunset#1{% - \ifcsname#1\endcsname - \expandafter\ifx\csname#1\endcsname\relax - \bbl@afterelse\expandafter\@firstoftwo +\begingroup + \gdef\bbl@ifunset#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + \bbl@ifunset{ifcsname}% + {}% + {\gdef\bbl@ifunset#1{% + \ifcsname#1\endcsname + \expandafter\ifx\csname#1\endcsname\relax + \bbl@afterelse\expandafter\@firstoftwo + \else + \bbl@afterfi\expandafter\@secondoftwo + \fi \else - \bbl@afterfi\expandafter\@secondoftwo - \fi - \else - \expandafter\@firstoftwo - \fi}} + \expandafter\@firstoftwo + \fi}} +\endgroup % \end{macrocode} % \end{macro} % @@ -6079,28 +6086,43 @@ help from Bernd Raichle, for which I am grateful. % The command |\active@prefix| which is used in the expansion of % active characters has a function similar to |\OT1-cmd| in that it % |\protect|s the active character whenever |\protect| is -% \emph{not} |\@typeset@protect|. -% -% \begin{macrocode} -\def\active@prefix#1{% - \ifx\protect\@typeset@protect - \else -% \end{macrocode} -% -% When |\protect| is set to |\@unexpandable@protect| we make sure -% that the active character is als \emph{not} expanded by inserting -% |\noexpand| in front of it. The |\@gobble| is needed to remove +% \emph{not} |\@typeset@protect|. The |\@gobble| is needed to remove % a token such as |\activechar:| (when the double colon was the -% active character to be dealt with). +% active character to be dealt with). There are two definitions, +% depending of |\ifincsname| is available. If there is, the +% expansion will be more robust. +% +% \changes{babel 3.35}{2019/09/18}{Added \cs{ifincsname} test.} % % \begin{macrocode} - \ifx\protect\@unexpandable@protect - \noexpand#1% - \else - \protect#1% - \fi - \expandafter\@gobble - \fi} +\begingroup +\bbl@ifunset{ifincsname}% + {\gdef\active@prefix#1{% + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\@gobble + \fi}} + {\gdef\active@prefix#1{% + \ifincsname + \string#1% + \expandafter\@gobble + \else + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\expandafter\expandafter\@gobble + \fi + \fi}} +\endgroup % \end{macrocode} % % \end{macro} @@ -8060,7 +8082,13 @@ help from Bernd Raichle, for which I am grateful. \let\bbl@KVP@mapdigits\@nil \let\bbl@KVP@intraspace\@nil \let\bbl@KVP@intrapenalty\@nil - \bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling + \bbl@forkv{#1}{% TODO - error handling + \in@{/}{##1}% + \ifin@ + \bbl@renewinikey##1\@@{##2}% + \else + \bbl@csarg\def{KVP@##1}{##2}% + \fi}% \ifx\bbl@KVP@import\@nil\else \bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}% {\begingroup @@ -8432,10 +8460,7 @@ help from Bernd Raichle, for which I am grateful. % Move trims here ?? \bbl@ifunset{bbl@KVP@\bbl@section/\bbl@tempa}% {\expandafter\bbl@inireader\bbl@tempa=##2\@@}% - {\def\bbl@tempc{\expandafter\bbl@inireader\bbl@tempa=}% - \expandafter\expandafter\expandafter - \bbl@tempc\csname bbl@KVP@\bbl@section/\bbl@tempa\endcsname\@@}% - \global\bbl@csarg\let{KVP@\bbl@section/\bbl@tempa}\relax}% + {}}% \let\bbl@inireader\bbl@iniskip \bbl@info{Importing data from babel-#1.ini for \languagename}% \loop @@ -8460,9 +8485,15 @@ help from Bernd Raichle, for which I am grateful. % \begin{macrocode} \def\bbl@iniskip#1\@@{}% if starts with ; \def\bbl@inisec[#1]#2\@@{% if starts with opening bracket + \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% + \@nameuse{bbl@renew@\bbl@section}% + \global\bbl@csarg\let{renew@\bbl@section}\relax \@nameuse{bbl@secpost@\bbl@section}% ends previous section \def\bbl@section{#1}% - \@nameuse{bbl@secpre@\bbl@section}% starts current section + \def\bbl@elt##1##2{% + \@namedef{bbl@KVP@#1/##1}{}}% + \@nameuse{bbl@renew@#1}% + \@nameuse{bbl@secpre@#1}% starts current section \bbl@ifunset{bbl@inikv@#1}% {\let\bbl@inireader\bbl@iniskip}% {\bbl@exp{\let\\\bbl@inireader\}}} @@ -9067,6 +9098,9 @@ help from Bernd Raichle, for which I am grateful. % the mark are not disabled by the output routine kicking in while % \cs{@safe@activestrue} is in effect. % +% \changes{babel~3.35}{2019/10/11}{Now \cs{markboth} is protected. +% Consider this case.} +% % \begin{macrocode} \bbl@trace{Marks} \IfBabelLayout{sectioning} @@ -9079,7 +9113,8 @@ help from Bernd Raichle, for which I am grateful. \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}% \fi} {\ifbbl@single\else - \bbl@redefine\markright#1{% + \bbl@ifunset{markright }\bbl@redefine\bbl@redefinerobust + \markright#1{% \bbl@ifblank{#1}% {\org@markright{}}% {\toks@{#1}% @@ -9098,7 +9133,9 @@ help from Bernd Raichle, for which I am grateful. % headings for the page. While doing so they also store a copy of % |\markboth| in |\@mkboth|. Therefore we need to check whether % |\@mkboth| has already been set. If so we neeed to do that again -% with the new definition of |\markboth|. +% with the new definition of |\markboth|. (As of Oct 2019, \LaTeX{} +% stores the definition in an intermediate macros, so it's not +% necessary anymore, but it's preserved for older versions.) % % \begin{macrocode} \ifx\@mkboth\markboth @@ -9106,12 +9143,8 @@ help from Bernd Raichle, for which I am grateful. \else \def\bbl@tempc{} \fi -% \end{macrocode} -% -% Now we can start the new definition of |\markboth| -% -% \begin{macrocode} - \bbl@redefine\markboth#1#2{% + \bbl@ifunset{markboth }\bbl@redefine\bbl@redefinerobust + \markboth#1#2{% \protected@edef\bbl@tempb##1{% \protect\foreignlanguage {\languagename}{\protect\bbl@restore@actives##1}}% @@ -9122,11 +9155,6 @@ help from Bernd Raichle, for which I am grateful. {\@temptokena{}}% {\@temptokena\expandafter{\bbl@tempb{#2}}}% \bbl@exp{\\\org@markboth{\the\toks@}{\the\@temptokena}}} -% \end{macrocode} -% -% and copy it to |\@mkboth| if necessary. -% -% \begin{macrocode} \bbl@tempc \fi} % end ifbbl@single, end \IfBabelLayout % \end{macrocode} @@ -9386,10 +9414,11 @@ help from Bernd Raichle, for which I am grateful. % \changes{babel~3.9j}{2014/03/17}{Moved misplaced code - it should be % executed only with LaTeX} % \changes{babel~3.23}{2018/08/28}{Added TS1, T3, TS3} +% \changes{babel~3.35}{2019/10/01}{Added PU, PD1} % % \begin{macrocode} \bbl@trace{Encoding and fonts} -\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU} +\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU,PU,PD1} \newcommand\BabelNonText{TS1,T3,TS3} \let\org@TeX\TeX \let\org@LaTeX\LaTeX @@ -11272,9 +11301,12 @@ help from Bernd Raichle, for which I am grateful. \bbl@warning{The current font is not a babel standard family:\\% #1% \fontname\font\\% - There is nothing intrinsically wrong with it, but\\% - 'babel' will no set Script and Language. Consider\\% - defining a new family with \string\babelfont.\\% + There is nothing intrinsically wrong with this warning, and\\% + you can ignore it altogether if you do not need these\\% + families. But if they are used in the document, you should be\\% + aware 'babel' will no set Script and Language for them, so\\% + you may consider defining a new family with \string\babelfont.\\% + See the manual for further details about \string\babelfont.\\% Reported}} {}}% \gdef\bbl@switchfont{% @@ -12504,6 +12536,8 @@ help from Bernd Raichle, for which I am grateful. % \subsection{Auto bidi with \texttt{basic} and \texttt{basic-r}} % % \changes{babel~3.14}{2017/09/30}{LuaTeX - support for R/AL texts - basic-r} +% \changes{babel~3.35}{2019/10/11}{Hack for unboxed boxes - The PUAs +% are `on'.} % % The file \textsf{babel-data-bidi.lua} currently only contains data. It is % a large and boring file and it's not shown here. See the generated @@ -12515,19 +12549,24 @@ help from Bernd Raichle, for which I am grateful. Babel = Babel or {} +-- TODO: merge ranges into characters, as meta index + Babel.ranges={ {0x0590, 0x05FF, 'r'}, {0x0600, 0x07BF, 'al'}, {0x07C0, 0x085F, 'r'}, {0x0860, 0x086F, 'al'}, {0x08A0, 0x08FF, 'al'}, + {0xE000, 0xF8FF, 'on'}, -- PUA {0xFB1D, 0xFB4F, 'r'}, {0xFB50, 0xFDFF, 'al'}, {0xFE70, 0xFEFF, 'al'}, {0x10800, 0x10C4F, 'r'}, {0x1E800, 0x1E8DF, 'r'}, {0x1E900, 0x1E95F, 'r'}, - {0x1F300, 0x1F9FF, 'on'} + {0x1F300, 0x1F9FF, 'on'}, + {0xF0000, 0xFFFFD, 'on'}, -- PUA + {0x100000, 0x10FFFD, 'on'} -- PUA } Babel.characters={ @@ -18854,7 +18893,7 @@ function Babel.bidi(head, ispar) if mir == 'rrr' or mir == 'lrr' or mir == 'rrl' or mir == 'rlr' then for ch in node.traverse(node.next(last_lr)) do if ch == item then break end - if ch.id == node.id'glyph' then + if ch.id == node.id'glyph' and characters[ch.char] then ch.char = characters[ch.char].m or ch.char end end @@ -18883,7 +18922,9 @@ function Babel.bidi(head, ispar) % \begin{macrocode} if last_lr and outer == 'r' then for ch in node.traverse_id(node.id'glyph', node.next(last_lr)) do - ch.char = characters[ch.char].m or ch.char + if characters[ch.char] then + ch.char = characters[ch.char].m or ch.char + end end end if first_n then @@ -19215,7 +19256,8 @@ function Babel.bidi(head, ispar, hdir) for r = first_on, q - 1 do nodes[r][2] = temp item = nodes[r][1] -- MIRRORING - if Babel.mirroring_enabled and item.id == GLYPH and temp == 'r' then + if Babel.mirroring_enabled and item.id == GLYPH + and temp == 'r' and characters[item.char] then item.char = characters[item.char].m or item.char end end diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index c0e8e5bfb57..f8a7dbbfebe 100644 --- a/Master/texmf-dist/source/latex/babel/babel.ins +++ b/Master/texmf-dist/source/latex/babel/babel.ins @@ -26,7 +26,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. %% -\def\filedate{2019/09/27} +\def\filedate{2019/10/15} \def\batchfile{babel.ins} \input docstrip.tex diff --git a/Master/texmf-dist/source/latex/babel/bbcompat.dtx b/Master/texmf-dist/source/latex/babel/bbcompat.dtx index 8b58d8b7c73..2692f30f20e 100644 --- a/Master/texmf-dist/source/latex/babel/bbcompat.dtx +++ b/Master/texmf-dist/source/latex/babel/bbcompat.dtx @@ -30,7 +30,7 @@ % % \iffalse %<*dtx> -\ProvidesFile{bbcompat.dtx}[2019/09/27 v3.34] +\ProvidesFile{bbcompat.dtx}[2019/10/15 v3.35] % % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip index 3ff88ec8f46..07b086828ce 100644 Binary files a/Master/texmf-dist/source/latex/babel/locale.zip and b/Master/texmf-dist/source/latex/babel/locale.zip differ diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua index a39c69bed77..67377b7517e 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua @@ -171,7 +171,7 @@ function Babel.bidi(head, ispar) if mir == 'rrr' or mir == 'lrr' or mir == 'rrl' or mir == 'rlr' then for ch in node.traverse(node.next(last_lr)) do if ch == item then break end - if ch.id == node.id'glyph' then + if ch.id == node.id'glyph' and characters[ch.char] then ch.char = characters[ch.char].m or ch.char end end @@ -187,7 +187,9 @@ function Babel.bidi(head, ispar) end if last_lr and outer == 'r' then for ch in node.traverse_id(node.id'glyph', node.next(last_lr)) do - ch.char = characters[ch.char].m or ch.char + if characters[ch.char] then + ch.char = characters[ch.char].m or ch.char + end end end if first_n then diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua index d1fb3c00fce..f75a2ea9205 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua @@ -338,7 +338,8 @@ function Babel.bidi(head, ispar, hdir) for r = first_on, q - 1 do nodes[r][2] = temp item = nodes[r][1] -- MIRRORING - if Babel.mirroring_enabled and item.id == GLYPH and temp == 'r' then + if Babel.mirroring_enabled and item.id == GLYPH + and temp == 'r' and characters[item.char] then item.char = characters[item.char].m or item.char end end diff --git a/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua b/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua index 584796078b1..41eddf3a116 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-data-bidi.lua @@ -36,19 +36,24 @@ Babel = Babel or {} +-- TODO: merge ranges into characters, as meta index + Babel.ranges={ {0x0590, 0x05FF, 'r'}, {0x0600, 0x07BF, 'al'}, {0x07C0, 0x085F, 'r'}, {0x0860, 0x086F, 'al'}, {0x08A0, 0x08FF, 'al'}, + {0xE000, 0xF8FF, 'on'}, -- PUA {0xFB1D, 0xFB4F, 'r'}, {0xFB50, 0xFDFF, 'al'}, {0xFE70, 0xFEFF, 'al'}, {0x10800, 0x10C4F, 'r'}, {0x1E800, 0x1E8DF, 'r'}, {0x1E900, 0x1E95F, 'r'}, - {0x1F300, 0x1F9FF, 'on'} + {0x1F300, 0x1F9FF, 'on'}, + {0xF0000, 0xFFFFD, 'on'}, -- PUA + {0x100000, 0x10FFFD, 'on'} -- PUA } Babel.characters={ diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index d655e4faa53..5fe9abb09e7 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}[2019/09/27 3.34 Babel common definitions] +\ProvidesFile{babel.def}[2019/10/15 3.35 Babel common definitions] \ifx\AtBeginDocument\@undefined \input plain.def\relax \fi @@ -141,24 +141,26 @@ \bbl@tempa{ } \long\def\bbl@trim@i#1\@nil#2\relax#3{#3{#1}} \long\def\bbl@trim@def#1{\bbl@trim{\def#1}} -\def\bbl@ifunset#1{% - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi} -\bbl@ifunset{ifcsname}% - {}% - {\def\bbl@ifunset#1{% - \ifcsname#1\endcsname - \expandafter\ifx\csname#1\endcsname\relax - \bbl@afterelse\expandafter\@firstoftwo +\begingroup + \gdef\bbl@ifunset#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + \bbl@ifunset{ifcsname}% + {}% + {\gdef\bbl@ifunset#1{% + \ifcsname#1\endcsname + \expandafter\ifx\csname#1\endcsname\relax + \bbl@afterelse\expandafter\@firstoftwo + \else + \bbl@afterfi\expandafter\@secondoftwo + \fi \else - \bbl@afterfi\expandafter\@secondoftwo - \fi - \else - \expandafter\@firstoftwo - \fi}} + \expandafter\@firstoftwo + \fi}} +\endgroup \def\bbl@ifblank#1{% \bbl@ifblank@i#1\@nil\@nil\@secondoftwo\@firstoftwo\@nil} \long\def\bbl@ifblank@i#1#2\@nil#3#4#5\@nil{#4} @@ -567,16 +569,34 @@ \else \bbl@afterfi\csname#1@sh@#2@sel\endcsname \fi} -\def\active@prefix#1{% - \ifx\protect\@typeset@protect - \else - \ifx\protect\@unexpandable@protect - \noexpand#1% - \else - \protect#1% - \fi - \expandafter\@gobble - \fi} +\begingroup +\bbl@ifunset{ifincsname}% + {\gdef\active@prefix#1{% + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\@gobble + \fi}} + {\gdef\active@prefix#1{% + \ifincsname + \string#1% + \expandafter\@gobble + \else + \ifx\protect\@typeset@protect + \else + \ifx\protect\@unexpandable@protect + \noexpand#1% + \else + \protect#1% + \fi + \expandafter\expandafter\expandafter\@gobble + \fi + \fi}} +\endgroup \newif\if@safe@actives \@safe@activesfalse \def\bbl@restore@actives{\if@safe@actives\@safe@activesfalse\fi} @@ -1371,7 +1391,13 @@ \let\bbl@KVP@mapdigits\@nil \let\bbl@KVP@intraspace\@nil \let\bbl@KVP@intrapenalty\@nil - \bbl@forkv{#1}{\bbl@csarg\def{KVP@##1}{##2}}% TODO - error handling + \bbl@forkv{#1}{% TODO - error handling + \in@{/}{##1}% + \ifin@ + \bbl@renewinikey##1\@@{##2}% + \else + \bbl@csarg\def{KVP@##1}{##2}% + \fi}% \ifx\bbl@KVP@import\@nil\else \bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}% {\begingroup @@ -1714,10 +1740,7 @@ % Move trims here ?? \bbl@ifunset{bbl@KVP@\bbl@section/\bbl@tempa}% {\expandafter\bbl@inireader\bbl@tempa=##2\@@}% - {\def\bbl@tempc{\expandafter\bbl@inireader\bbl@tempa=}% - \expandafter\expandafter\expandafter - \bbl@tempc\csname bbl@KVP@\bbl@section/\bbl@tempa\endcsname\@@}% - \global\bbl@csarg\let{KVP@\bbl@section/\bbl@tempa}\relax}% + {}}% \let\bbl@inireader\bbl@iniskip \bbl@info{Importing data from babel-#1.ini for \languagename}% \loop @@ -1734,9 +1757,15 @@ \@ifnextchar[\bbl@inisec{\@ifnextchar;\bbl@iniskip\bbl@inipreread}#1\@@}% ] \def\bbl@iniskip#1\@@{}% if starts with ; \def\bbl@inisec[#1]#2\@@{% if starts with opening bracket + \def\bbl@elt##1##2{\bbl@inireader##1=##2\@@}% + \@nameuse{bbl@renew@\bbl@section}% + \global\bbl@csarg\let{renew@\bbl@section}\relax \@nameuse{bbl@secpost@\bbl@section}% ends previous section \def\bbl@section{#1}% - \@nameuse{bbl@secpre@\bbl@section}% starts current section + \def\bbl@elt##1##2{% + \@namedef{bbl@KVP@#1/##1}{}}% + \@nameuse{bbl@renew@#1}% + \@nameuse{bbl@secpre@#1}% starts current section \bbl@ifunset{bbl@inikv@#1}% {\let\bbl@inireader\bbl@iniskip}% {\bbl@exp{\let\\\bbl@inireader\}}} @@ -1997,7 +2026,8 @@ \noexpand\babelsublr{\unexpanded\expandafter{\thepage}}}}% \fi} {\ifbbl@single\else - \bbl@redefine\markright#1{% + \bbl@ifunset{markright }\bbl@redefine\bbl@redefinerobust + \markright#1{% \bbl@ifblank{#1}% {\org@markright{}}% {\toks@{#1}% @@ -2009,7 +2039,8 @@ \else \def\bbl@tempc{} \fi - \bbl@redefine\markboth#1#2{% + \bbl@ifunset{markboth }\bbl@redefine\bbl@redefinerobust + \markboth#1#2{% \protected@edef\bbl@tempb##1{% \protect\foreignlanguage {\languagename}{\protect\bbl@restore@actives##1}}% @@ -2095,7 +2126,7 @@ } \@onlypreamble\substitutefontfamily \bbl@trace{Encoding and fonts} -\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU} +\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU,PU,PD1} \newcommand\BabelNonText{TS1,T3,TS3} \let\org@TeX\TeX \let\org@LaTeX\LaTeX diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index d4da81cfb83..53b77216948 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/09/27 3.34 The Babel package] +\ProvidesPackage{babel}[2019/10/15 3.35 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone} @@ -91,24 +91,26 @@ \bbl@tempa{ } \long\def\bbl@trim@i#1\@nil#2\relax#3{#3{#1}} \long\def\bbl@trim@def#1{\bbl@trim{\def#1}} -\def\bbl@ifunset#1{% - \expandafter\ifx\csname#1\endcsname\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi} -\bbl@ifunset{ifcsname}% - {}% - {\def\bbl@ifunset#1{% - \ifcsname#1\endcsname - \expandafter\ifx\csname#1\endcsname\relax - \bbl@afterelse\expandafter\@firstoftwo +\begingroup + \gdef\bbl@ifunset#1{% + \expandafter\ifx\csname#1\endcsname\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + \bbl@ifunset{ifcsname}% + {}% + {\gdef\bbl@ifunset#1{% + \ifcsname#1\endcsname + \expandafter\ifx\csname#1\endcsname\relax + \bbl@afterelse\expandafter\@firstoftwo + \else + \bbl@afterfi\expandafter\@secondoftwo + \fi \else - \bbl@afterfi\expandafter\@secondoftwo - \fi - \else - \expandafter\@firstoftwo - \fi}} + \expandafter\@firstoftwo + \fi}} +\endgroup \def\bbl@ifblank#1{% \bbl@ifblank@i#1\@nil\@nil\@secondoftwo\@firstoftwo\@nil} \long\def\bbl@ifblank@i#1#2\@nil#3#4#5\@nil{#4} diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index 830f587b6fb..c8e9d9a1f14 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}[2019/09/27 3.34 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2019/10/15 3.35 Babel hyphens] \xdef\bbl@format{\jobname} \ifx\AtBeginDocument\@undefined \def\@empty{} diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index 2508b19f91b..0e5b0b731e9 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -532,9 +532,12 @@ \bbl@warning{The current font is not a babel standard family:\\% #1% \fontname\font\\% - There is nothing intrinsically wrong with it, but\\% - 'babel' will no set Script and Language. Consider\\% - defining a new family with \string\babelfont.\\% + There is nothing intrinsically wrong with this warning, and\\% + you can ignore it altogether if you do not need these\\% + families. But if they are used in the document, you should be\\% + aware 'babel' will no set Script and Language for them, so\\% + you may consider defining a new family with \string\babelfont.\\% + See the manual for further details about \string\babelfont.\\% Reported}} {}}% \gdef\bbl@switchfont{% diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index 30e9ceb01eb..4c14ce974ae 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}[2019/09/27 3.34 Nil language] +\ProvidesLanguage{nil}[2019/10/15 3.35 Nil language] \LdfInit{nil}{datenil} \ifx\l@nil\@undefined \newlanguage\l@nil diff --git a/Master/texmf-dist/tex/generic/babel/switch.def b/Master/texmf-dist/tex/generic/babel/switch.def index 9b43136cbbe..7bd71338472 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}[2019/09/27 3.34 Babel switching mechanism] +\ProvidesFile{switch.def}[2019/10/15 3.35 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.34} -\def\bbl@date{2019/09/27} +\def\bbl@version{3.35} +\def\bbl@date{2019/10/15} \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 f3ab376c6f8..cadb25901c2 100644 --- a/Master/texmf-dist/tex/generic/babel/xebabel.def +++ b/Master/texmf-dist/tex/generic/babel/xebabel.def @@ -124,9 +124,12 @@ \bbl@warning{The current font is not a babel standard family:\\% #1% \fontname\font\\% - There is nothing intrinsically wrong with it, but\\% - 'babel' will no set Script and Language. Consider\\% - defining a new family with \string\babelfont.\\% + There is nothing intrinsically wrong with this warning, and\\% + you can ignore it altogether if you do not need these\\% + families. But if they are used in the document, you should be\\% + aware 'babel' will no set Script and Language for them, so\\% + you may consider defining a new family with \string\babelfont.\\% + See the manual for further details about \string\babelfont.\\% Reported}} {}}% \gdef\bbl@switchfont{% -- cgit v1.2.3