From 66f90f5ace150ea89b360d90788c6a3d63fa04f6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 28 Oct 2020 03:02:51 +0000 Subject: CTAN sync 202010280302 --- macros/latex/required/babel/base/README.md | 60 ++---- macros/latex/required/babel/base/babel.dtx | 287 +++++++++++++++++++------- macros/latex/required/babel/base/babel.ins | 4 +- macros/latex/required/babel/base/babel.pdf | Bin 811006 -> 814930 bytes macros/latex/required/babel/base/bbcompat.dtx | 2 +- 5 files changed, 232 insertions(+), 121 deletions(-) (limited to 'macros/latex/required/babel/base') diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md index 217de7c78a..39be13e7db 100644 --- a/macros/latex/required/babel/base/README.md +++ b/macros/latex/required/babel/base/README.md @@ -1,4 +1,4 @@ -## Babel 3.50 +## Babel 3.51 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -7,9 +7,9 @@ lualatex out of the box. A few even work with plain formats. The latest stable version is available on . -Changes in version 3.50 are described in: +Changes in version 3.51 are described in: -https://github.com/latex3/babel/wiki/What's-new-in-babel-3.50 +https://github.com/latex3/babel/wiki/What's-new-in-babel-3.51 Included is a set of ini files for about 250 languages. @@ -43,11 +43,26 @@ respective authors. ### Latest changes ``` +3.51 2020-10-27 + - Common interface to (re)define captions (with + \setlocalecaption). + - frenchspacing filled in many ini files. + - A new internal macro (for ldf files) named \babel@texpdf, to + ease interoperativity with hyperref in shorthands. + - Fixes: + - Error when loading a language on the fly in tabular (#97). + - 'hyphenrules' raised an error with 'base' option (#59). + - Better handling of autoloaded languages (eg, catcodes). + - An error was raised with CJK and a null font (#99). + - language.tag.bcp47 and tag.ini in \localeinfo didn't work + (#102). + 3.50 2020-10-06 - Fixes: - main= stopped working in some cases (#96). - Footnotes were not \long with layout=footnotes. - +https://github.com/latex3/babel/wiki/What's-new-in-babel-3.50 + 3.49 2020-10-03 - BUG. This version has a severe bug with main= (fixed in 3.50). - Allow standard LaTeX syntax to recognize locales based on ini @@ -56,7 +71,7 @@ respective authors. - Fixes: - layout.lists=off didn't work (#94) https://github.com/latex3/babel/wiki/What's-new-in-babel-3.49 - + 3.48 2020-09-01 - New (tentative) tools to customize some labels (like chapters in CJK and Hungarian). @@ -161,51 +176,16 @@ https://github.com/latex3/babel/wiki/What's-new-in-babel-3.43 See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.42 3.41 2020-02-27 - - Counters and numerals added in some ini files, based on those - defined in CSS (Abjad, Alphabetic Hebrew, Japanese, etc.). - - Fix - A bug in the fix for #47, because \@elt was not reset - (#51). - - Fix - Error when french was loaded and an ini file read (#50). - - Fix - A typo in Greek files: Miriad must read Myriad. See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.41 3.40 2020-02-14 - - New ini files for Latin and Greek (xe/lua). - - Add 'other' characters used in hyphenation patters (eg, - apostrophes). - - Fix - Old Plain TeX and Plain XeTeX raised an error. - - Fix - Option T1 in fontenc was not recognized to set - \latinencoding with LaTeX 2020-02-02 (#47) - - Fix - Locale names were hardcoded in some babel-...tex files. See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.40 3.39 2020-02-03 - - Languages can now be loaded on the fly (via \babelprovide). - - With \babelposthyphenation captured chars can now be mapped in - the replacement (lua). - - \babelcharproperty can be used to assign specific chars to a - locale (lua). - - Fixes: - - Sichuan Yi: line breaking was not activated (lua). - - Hyphenation was not always applied with onchar (lua). - - bidi=basic-l/basic-r where not activated correctly (xe). - - Thai and turkish raised and error without import in - \babelprovide. - - Cleaned up some ini/tex locale files (de, zh, sa). See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.39 3.38 2020-01-15 - - Automatic switching of ids (\language and \localeid), and fonts - based on script blocks (lua). - - New macro - \localeinfo, to access the basic data in the ini - file loaded by languages. See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.38 - -3.37 2019-12-08 -See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.37 - -3.36 2019-11-14 -See https://github.com/latex3/babel/wiki/What's-new-in-babel-3.36 ``` Javier Bezos diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx index 6c7fff3f8e..b6b77a34e0 100644 --- a/macros/latex/required/babel/base/babel.dtx +++ b/macros/latex/required/babel/base/babel.dtx @@ -31,7 +31,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2020/10/06 v3.50 The Babel package] +\ProvidesFile{babel.dtx}[2020/10/27 v3.51 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -261,7 +261,9 @@ possible issues can be caught in the development phase. help in some forums like \textsf{tex.stackexchange}, but if you have found a bug, I strongly beg you to report it in \href{https://github.com/latex3/babel/issues}{GitHub}, which is much -better than just complaining on an e-mail list or a web forum. +better than just complaining on an e-mail list or a web forum. Remember +\textit{warnings are not errors} by themselves, they just warn about +possible problems or incompatibilities. \item[\sffamily\color{messages}How can I contribute a new language?] See section \ref{contribute} for contributing a language. @@ -2279,40 +2281,57 @@ to select fonts in addition to the three basic families. \subsection{Modifying a language} -Modifying the behavior of a language (say, the chapter “caption”), is -sometimes necessary, but not always trivial. -\begin{itemize} -\item The old way, still valid for many languages, to redefine a - caption is the following: +Modifying the behavior of a language (say, the chapter +“caption”), is sometimes necessary, but not always trivial. In the case +of caption names a specific macro is provided, because this is perhaps +the most frequent change: + +\Describe{\setlocalecaption}{% + \marg{language-name}\marg{caption-name}\marg{string}} + +\New{3.51} Here \textit{caption-name} is the name as string without the +trailing |name|. An example, which also shows caption names are often a +stylistic choice, is: \begin{verbatim} -\addto\captionsenglish{% - \renewcommand\contentsname{Foo}% -} +\setlocalecaption{english}{contents}{Table of Contents} \end{verbatim} -As of 3.15, there is no need to hide spaces with \texttt{\%% -} (\babel{} removes them), but it is advisable to do so. -\item The new way, which is found in |bulgarian|, |azerbaijani|, - |spanish|, |french|, |turkish|, |icelandic|, |vietnamese| and a few - more, as well as in languages created with |\babelprovide| and its - key |import|, is: +This works not only with existing caption names, because it also serves to +define new ones by setting the \textit{caption-name} to the name of +your choice (|name| will be postpended). Captions so defined or +redefined behave with the ‘new way’ described in the following note. + +\begin{note} + There are a few alternative methods: + \begin{itemize} +\item With data |import|’ed from |ini| files, you can modify the values + of specific keys, like: \begin{verbatim} -\renewcommand\spanishchaptername{Foo} +\babelprovide[import, _captions/listtable = Lista de tablas_]{spanish} \end{verbatim} -\item Macros to be run when a language is selected can be add to - |\extras|\m{lang}: + (In this particular case, instead of the |captions| group you may need + to modify the |captions.licr| one.) + +\item The ‘old way’, still valid for many languages, to redefine a + caption is the following: \begin{verbatim} -\addto\extrasrussian{\mymacro} +\addto\captionsenglish{% + \renewcommand\contentsname{Foo}% +} \end{verbatim} -There is a counterpart for code to be run when a language is -unselected: |\noextras|\m{lang}. -\item With data |import|’ed from |ini| files, you can modify the values -of specific keys, like: + As of 3.15, there is no need to hide spaces with \texttt{\%% + } (\babel{} removes them), but it is advisable to do so. This + redefinition is not activated until the language is selected. + +\item The ‘new way’, which is found in |bulgarian|, |azerbaijani|, + |spanish|, |french|, |turkish|, |icelandic|, |vietnamese| and a few + more, as well as in languages created with |\babelprovide| and its + key |import|, is: \begin{verbatim} -\babelprovide[import, _captions/listtable = Lista de tablas_]{spanish} +\renewcommand\spanishchaptername{Foo} \end{verbatim} -(In this particular case, instead of the |captions| group you may need -to modify the |captions.licr| one.) +This redefinition is immediate. \end{itemize} +\end{note} \begin{note} Do \textit{not} redefine a caption in the following way: \begin{verbatim} @@ -2322,6 +2341,14 @@ The changes may be discarded with a language selector, and the original value restored. \end{note} +Macros to be run when a language is selected can be add to + |\extras|\m{lang}: +\begin{verbatim} +\addto\extrasrussian{\mymacro} +\end{verbatim} +There is a counterpart for code to be run when a language is +unselected: |\noextras|\m{lang}. + \begin{note} These macros (|\captions|\m{lang}, |\extras|\m{lang}) may be redefined, but \textit{must not} be used as such -- they just pass @@ -3354,18 +3381,19 @@ bidirectional (with both R and L paragraphs) documents in \luatex{}. required in \xetex{} and \pdftex{} in some styles (support for the latter two engines is still experimental) \New{3.18}. -\item[tabular] required in \luatex{} for R |tabular| (it has been - tested only with simple tables, so expect some readjustments in the - future); ignored in \pdftex{} or \xetex{} (which will not support a - similar option in the short term). It patches an internal command, so - it might be ignored by some packages and classes (or even raise an - error). \New{3.18}. - +\item[tabular] required in \luatex{} for R |tabular|, so that the first + column is the right one (it has been tested only with simple tables, + so expect some readjustments in the future); ignored in \pdftex{} or + \xetex{} (which will not support a similar option in the short term). + It patches an internal command, so it might be ignored by some + packages and classes (or even raise an error). \New{3.18}. + \item[graphics] modifies the |picture| environment so that the whole - figure is L but the text is R. It \textit{does not} work with the - standard |picture|, and \textit{pict2e} is required if you want - sloped lines. It attempts to do the same for \textsf{pgf/tikz}. - Somewhat experimental. \New{3.32}. +figure is L but the text is R. It \textit{does not} work with the +standard |picture|, and \textit{pict2e} is required if you want sloped +lines \textbf{(With recent versions of \LaTeX, this feature has +stopped working)}. It attempts to do the same for \textsf{pgf/tikz}. +Somewhat experimental. \New{3.32}. \item[extras] is used for miscellaneous readjustments which do not fit into the previous groups. Currently redefines in \luatex{} |\underline| and @@ -3821,6 +3849,15 @@ version of |\foreignlanguage|). For old an deprecated functions, see the wiki. +\medskip +\textbf{Options for locales loaded on the fly} + +\New{3.51} |\babeladjust{ autoload.options = ... }| sets the options +when a language is loaded on the fly (by default, no options). A +typical value would be |import|, which defines captions, date, +numerals, etc., but ignores the code in the |tex| file (for example, +extended numerals in Greek). + \medskip \textbf{Labels} @@ -4778,8 +4815,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 @@ -5374,13 +5411,12 @@ help from Bernd Raichle, for which I am grateful. \DeclareOption{provide=*}{\chardef\bbl@iniflag\@ne} % main -> +1 \DeclareOption{provide+=*}{\chardef\bbl@iniflag\tw@} % add = 2 \DeclareOption{provide*=*}{\chardef\bbl@iniflag\thr@@} % add + main +% A separate option +\let\bbl@autoload@options\@empty +\DeclareOption{provide@=*}{\def\bbl@autoload@options{import}} % Don't use. Experimental. TODO. \newif\ifbbl@single \DeclareOption{selectors=off}{\bbl@singletrue} -\DeclareOption{provide@=*}{} % autoload with cat @=letter -\makeatother -\DeclareOption{provide@=*}{} % autoload with cat @=other -\makeatletter <@More package options@> % \end{macrocode} % @@ -7057,7 +7093,6 @@ help from Bernd Raichle, for which I am grateful. \IfFileExists{babel-\bbl@tempa.ini}{\let\bbl@bcp\bbl@tempa}{}% \fi \fi\fi} -\let\bbl@autoload@options\@empty \let\bbl@initoload\relax \def\bbl@provide@locale{% \ifx\babelprovide\@undefined @@ -7441,8 +7476,15 @@ help from Bernd Raichle, for which I am grateful. \fi \fi \global\let\bbl@hymapsel\@cclv - % hyphenation - patterns + % hyphenation - select patterns \bbl@patterns{#1}% + % hyphenation - allow stretching with babelnohyphens + \ifnum\language=\l@babelnohyphens + \babel@savevariable\emergencystretch + \emergencystretch\maxdimen + \babel@savevariable\hbadness + \hbadness\@M + \fi % hyphenation - mins \babel@savevariable\lefthyphenmin \babel@savevariable\righthyphenmin @@ -7675,7 +7717,9 @@ help from Bernd Raichle, for which I am grateful. \bbl@fixname\bbl@tempf \bbl@iflanguage\bbl@tempf{% \expandafter\bbl@patterns\expandafter{\bbl@tempf}% - \languageshorthands{none}% + \ifx\languageshorthands\@undefined\else + \languageshorthands{none}% + \fi \expandafter\ifx\csname\bbl@tempf hyphenmins\endcsname\relax \set@hyphenmins\tw@\thr@@\relax \else @@ -8744,7 +8788,23 @@ help from Bernd Raichle, for which I am grateful. % \item the code to be executed when the shorthand is encountered. % \end{enumerate} % +% The auxiliary macro |\babel@texpdf| improves the interoperativity with +% \textsf{hyperref} and takes 4 arguments: (1) The \TeX{} code in text +% mode, (2) the string for \textsf{hyperref}, (3) the \TeX{} code in +% math mode, and (4), which is currently ignored, but it's meant for a +% string in math mode, like a minus sign instead of an hyphen +% (currently \textsf{hyperref} doesn't discriminate the mode). This +% macro may be used in |ldf| files. + % \begin{macrocode} +\def\babel@texpdf#1#2#3#4{% + \ifx\texorpdfstring\@undefined + \textormath{#1}{#2}% + \else + \texorpdfstring{\textormath{#1}{#3}}{#2}% + % \texorpdfstring{\textormath{#1}{#3}}{\textormath{#2}{#4}}% + \fi} +% \def\declare@shorthand#1#2{\@decl@short{#1}#2\@nil} \def\@decl@short#1#2#3\@nil#4{% \def\bbl@tempa{#3}% @@ -9929,6 +9989,64 @@ help from Bernd Raichle, for which I am grateful. \fi} % \end{macrocode} % +% This sections ends with a general tool for resetting the caption +% names with a unique interface. With the old way, which mixes the +% switcher and the string, we convert it to the new one, which +% separates these two steps. +% +% \begin{macrocode} +\newcommand\setlocalecaption{% TODO. Catch typos. What about ensure? + \@ifstar\bbl@setcaption@s\bbl@setcaption@x} +\def\bbl@setcaption@x#1#2#3{% language caption-name string + \edef\bbl@tempa{#1}% + \edef\bbl@tempd{% + \expandafter\expandafter\expandafter + \strip@prefix\expandafter\meaning\csname captions#1\endcsname}% + \bbl@xin@ + {\expandafter\string\csname #2name\endcsname}% + {\bbl@tempd}% + \ifin@ % Renew caption + \bbl@xin@{\string\bbl@scset}{\bbl@tempd}% + \ifin@ + \bbl@exp{% + \\\bbl@ifsamestring{\bbl@tempa}{\languagename}% + {\\\bbl@scset\<#2name>\<#1#2name>}% + {}}% + \else % Old way converts to new way + \bbl@ifunset{#1#2name}% + {\bbl@exp{% + \\\bbl@add\{\def\<#2name>{\<#1#2name>}}% + \\\bbl@ifsamestring{\bbl@tempa}{\languagename}% + {\def\<#2name>{\<#1#2name>}}% + {}}}% + {}% + \fi + \else + \bbl@xin@{\string\bbl@scset}{\bbl@tempd}% New + \ifin@ % New way + \bbl@exp{% + \\\bbl@add\{\\\bbl@scset\<#2name>\<#1#2name>}% + \\\bbl@ifsamestring{\bbl@tempa}{\languagename}% + {\\\bbl@scset\<#2name>\<#1#2name>}% + {}}% + \else % Old way, but defined in the new way + \bbl@exp{% + \\\bbl@add\{\def\<#2name>{\<#1#2name>}}% + \\\bbl@ifsamestring{\bbl@tempa}{\languagename}% + {\def\<#2name>{\<#1#2name>}}% + {}}% + \fi% + \fi + \@namedef{#1#2name}{#3}% + \toks@\expandafter{\bbl@captionslist}% + \bbl@exp{\\\in@{\<#2name>}{\the\toks@}}% + \ifin@\else + \bbl@exp{\\\bbl@add\\\bbl@captionslist{\<#2name>}}% + \bbl@toglobal\bbl@captionslist + \fi} +% \def\bbl@setcaption@s#1#2#3{} % Not yet implemented +% \end{macrocode} +% % \subsection{Macros common to a number of languages} % % \begin{macro}{\set@low@box} @@ -10624,13 +10742,13 @@ help from Bernd Raichle, for which I am grateful. \fi \bbl@exp{\\\bbl@add\\\bbl@mapselect{\\\bbl@mapdir{\languagename}}}% \fi - % == intraspace, intrapenalty == + % == Line breaking: intraspace, intrapenalty == % For CJK, East Asian, Southeast Asian, if interspace in ini \ifx\bbl@KVP@intraspace\@nil\else % We can override the ini or set \bbl@csarg\edef{intsp@#2}{\bbl@KVP@intraspace}% \fi \bbl@provide@intraspace - % == hyphenate.other.locale == + % == Line breaking: hyphenate.other.locale == \bbl@ifunset{bbl@hyotl@\languagename}{}% {\bbl@csarg\bbl@replace{hyotl@\languagename}{ }{,}% \bbl@startcommands*{\languagename}{}% @@ -10643,7 +10761,7 @@ help from Bernd Raichle, for which I am grateful. \SetHyphenMap{\BabelLower{##1}{##1}}% \fi}% \bbl@endcommands}% - % == hyphenate.other.script == + % == Line breaking: hyphenate.other.script == \bbl@ifunset{bbl@hyots@\languagename}{}% {\bbl@csarg\bbl@replace{hyots@\languagename}{ }{,}% \bbl@csarg\bbl@foreach{hyots@\languagename}{% @@ -10654,7 +10772,7 @@ help from Bernd Raichle, for which I am grateful. \else \global\lccode##1=##1\relax \fi}}% - % == maparabic == + % == Counters: maparabic == % Native digits, if provided in ini (TeX level, xe and lua) \ifcase\bbl@engine\else \bbl@ifunset{bbl@dgnat@\languagename}{}% @@ -10672,7 +10790,7 @@ help from Bernd Raichle, for which I am grateful. \fi \fi}% \fi - % == mapdigits == + % == Counters: mapdigits == % Native digits (lua level). \ifodd\bbl@engine \ifx\bbl@KVP@mapdigits\@nil\else @@ -10709,7 +10827,7 @@ help from Bernd Raichle, for which I am grateful. }}% \fi \fi - % == alph, Alph == + % == Counters: alph, Alph == % What if extras contains a \babel@save\@alph? It won't be % restored correctly when exiting the language, so we ignore % this change with the \bbl@alph@saved trick. @@ -10737,15 +10855,17 @@ help from Bernd Raichle, for which I am grateful. \fi % == require.babel in ini == % To load or reaload the babel-*.tex, if require.babel in ini - \bbl@ifunset{bbl@rqtex@\languagename}{}% - {\expandafter\ifx\csname bbl@rqtex@\languagename\endcsname\@empty\else - \let\BabelBeforeIni\@gobbletwo - \chardef\atcatcode=\catcode`\@ - \catcode`\@=11\relax - \bbl@input@texini{\bbl@cs{rqtex@\languagename}}% - \catcode`\@=\atcatcode - \let\atcatcode\relax - \fi}% + \ifx\bbl@beforestart\relax\else % But not in doc aux or body + \bbl@ifunset{bbl@rqtex@\languagename}{}% + {\expandafter\ifx\csname bbl@rqtex@\languagename\endcsname\@empty\else + \let\BabelBeforeIni\@gobbletwo + \chardef\atcatcode=\catcode`\@ + \catcode`\@=11\relax + \bbl@input@texini{\bbl@cs{rqtex@\languagename}}% + \catcode`\@=\atcatcode + \let\atcatcode\relax + \fi}% + \fi % == main == \ifx\bbl@KVP@main\@nil % Restore only if not 'main' \let\languagename\bbl@savelangname @@ -10934,9 +11054,13 @@ help from Bernd Raichle, for which I am grateful. \def\bbl@input@texini#1{% \bbl@bsphack \bbl@exp{% - \catcode`\\\%=14 + \catcode`\\\%=14 \catcode`\\\\=0 + \catcode`\\\{=1 \catcode`\\\}=2 \lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}% - \catcode`\\\%=\the\catcode`\%\relax}% + \catcode`\\\%=\the\catcode`\%\relax + \catcode`\\\\=\the\catcode`\\\relax + \catcode`\\\{=\the\catcode`\{\relax + \catcode`\\\}=\the\catcode`\}\relax}% \bbl@esphack} \def\bbl@inipreread#1=#2\@@{% \bbl@trim@def\bbl@tempa{#1}% Redundant below !! @@ -10960,7 +11084,7 @@ help from Bernd Raichle, for which I am grateful. is not complete.}% {Fix the name or reinstall babel.}% \else - \catcode`\[=12 \catcode`\]=12 \catcode`\==12 + \catcode`\[=12 \catcode`\]=12 \catcode`\==12 \catcode`\&=12 \catcode`\;=12 \catcode`\|=12 \catcode`\%=14 \bbl@info{Importing \ifcase#2 \or font and identification \or basic \fi @@ -10977,7 +11101,7 @@ help from Bernd Raichle, for which I am grateful. \repeat \fi} \def\bbl@read@ini#1#2{% - \bbl@csarg\edef{lini@\languagename}{#1}% + \bbl@csarg\xdef{lini@\languagename}{#1}% \let\bbl@section\@empty \let\bbl@savestrings\@empty \let\bbl@savetoday\@empty @@ -11107,7 +11231,8 @@ help from Bernd Raichle, for which I am grateful. \bbl@exportkey{elname}{identification.name.english}{}% \bbl@exp{\\\bbl@exportkey{lname}{identification.name.opentype}% {\csname bbl@elname@\languagename\endcsname}}% - \bbl@exportkey{lbcp}{identification.tag.bcp47}{}% TODO + \bbl@exportkey{tbcp}{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}% @@ -11115,7 +11240,7 @@ help from Bernd Raichle, for which I am grateful. \bbl@exportkey{sbcp}{identification.script.tag.bcp47}{}% \bbl@exportkey{sotf}{identification.script.tag.opentype}{DFLT}% \ifbbl@bcptoname - \bbl@csarg\xdef{bcp@map@\bbl@cl{lbcp}}{\languagename}% + \bbl@csarg\xdef{bcp@map@\bbl@cl{tbcp}}{\languagename}% \fi} % \end{macrocode} % @@ -11638,7 +11763,8 @@ help from Bernd Raichle, for which I am grateful. \@namedef{bbl@info@tag.ini}{lini} \@namedef{bbl@info@name.english}{elname} \@namedef{bbl@info@name.opentype}{lname} -\@namedef{bbl@info@tag.bcp47}{lbcp} % TODO +\@namedef{bbl@info@tag.bcp47}{tbcp} +\@namedef{bbl@info@language.tag.bcp47}{lbcp} \@namedef{bbl@info@tag.opentype}{lotf} \@namedef{bbl@info@script.name}{esname} \@namedef{bbl@info@script.name.opentype}{sname} @@ -12234,9 +12360,9 @@ help from Bernd Raichle, for which I am grateful. \newcommand\babelfont[2][]{% 1=langs/scripts 2=fam \bbl@foreach{#1}{% \expandafter\ifx\csname date##1\endcsname\relax - \IfFileExists{babel-##1.tex}% - {\babelprovide{##1}}% - {}% + \IfFileExists{babel-##1.tex}% + {\babelprovide{##1}}% + {}% \fi}% \edef\bbl@tempa{#1}% \def\bbl@tempb{#2}% Used by \bbl@bblfont @@ -12317,7 +12443,7 @@ help from Bernd Raichle, for which I am grateful. \bbl@ifunset{bbl@##1dflt@\languagename}% {\bbl@cs{famrst@##1}% \global\bbl@csarg\let{famrst@##1}\relax}% - {\bbl@exp{% order is relevant + {\bbl@exp{% order is relevant. TODO: but sometimes wrong! \\\bbl@add\\\originalTeX{% \\\bbl@font@rst{\bbl@cl{##1dflt}}% \<##1default>\<##1family>{##1}}% @@ -12376,9 +12502,13 @@ help from Bernd Raichle, for which I am grateful. \ifin@ \bbl@exp{\\\bbl@fontspec@set\\#1\expandafter\@gobbletwo#1\\#3}% \fi - \bbl@exp{% + \bbl@exp{% 'Unprotected' macros return prev values \def\\#2{#1}% eg, \rmdefault{\bbl@rmdflt@lang} - \\\bbl@ifsamestring{#2}{\f@family}{\\#3\let\\\bbl@tempa\relax}{}}} + \\\bbl@ifsamestring{#2}{\f@family}% + {\\#3% + \\\bbl@ifsamestring{\f@series}{\bfdefault}{\\\bfseries}{}% + \let\\\bbl@tempa\relax}% + {}}} % TODO - next should be global?, but even local does its job. I'm % still not sure -- must investigate: \def\bbl@fontspec@set#1#2#3#4{% eg \bbl@rmdflt@lang fnt-opt fnt-nme \xxfamily @@ -12570,7 +12700,7 @@ help from Bernd Raichle, for which I am grateful. \fi \bbl@exp{% \\\bbl@add\{% - \XeTeXlinebreaklocale "\bbl@cl{lbcp}"% + \XeTeXlinebreaklocale "\bbl@cl{tbcp}"% \% \}% \\\bbl@toglobal\% @@ -13214,7 +13344,9 @@ help from Bernd Raichle, for which I am grateful. node.insert_before(head, item, n) end - quad = font.getfont(item.font).size + if font.getfont(item.font) then + quad = font.getfont(item.font).size + end last_class = class last_lang = lang else % if penalty, glue or anything else @@ -21803,7 +21935,6 @@ Babel.cjk_breaks = { \input babel.def % % \end{macrocode} - % % \Finale % diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins index 18bea2ad3f..3bdf670a2d 100644 --- a/macros/latex/required/babel/base/babel.ins +++ b/macros/latex/required/babel/base/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{2020/10/06} +\def\filedate{2020/10/27} \def\batchfile{babel.ins} \input docstrip.tex @@ -127,7 +127,7 @@ \savingtrue \generate{\usepreamble\empty \usepostamble\empty - \file{babel.log}{\from{babel.dtx}{dummy}}} + \file{dummy.log}{\from{babel.dtx}{dummy}}} \savingfalse \generate{\file{babel.sty}{\from{babel.dtx}{package}} diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf index b032d324ec..0ed7a10c7b 100644 Binary files a/macros/latex/required/babel/base/babel.pdf and b/macros/latex/required/babel/base/babel.pdf differ diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx index cb2c9a078f..1aabf3a55d 100644 --- a/macros/latex/required/babel/base/bbcompat.dtx +++ b/macros/latex/required/babel/base/bbcompat.dtx @@ -30,7 +30,7 @@ % % \iffalse %<*dtx> -\ProvidesFile{bbcompat.dtx}[2020/10/06 v3.50] +\ProvidesFile{bbcompat.dtx}[2020/10/27 v3.51] % % %% File 'bbcompat.dtx' -- cgit v1.2.3