diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-25 03:00:58 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-25 03:00:58 +0000 |
commit | 157cc9e776520d0b7d488317a69a10d4ae4d493b (patch) | |
tree | c12e70126efbe1e6c930d2e26223a004b075306e /macros/latex/required | |
parent | dc88afec77f198ebb8774f9c87146f2985e8f156 (diff) |
CTAN sync 202202250300
Diffstat (limited to 'macros/latex/required')
-rw-r--r-- | macros/latex/required/babel/base/README.md | 19 | ||||
-rw-r--r-- | macros/latex/required/babel/base/babel.dtx | 175 | ||||
-rw-r--r-- | macros/latex/required/babel/base/babel.ins | 2 | ||||
-rw-r--r-- | macros/latex/required/babel/base/babel.pdf | bin | 853443 -> 855484 bytes | |||
-rw-r--r-- | macros/latex/required/babel/base/bbcompat.dtx | 2 |
5 files changed, 90 insertions, 108 deletions
diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md index 41c7e9d010..4d56195cf3 100644 --- a/macros/latex/required/babel/base/README.md +++ b/macros/latex/required/babel/base/README.md @@ -1,6 +1,4 @@ -## Babel 3.71 - -2022-02-13 +## Babel 3.72 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -10,9 +8,9 @@ is a set of ini files for about 250 languages. The latest stable version is available on <https://ctan.org/pkg/babel>. -Changes in version 3.71 are described in: +Changes in version 3.72 are described in: -https://latex3.github.io/babel/news/whats-new-in-babel-3.71.html +https://latex3.github.io/babel/news/whats-new-in-babel-3.72.html Apart from the manual, you can find information on some aspects of babel at: @@ -48,13 +46,12 @@ respective authors. ### Summary of Latest changes ``` -3.71 2022-02-13 - * IAST transliteration for Sanskrit (by Maximilian Mehner). +3.72 2022-02-24 + * Advances in amsmath (lua). * Fixes: - - Bad interraction between bidi option and mathtools (#166). - - 'provide+=' didn’t work with 'hebrew' as a secondary - language. - - Wrong equation direction in 'cases' and 'array' (#167). + - Captions in Thai. + - Some settings sometimes ignored with 'onchar' (lua). + - Extra colon in Polish 'cc' (#172) ``` ### Previous changes diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx index d5706cdaf1..b8b3ce531d 100644 --- a/macros/latex/required/babel/base/babel.dtx +++ b/macros/latex/required/babel/base/babel.dtx @@ -32,7 +32,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2022/02/13 v3.71 The Babel package] +\ProvidesFile{babel.dtx}[2022/02/24 v3.72 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -2567,20 +2567,22 @@ line breking mode that allows spaces to be stretched to arbitrary amounts. (thus overriding that set when \babel\ is loaded). Only in newly defined languages. \begin{example} - Let's assume your document is mainly in Polytonic Greek, but with some - sections in Italian. Then, the first attempt should be: + Let's assume your document (\xetex{} or \luatex{}) is mainly in + Polytonic Greek with but with some sections in Italian. Then, the + first attempt should be: \begin{verbatim} \usepackage[italian, greek.polutonic]{babel} \end{verbatim} - But if, say, accents in Greek are not shown correctly, you can try: + But if, say, accents in Greek are not shown correctly, you can try \begin{verbatim} -\usepackage[italian]{babel} -\babelprovide[import, main]{polytonicgreek} +\usepackage[italian, polytonicgreek, provide=*]{babel} \end{verbatim} Remerber there is an alternative syntax for the latter: \begin{verbatim} -\usepackage[italian, polytonicgreek, provide=*]{babel} +\usepackage[italian]{babel} +\babelprovide[import, main]{polytonicgreek} \end{verbatim} + Finally, also remember you might not need to load |italian| at all if there are only a few word in this language (see~\ref{mostlymono}). @@ -3813,13 +3815,14 @@ options are also used (eg, |\ProsodicMarksOn| in \textsf{latin}). events. Some hooks are predefined when \luatex{} and \xetex{} are used. -% \New{3.62} This is not the only way to inject code at those points. The -% events listed below can be used as a hook name in |\AddToHook| in the -% form |babel/|\marg{name}, but there is a limitation, because the -% parameters passed with the \babel{} mechanism are not allowed. The -% |\AddToHook| mechanism does \textit{not} replace the current one in -% `babel`. Its main advantage is you can reconfigure `babel` even before -% loading it. See the example below. +\New{3.64} This is not the only way to inject code at those points. The +events listed below can be used as a hook name in |\AddToHook| in the +form |babel/|\m{language-name}|/|\m{event-name} (with |*| it’s applied to +all languages), but there is a limitation, because the parameters +passed with the \babel{} mechanism are not allowed. The |\AddToHook| +mechanism does \textit{not} replace the current one in `babel`. Its +main advantage is you can reconfigure `babel` even before loading it. +See the example below. \Describe{\AddBabelHook}{\oarg{lang}\marg{name}\marg{event}\marg{code}} @@ -3903,26 +3906,26 @@ ones, they only have a single hook and replace a default definition. file. Used by \file{luababel.def}. \end{description} -% \begin{example} -% The generic unlocalized \LaTeX{} hooks are predefined, so that you can -% write: -% \begin{verbatim} -% \AddToHook{babel/afterextras}{\frenchspacing} -% \end{verbatim} -% which is executed always after the extras for the language being -% selected (and just before the non-localized hooks defined with -% |\AddBabelHook|). - -% In addition, locale-specific hooks in the form -% |babel/|\marg{hook-name}|/|\marg{language-name} are \textit{recognized} -% (executed just before the localized \babel{} hooks), but they are \textit{not -% predefined}. You have to do it yourself. For example, to set -% |\frenchspacing| only in |bengali|: -% \begin{verbatim} -% \ProvideHook{babel/afterextras/bengali} -% \AddToHook{babel/afterextras/bengali}{\frenchspacing} -% \end{verbatim} -% \end{example} +\begin{example} +The generic unlocalized \LaTeX{} hooks are predefined, so that you can +write: +\begin{verbatim} +\AddToHook{babel/*/afterextras}{\frenchspacing} +\end{verbatim} +which is executed always after the extras for the language being +selected (and just before the non-localized hooks defined with +|\AddBabelHook|). + +In addition, locale-specific hooks in the form +|babel/|\m{language-name}|/|\m{event-name} are \textit{recognized} +(executed just before the localized \babel{} hooks), but they are +\textit{not predefined}. You have to do it yourself. For example, to +set |\frenchspacing| only in |bengali|: +\begin{verbatim} +\ActivateGenericHook{babel/bengali/afterextras} +\AddToHook{babel/bengali/afterextras}{\frenchspacing} +\end{verbatim} +\end{example} \Describe{\BabelContentsFiles}{} \New{3.9a} This macro contains a list of ``toc'' types @@ -4096,7 +4099,7 @@ direction with |bidi.text|). mappings. Unfortunately, \cs{savinghyphcodes} is not a solution either, because lccodes for hyphenation are frozen in the format and cannot be changed.} So, if you write a chunk of French text - with |\foreinglanguage|, the apostrophes might not be taken into + with |\foreignlanguage|, the apostrophes might not be taken into account. This is a limitation of \TeX, not of \babel. Alternatively, you may use |\useshorthands| to activate |'| and |\defineshorthand|, or redefine |\textquoteright| (the latter @@ -5100,8 +5103,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<<version=3.71>> -%<<date=2022/02/13>> +%<<version=3.72>> +%<<date=2022/02/24>> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -5364,7 +5367,7 @@ help from Bernd Raichle, for which I am grateful. % \end{macrocode} % \end{macro} % -% Two further tools. |\bbl@samestring| first expand its arguments and +% Two further tools. |\bbl@ifsamestring| first expand its arguments and % then compare their expansion (sanitized, so that the catcodes do not % matter). |\bbl@engine| takes the following values: 0 is pdf\TeX, 1 % is \luatex, and 2 is \xetex. You may use the latter it in your @@ -9735,6 +9738,8 @@ help from Bernd Raichle, for which I am grateful. % == onchar == \ifx\bbl@KVP@onchar\@nil\else \bbl@luahyphenate + \bbl@exp{% + \\\AddToHook{env/document/before}{{\\\select@language{#2}{}}}}% \directlua{ if Babel.locale_mapped == nil then Babel.locale_mapped = true @@ -12133,6 +12138,10 @@ help from Bernd Raichle, for which I am grateful. \fi \fi}% \fi +\else + \bbl@info{Main language set with 'main='. Except if you have\\% + problems, prefer the default mechanism for setting\\% + the main language. Reported} \fi % \end{macrocode} % @@ -14478,19 +14487,8 @@ end % \ifnum\bbl@bidimode>\z@ \def\bbl@insidemath{0}% - \def\bbl@mathboxdir{% - \ifcase\bbl@thetextdir\relax - \everyhbox{\bbl@mathboxdir@aux L}% - \else - \everyhbox{\bbl@mathboxdir@aux R}% - \fi} - \def\bbl@mathboxdir@aux#1{% - \@ifnextchar\egroup{}{\textdir T#1T\relax}} \def\bbl@everymath{\def\bbl@insidemath{1}} - \def\bbl@everydisplay{% - \bbl@mathboxdir - \def\bbl@everymath{\bbl@mathboxdir}% - \def\bbl@insidemath{2}} + \def\bbl@everydisplay{\def\bbl@insidemath{2}} \frozen@everymath\expandafter{% \expandafter\bbl@everymath\the\frozen@everymath} \frozen@everydisplay\expandafter{% @@ -14571,69 +14569,56 @@ end \fi \else % amstex \ifx\bbl@noamsmath\@undefined - \edef\bbl@tempa{% - \catcode58=\the\catcode58\relax - \catcode95=\the\catcode95\relax}% - \catcode58=11 - \catcode95=11 + \@ifpackagewith{amsmath}{leqno}% + {\let\bbl@ams@lap\hbox}% = leqno + {\let\bbl@ams@lap\llap}% = default + \ExplSyntaxOn \bbl@sreplace\intertext@{\normalbaselines}% {\normalbaselines \ifx\bbl@eqnodir\relax\else\bbl@pardir\@ne\bbl@eqnodir\fi}% - \bbl@tempa - \def\bbl@ams@tagbox#1#2{#1{\bbl@eqnodir#2}}% #1=\hbox|ams@lap - \def\bbl@ams@eqtagbox#1{% - \setbox\z@\hbox{\bbl@eqnodir#1}% - \hbox to 0.01pt{% - \ifx\bbl@ams@lap\hbox - \hbox to\displaywidth{\hss\box\z@}\hss - \else - \hss\hbox to\displaywidth{\box\z@\hss}% - \fi}} + \ExplSyntaxOff + \def\bbl@ams@tagbox#1#2{#1{\bbl@eqnodir#2}}% #1=hbox|@lap|flip + \ifx\bbl@ams@lap\hbox % leqno + \def\bbl@ams@flip#1{% + \hbox to 0.01pt{\hss\hbox to\displaywidth{{#1}\hss}}}% + \else % eqno + \def\bbl@ams@flip#1{% + \hbox to 0.01pt{\hbox to\displaywidth{\hss{#1}}\hss}}% + \fi \def\bbl@ams@preset#1{% \ifnum\bbl@thetextdir>\z@ \edef\bbl@eqnodir{\noexpand\bbl@textdir{\the\bbl@thetextdir}}% - \chardef\bbl@thetextdir\z@ \bbl@sreplace\textdef@{\hbox}{\bbl@ams@tagbox\hbox}% \bbl@sreplace\maketag@@@{\hbox}{\bbl@ams@tagbox#1}% - \fi} - \@ifpackagewith{amsmath}{leqno}% - {\let\bbl@ams@lap\hbox}% = leqno - {\let\bbl@ams@lap\llap}% = default - % + \fi}% + \AddToHook{env/equation/begin}{% + \ifnum\bbl@thetextdir>\z@ + \ifx\bbl@ams@lap\llap\hrule\@height\z@\fi + \bbl@ams@preset\bbl@ams@flip + \fi}% + \AddToHook{env/equation*/begin}{\bbl@ams@preset\bbl@ams@flip}% \AddToHook{env/cases/begin}{\bbl@ams@preset\bbl@ams@lap}% \AddToHook{env/multline/begin}{\bbl@ams@preset\hbox}% \AddToHook{env/gather/begin}{\bbl@ams@preset\bbl@ams@lap}% \AddToHook{env/gather*/begin}{\bbl@ams@preset\bbl@ams@lap}% \AddToHook{env/align/begin}{\bbl@ams@preset\bbl@ams@lap}% \AddToHook{env/align*/begin}{\bbl@ams@preset\bbl@ams@lap}% - % Hackish, for proper alignment-don’t ask me why it works! :-) - \bbl@exp{% - \\\AddToHook{env/align*/end}{\<iftag@>\<else>\\\tag*{}\<fi>}}% + \AddToHook{env/eqnalign/begin}{\bbl@ams@preset\hbox}% + % Hackish, for proper alignment. Don’t ask me why it works!: + \AddToHook{env/align*/end}{\iftag@\else\tag*{}\fi}% \AddToHook{env/flalign/begin}{\bbl@ams@preset\hbox}% \AddToHook{env/split/before}{% \ifnum\bbl@thetextdir>\z@ - \def\bbl@tempa{equation}% - \ifx\@currenvir\bbl@tempa - \def\bbl@ams@eqtagbox#1{% - \ifx\bbl@ams@lap\hbox - \hbox to0.01pt{\hss\bbl@eqnodir#1}% leqno - \else - \hbox to0.01pt{\bbl@eqnodir#1\hss}% eqno - \fi} - \fi - \fi} - \AddToHook{env/equation/begin}{% - \ifnum\bbl@thetextdir>\z@ - \ifx\bbl@ams@lap\llap\hrule\@height\z@\fi - \edef\bbl@eqnodir{\noexpand\bbl@textdir{\the\bbl@thetextdir}}% - \bbl@sreplace\maketag@@@{\hbox}{\bbl@ams@eqtagbox}% + \bbl@ifsamestring\@currenvir{equation}% + {\ifx\bbl@ams@lap\hbox % leqno + \def\bbl@ams@flip#1{% + \hbox to 0.01pt{\hbox to\displaywidth{{#1}\hss}\hss}}% + \else + \def\bbl@ams@flip#1{% + \hbox to 0.01pt{\hss\hbox to\displaywidth{\hss{#1}}}}% + \fi}% + {}% \fi}% - \AddToHook{env/equation*/begin}{% - \ifnum\bbl@thetextdir>\z@ - \edef\bbl@eqnodir{\noexpand\bbl@textdir{\the\bbl@thetextdir}}% - \bbl@sreplace\maketag@@@{\hbox}{\bbl@ams@eqtagbox}% - \fi}% - \fi \fi} \fi \ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins index 5bbdbce0f5..2cebaab0c7 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{2022/02/13} +\def\filedate{2022/02/24} \def\batchfile{babel.ins} \input docstrip.tex diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf Binary files differindex f909b4d5c7..7c8f5bcc22 100644 --- a/macros/latex/required/babel/base/babel.pdf +++ b/macros/latex/required/babel/base/babel.pdf diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx index 2da4345004..68066c48a9 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}[2022/02/13 v3.71] +\ProvidesFile{bbcompat.dtx}[2022/02/24 v3.72] %</dtx> % %% File 'bbcompat.dtx' |