diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-28 22:51:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-28 22:51:15 +0000 |
commit | 41b890981336d35e8af90cc4fef09ad6570b56b8 (patch) | |
tree | 14968e679b302f69e62f42ca98a1283f91cdb30d | |
parent | a76a5a98b10442234e0a271beedc8e4d87b8fa2c (diff) |
babel (28dec21)
git-svn-id: svn://tug.org/texlive/trunk@61433 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/README.md | 26 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/babel/babel.pdf | bin | 858700 -> 860656 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.dtx | 273 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/babel.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/bbcompat.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/babel/locale.zip | bin | 794467 -> 794462 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.def | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel.sty | 156 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/hyphen.cfg | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/luababel.def | 36 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/nil.ldf | 2 |
15 files changed, 262 insertions, 271 deletions
diff --git a/Master/texmf-dist/doc/latex/babel/README.md b/Master/texmf-dist/doc/latex/babel/README.md index bfb72cd7cf1..80910639b8b 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.67 +## Babel 3.68 This package manages culturally-determined typographical (and other) rules, and hyphenation patterns for a wide range of languages. Many @@ -8,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.67 are described in: +Changes in version 3.68 are described in: -https://latex3.github.io/babel/news/whats-new-in-babel-3.67.html +https://latex3.github.io/babel/news/whats-new-in-babel-3.68.html Apart from the manual, you can find information on some aspects of babel at: @@ -46,18 +46,14 @@ respective authors. ### Summary of Latest changes ``` -3.67 2021-11-29 - * \IfBabelSelectorTF executes code conditionally based on the - selector type (select, foreign, etc.). - * Transforms can be turned on and off based on Lua attributes. - -3.66 2021-11-08 - * Transforms for Greek: - - transliteration.omega - - sigma.final - * Fixes for bidi texts: - - For tcolorbox (#145, #146). - - Some improvements for tikz/pgf. +3.68 2021-12-28 + * Fixes: + - Assamese, Bengali, Gujarati set incorrectly prehyphenchar. + - The syntax provide=* didn’t work with Hebrew and a few other + languages. + - Wrong equation direction in first column in array and tabular + environment (#158). + - Tentative fixes for labels in displayed math (#159). ``` ### Previous changes diff --git a/Master/texmf-dist/doc/latex/babel/babel.pdf b/Master/texmf-dist/doc/latex/babel/babel.pdf Binary files differindex bf2f6910cae..3584ad17d64 100644 --- a/Master/texmf-dist/doc/latex/babel/babel.pdf +++ b/Master/texmf-dist/doc/latex/babel/babel.pdf diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index 666c1b1eef8..1c08c966689 100644 --- a/Master/texmf-dist/source/latex/babel/babel.dtx +++ b/Master/texmf-dist/source/latex/babel/babel.dtx @@ -32,7 +32,7 @@ % % \iffalse %<*filedriver> -\ProvidesFile{babel.dtx}[2021/11/29 v3.67 The Babel package] +\ProvidesFile{babel.dtx}[2021/12/28 v3.68 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -5118,8 +5118,8 @@ help from Bernd Raichle, for which I am grateful. % \section{Tools} % % \begin{macrocode} -%<<version=3.67>> -%<<date=2021/11/29>> +%<<version=3.68>> +%<<date=2021/12/28>> % \end{macrocode} % % \textbf{Do not use the following macros in \texttt{ldf} files. They @@ -5196,10 +5196,11 @@ help from Bernd Raichle, for which I am grateful. % % Now, just syntactical sugar, but it makes partial expansion of % some code a lot more simple and readable. Here |\\| stands for -% |\noexpand| and |\<..>| for |\noexpand| applied to a built macro -% name (the latter does not define the macro if undefined to -% |\relax|, because it is created locally). The result may be -% followed by extra arguments, if necessary. +% |\noexpand|, |\<..>| for |\noexpand| applied to a built macro +% name (which does not define the macro if undefined to +% |\relax|, because it is created locally), and |\[..]| for one-level +% expansion (where |..| is the macro name without the backslash). The +% result may be followed by extra arguments, if necessary. % % \begin{macrocode} \def\bbl@exp#1{% @@ -5896,16 +5897,6 @@ help from Bernd Raichle, for which I am grateful. \fi % \end{macrocode} % -% Make sure the language set with `main` is the last one. -% -% \begin{macrocode} -\ifx\bbl@opt@main\@nnil\else - \edef\bbl@language@opts{% - \ifx\bbl@language@opts\@empty\else\bbl@language@opts,\fi - \bbl@opt@main} -\fi -% \end{macrocode} -% % For |layout| an auxiliary macro is provided, available for packages % and language styles. Optimization: if there is no |layout|, just do % nothing. @@ -10213,8 +10204,8 @@ help from Bernd Raichle, for which I am grateful. \ifeof\bbl@readstream \bbl@error {There is no ini file for the requested language\\% - (#1). Perhaps you misspelled it or your installation\\% - is not complete.}% + (#1: \languagename). Perhaps you misspelled it or your\\% + installation is not complete.}% {Fix the name or reinstall babel.}% \else % == Store ini data in \bbl@inidata == @@ -12133,103 +12124,84 @@ help from Bernd Raichle, for which I am grateful. \fi % \end{macrocode} % -% % Recognizing global options in packages not having a closed set of -% them is not trivial, as for them to be processed they must be -% defined explicitly. So, package options not yet taken into -% account and stored in |bbl@language@opts| are assumed to be -% languages (note this list also contains the language given with -% |main|). If not declared above, the names of the option and the -% file are the same. +% them is not trivial, as for them to be processed they must be defined +% explicitly. So, package options not yet taken into account and stored +% in |bbl@language@opts| are assumed to be languages. If not declared +% above, the names of the option and the file are the same. We first +% pre-process the class and package options to determine the main +% language, which is processed in the third ‘main’ pass, +% \textit{except} if all files are ldf \textit{and} there is no |main| +% key. In the latter case (|\bbl@opt@main| is still |\@nnil|), the +% traditional way to set the main language is kept — the last loaded is +% the main language. % % \begin{macrocode} -\let\bbl@tempc\relax -\bbl@foreach\bbl@language@opts{% - \ifcase\bbl@iniflag % Default - \bbl@ifunset{ds@#1}% - {\DeclareOption{#1}{\bbl@load@language{#1}}}% - {}% - \or % provide=* - \@gobble % case 2 same as 1 - \or % provide+=* - \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}{}% - {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}% - {}% - \bbl@ifunset{ds@#1}% - {\def\bbl@tempc{#1}% - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}% - \else - \bbl@load@language{#1}% - \fi}}% - {}% - \or % provide*=* - \def\bbl@tempc{#1}% - \bbl@ifunset{ds@#1}% - {\DeclareOption{#1}{% - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}}}% - {}% - \fi} +\ifx\bbl@opt@main\@nnil + \ifnum\bbl@iniflag>\z@ % if all ldf's: set implicitly, no main pass + \let\bbl@tempb\@empty + \edef\bbl@tempa{\@classoptionslist,\bbl@language@opts}% + \bbl@foreach\bbl@tempa{\edef\bbl@tempb{#1,\bbl@tempb}}% + \bbl@foreach\bbl@tempb{% \bbl@tempb is a reversed list + \ifx\bbl@opt@main\@nnil % ie, if not yet assigned + \ifodd\bbl@iniflag % = *= + \IfFileExists{babel-#1.tex}{\def\bbl@opt@main{#1}}{}% + \else % n += + \IfFileExists{#1.ldf}{\def\bbl@opt@main{#1}}{}% + \fi + \fi}% + \fi +\fi % \end{macrocode} % -% Now, we make sure an option is explicitly declared for any language -% set as global option, by checking if an |ldf| exists. The previous -% step was, in fact, somewhat redundant, but that way we minimize -% accessing the file system just to see if the option could be a -% language. +% A few languages are still defined explicitly. They are stored in case +% they are needed in the ‘main’ pass (the value can be |\relax|). % % \begin{macrocode} -\let\bbl@tempb\@nnil -\let\bbl@clsoptlst\@classoptionslist -\bbl@foreach\@classoptionslist{% - \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}% - {\def\bbl@tempb{#1}% - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}% - \else - \bbl@load@language{#1}% - \fi}}% - {\IfFileExists{babel-#1.tex}% - {\def\bbl@tempb{#1}% - \ifnum\bbl@iniflag>\z@ - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}% - \fi}% - \fi}% - {}}}% - {}} +\ifx\bbl@opt@main\@nnil\else + \bbl@csarg\let{loadmain\expandafter}\csname ds@\bbl@opt@main\endcsname + \expandafter\let\csname ds@\bbl@opt@main\endcsname\relax +\fi % \end{macrocode} % -% If a main language has been set, store it for the third pass. +% Now define the corresponding loaders. With package options, assume +% the language exists. With class options, check if the option is a +% language by checking if the correspondin file exists. +% % % \begin{macrocode} -\ifnum\bbl@iniflag=\z@\else - \ifx\bbl@opt@main\@nnil - \ifx\bbl@tempc\relax - \let\bbl@opt@main\bbl@tempb - \else - \let\bbl@opt@main\bbl@tempc - \fi - \fi -\fi -\ifx\bbl@opt@main\@nnil\else - \expandafter - \let\expandafter\bbl@loadmain\csname ds@\bbl@opt@main\endcsname - \expandafter\let\csname ds@\bbl@opt@main\endcsname\@empty -\fi +\bbl@foreach\bbl@language@opts{% + \def\bbl@tempa{#1}% + \ifx\bbl@tempa\bbl@opt@main\else + \bbl@ifunset{ds@#1}% + {\ifnum\bbl@iniflag<\tw@ % 0 ø (other = ldf) + \DeclareOption{#1}{\bbl@load@language{#1}}% + \else % + * (other = ini) + \DeclareOption{#1}{% + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}}% + \fi}% + {}% + \fi} +\bbl@foreach\@classoptionslist{% + \def\bbl@tempa{#1}% + \ifx\bbl@tempa\bbl@opt@main\else + \bbl@ifunset{ds@#1}% + {\ifnum\bbl@iniflag<\tw@ % 0 ø (other = ldf) + \IfFileExists{#1.ldf}% + {\DeclareOption{#1}{\bbl@load@language{#1}}}% + {}% + \else % + * (other = ini) + \IfFileExists{babel-#1.tex}% + {\DeclareOption{#1}{% + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}}}% + {}% + \fi}% + {}% + \fi} % \end{macrocode} % % And we are done, because all options for this pass has been @@ -12237,8 +12209,7 @@ help from Bernd Raichle, for which I am grateful. % ignored. % % The options have to be processed in the order in which the user -% specified them (except, of course, global options, which \LaTeX{} -% processes before): +% specified them (but remember class options are processes before): % % \begin{macrocode} \def\AfterBabelLanguage#1{% @@ -12247,12 +12218,14 @@ help from Bernd Raichle, for which I am grateful. \ProcessOptions* % \end{macrocode} % -% This finished the second pass. Now the third one begins, which -% loads the main language set with the key |main|. A warning is -% raised if the main language is not the same as the last named -% one, or if the value of the key |main| is not a language. Then -% execute directly the option (because it could be used only in -% |main|). After loading all languages, we deactivate +% This finished the second pass. Now the third one begins, which loads +% the main language set with the key |main|. A warning is raised if the +% main language is not the same as the last named one, or if the value +% of the key |main| is not a language. With some options in |provide|, +% the package |luatexbase| is loaded (and immediately used), and +% therefore |\babelprovide| can’t go inside a |\DeclareOption|; this +% explains why it’s executed directly, with a dummy declaration. Then +% all languages have been loaded, so we deactivate % |\AfterBabelLanguage|. % % \begin{macrocode} @@ -12271,32 +12244,27 @@ help from Bernd Raichle, for which I am grateful. but the last processed one was '\bbl@tempb'.\\% The main language can't be set as both a global\\% and a package option. Use 'main=\bbl@tempc' as\\% - option. Reported}% + option. Reported} \fi \else - \ifodd\bbl@iniflag % case 1,3 + \ifodd\bbl@iniflag % case 1,3 (main is ini) \bbl@ldfinit \let\CurrentOption\bbl@opt@main - \ifx\bbl@opt@provide\@nnil - \bbl@exp{\\\babelprovide[import,main]{\bbl@opt@main}}% + \bbl@exp{% \bbl@opt@provide = empty if * + \\\babelprovide[\bbl@opt@provide,import,main]{\bbl@opt@main}}% + \bbl@afterldf{} + \DeclareOption{\bbl@opt@main}{} + \else % case 0,2 (main is ldf) + \ifx\bbl@loadmain\relax + \DeclareOption{\bbl@opt@main}{\bbl@load@language{\bbl@opt@main}} \else - \bbl@exp{\\\bbl@forkv{\@nameuse{@raw@opt@babel.sty}}}{% - \bbl@xin@{,provide,}{,#1,}% - \ifin@ - \def\bbl@opt@provide{#2}% - \bbl@replace\bbl@opt@provide{;}{,}% - \fi}% - \bbl@exp{% - \\\babelprovide[\bbl@opt@provide,import,main]{\bbl@opt@main}}% + \DeclareOption{\bbl@opt@main}{\bbl@loadmain} \fi - \bbl@afterldf{}% - \else % case 0,2 - \chardef\bbl@iniflag\z@ % Force ldf - \expandafter\let\csname ds@\bbl@opt@main\endcsname\bbl@loadmain \ExecuteOptions{\bbl@opt@main} - \DeclareOption*{}% - \ProcessOptions* + \@namedef{ds@\bbl@opt@main}{}% \fi + \DeclareOption*{} + \ProcessOptions* \fi \def\AfterBabelLanguage{% \bbl@error @@ -12304,10 +12272,9 @@ help from Bernd Raichle, for which I am grateful. {Languages have been loaded, so I can do nothing}} % \end{macrocode} % -% In order to catch the case where the user forgot to specify a +% In order to catch the case where the user didn’t specify a % language we check whether |\bbl@main@language|, has become -% defined. If not, no language has been loaded and an error -% message is displayed. +% defined. If not, the |nil| language is loaded. % % \begin{macrocode} \ifx\bbl@main@language\@undefined @@ -14516,6 +14483,10 @@ end \frozen@everydisplay\expandafter{% \expandafter\bbl@mathboxdir\the\frozen@everydisplay} \fi +\def\bbl@truellap{%s + \ifcase\bbl@attr@dir\expandafter\llap\else\expandafter\rlap\fi} +\def\bbl@truerlap{% + \ifcase\bbl@attr@dir\expandafter\rlap\else\expandafter\llap\fi} % \end{macrocode} % % \subsection{Layout} @@ -14543,11 +14514,37 @@ end % % \begin{macrocode} \bbl@trace{Redefinitions for bidi layout} +\AtBeginDocument{% amsmath + \ifx\place@tag\@undefined\else + \bbl@sreplace\place@tag{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag@gather{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag{\rlap}{\bbl@truerlap}% + \bbl@sreplace\place@tag@gather{\rlap}{\bbl@truerlap}% + \fi} +\ifx\AddToHook\@undefined\else + \AddToHook{env/equation/before}{\pardir TLT }{} +\fi \ifx\@eqnnum\@undefined\else \ifx\bbl@attr@dir\@undefined\else - \edef\@eqnnum{{% - \unexpanded{\ifcase\bbl@attr@dir\else\bbl@textdir\@ne\fi}% - \unexpanded\expandafter{\@eqnnum}}} + \bbl@xin@{,leqno,}{,\@classoptionslist,}% + \ifin@ + \bbl@sreplace\@eqnnum{\rlap}{\bbl@leqno@aux} + \def\bbl@leqno@aux#1{% + \bbl@truerlap{% + \ifcase\bbl@attr@dir + #1% + \else + \bbl@textdir\@ne + #1% + \hskip-\displaywidth + \fi}} + \else + \bbl@exp{% + \def\\\@eqnnum{{% + \<ifcase>\\\bbl@attr@dir\<else>\\\bbl@textdir\@ne\<fi>% + \\\bbl@ifsamestring{\\\@currenvir}{equation}% + {}{\\\bbl@truellap}{\[@eqnnum]}}}} + \fi \fi \fi \ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout @@ -21854,7 +21851,7 @@ function Babel.bidi(head, ispar, hdir) elseif item.id == DIR then d = nil - new_d = true + if head ~= item then new_d = true end elseif item.id == node.id'glue' and item.subtype == 13 then glue_d = d diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 1be32b20baf..b9267340a3d 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{2021/11/29} +\def\filedate{2021/12/28} \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 0b0d1c2af72..b80d81c7ccf 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}[2021/11/29 v3.67] +\ProvidesFile{bbcompat.dtx}[2021/12/28 v3.68] %</dtx> % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip Binary files differindex e4b081de5c1..9f965af7b59 100644 --- a/Master/texmf-dist/source/latex/babel/locale.zip +++ b/Master/texmf-dist/source/latex/babel/locale.zip 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 27467e83fd4..a6a8b8e8954 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic.lua @@ -209,7 +209,7 @@ function Babel.bidi(head, ispar, hdir) elseif item.id == DIR then d = nil - new_d = true + if head ~= item then new_d = true end elseif item.id == node.id'glue' and item.subtype == 13 then glue_d = d diff --git a/Master/texmf-dist/tex/generic/babel/babel.def b/Master/texmf-dist/tex/generic/babel/babel.def index d80ec90556c..5e034823ad5 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.def +++ b/Master/texmf-dist/tex/generic/babel/babel.def @@ -40,7 +40,7 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{babel.def}[2021/11/29 3.67 Babel common definitions] +\ProvidesFile{babel.def}[2021/12/28 3.68 Babel common definitions] \ifx\AtBeginDocument\@undefined % TODO. change test. \def\@empty{} \def\loadlocalcfg#1{% @@ -406,8 +406,8 @@ \expandafter\newif\csname ifbbl@single\endcsname \chardef\bbl@bidimode\z@ \fi -\def\bbl@version{3.67} -\def\bbl@date{2021/11/29} +\def\bbl@version{3.68} +\def\bbl@date{2021/12/28} \ifx\language\@undefined \csname newcount\endcsname\language \fi @@ -2927,8 +2927,8 @@ \ifeof\bbl@readstream \bbl@error {There is no ini file for the requested language\\% - (#1). Perhaps you misspelled it or your installation\\% - is not complete.}% + (#1: \languagename). Perhaps you misspelled it or your\\% + installation is not complete.}% {Fix the name or reinstall babel.}% \else % == Store ini data in \bbl@inidata == diff --git a/Master/texmf-dist/tex/generic/babel/babel.sty b/Master/texmf-dist/tex/generic/babel/babel.sty index 991dbb42e3f..da64be20fdf 100644 --- a/Master/texmf-dist/tex/generic/babel/babel.sty +++ b/Master/texmf-dist/tex/generic/babel/babel.sty @@ -34,7 +34,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{babel}[2021/11/29 3.67 The Babel package] +\ProvidesPackage{babel}[2021/12/28 3.68 The Babel package] \@ifpackagewith{babel}{debug} {\providecommand\bbl@trace[1]{\message{^^J[ #1 ]}}% \let\bbl@debug\@firstofone @@ -441,11 +441,6 @@ \ifx\bbl@opt@safe\@undefined \def\bbl@opt@safe{BR} \fi -\ifx\bbl@opt@main\@nnil\else - \edef\bbl@language@opts{% - \ifx\bbl@language@opts\@empty\else\bbl@language@opts,\fi - \bbl@opt@main} -\fi \bbl@trace{Defining IfBabelLayout} \ifx\bbl@opt@layout\@nnil \newcommand\IfBabelLayout[3]{#3}% @@ -458,8 +453,8 @@ \expandafter\@secondoftwo \fi} \fi -\def\bbl@version{3.67} -\def\bbl@date{2021/11/29} +\def\bbl@version{3.68} +\def\bbl@date{2021/12/28} \ifx\language\@undefined \csname newcount\endcsname\language \fi @@ -2979,8 +2974,8 @@ \ifeof\bbl@readstream \bbl@error {There is no ini file for the requested language\\% - (#1). Perhaps you misspelled it or your installation\\% - is not complete.}% + (#1: \languagename). Perhaps you misspelled it or your\\% + installation is not complete.}% {Fix the name or reinstall babel.}% \else % == Store ini data in \bbl@inidata == @@ -4202,79 +4197,57 @@ Local config file '\bbl@opt@config.cfg' not found}{% Perhaps you misspelled it.}}% \fi -\let\bbl@tempc\relax +\ifx\bbl@opt@main\@nnil + \ifnum\bbl@iniflag>\z@ % if all ldf's: set implicitly, no main pass + \let\bbl@tempb\@empty + \edef\bbl@tempa{\@classoptionslist,\bbl@language@opts}% + \bbl@foreach\bbl@tempa{\edef\bbl@tempb{#1,\bbl@tempb}}% + \bbl@foreach\bbl@tempb{% \bbl@tempb is a reversed list + \ifx\bbl@opt@main\@nnil % ie, if not yet assigned + \ifodd\bbl@iniflag % = *= + \IfFileExists{babel-#1.tex}{\def\bbl@opt@main{#1}}{}% + \else % n += + \IfFileExists{#1.ldf}{\def\bbl@opt@main{#1}}{}% + \fi + \fi}% + \fi +\fi +\ifx\bbl@opt@main\@nnil\else + \bbl@csarg\let{loadmain\expandafter}\csname ds@\bbl@opt@main\endcsname + \expandafter\let\csname ds@\bbl@opt@main\endcsname\relax +\fi \bbl@foreach\bbl@language@opts{% - \ifcase\bbl@iniflag % Default + \def\bbl@tempa{#1}% + \ifx\bbl@tempa\bbl@opt@main\else \bbl@ifunset{ds@#1}% - {\DeclareOption{#1}{\bbl@load@language{#1}}}% - {}% - \or % provide=* - \@gobble % case 2 same as 1 - \or % provide+=* - \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}{}% - {\IfFileExists{babel-#1.tex}{}{\@namedef{ds@#1}{}}}}% - {}% - \bbl@ifunset{ds@#1}% - {\def\bbl@tempc{#1}% - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne + {\ifnum\bbl@iniflag<\tw@ % 0 ø (other = ldf) + \DeclareOption{#1}{\bbl@load@language{#1}}% + \else % + * (other = ini) + \DeclareOption{#1}{% \bbl@ldfinit \babelprovide[import]{#1}% - \bbl@afterldf{}% - \else - \bbl@load@language{#1}% - \fi}}% - {}% - \or % provide*=* - \def\bbl@tempc{#1}% - \bbl@ifunset{ds@#1}% - {\DeclareOption{#1}{% - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}}}% + \bbl@afterldf{}}% + \fi}% {}% \fi} -\let\bbl@tempb\@nnil -\let\bbl@clsoptlst\@classoptionslist \bbl@foreach\@classoptionslist{% - \bbl@ifunset{ds@#1}% - {\IfFileExists{#1.ldf}% - {\def\bbl@tempb{#1}% - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}% - \else - \bbl@load@language{#1}% - \fi}}% - {\IfFileExists{babel-#1.tex}% - {\def\bbl@tempb{#1}% - \ifnum\bbl@iniflag>\z@ - \DeclareOption{#1}{% - \ifnum\bbl@iniflag>\@ne - \bbl@ldfinit - \babelprovide[import]{#1}% - \bbl@afterldf{}% - \fi}% - \fi}% - {}}}% - {}} -\ifnum\bbl@iniflag=\z@\else - \ifx\bbl@opt@main\@nnil - \ifx\bbl@tempc\relax - \let\bbl@opt@main\bbl@tempb - \else - \let\bbl@opt@main\bbl@tempc - \fi - \fi -\fi -\ifx\bbl@opt@main\@nnil\else - \expandafter - \let\expandafter\bbl@loadmain\csname ds@\bbl@opt@main\endcsname - \expandafter\let\csname ds@\bbl@opt@main\endcsname\@empty -\fi + \def\bbl@tempa{#1}% + \ifx\bbl@tempa\bbl@opt@main\else + \bbl@ifunset{ds@#1}% + {\ifnum\bbl@iniflag<\tw@ % 0 ø (other = ldf) + \IfFileExists{#1.ldf}% + {\DeclareOption{#1}{\bbl@load@language{#1}}}% + {}% + \else % + * (other = ini) + \IfFileExists{babel-#1.tex}% + {\DeclareOption{#1}{% + \bbl@ldfinit + \babelprovide[import]{#1}% + \bbl@afterldf{}}}% + {}% + \fi}% + {}% + \fi} \def\AfterBabelLanguage#1{% \bbl@ifsamestring\CurrentOption{#1}{\global\bbl@add\bbl@afterlang}{}} \DeclareOption*{} @@ -4294,32 +4267,27 @@ but the last processed one was '\bbl@tempb'.\\% The main language can't be set as both a global\\% and a package option. Use 'main=\bbl@tempc' as\\% - option. Reported}% + option. Reported} \fi \else - \ifodd\bbl@iniflag % case 1,3 + \ifodd\bbl@iniflag % case 1,3 (main is ini) \bbl@ldfinit \let\CurrentOption\bbl@opt@main - \ifx\bbl@opt@provide\@nnil - \bbl@exp{\\\babelprovide[import,main]{\bbl@opt@main}}% + \bbl@exp{% \bbl@opt@provide = empty if * + \\\babelprovide[\bbl@opt@provide,import,main]{\bbl@opt@main}}% + \bbl@afterldf{} + \DeclareOption{\bbl@opt@main}{} + \else % case 0,2 (main is ldf) + \ifx\bbl@loadmain\relax + \DeclareOption{\bbl@opt@main}{\bbl@load@language{\bbl@opt@main}} \else - \bbl@exp{\\\bbl@forkv{\@nameuse{@raw@opt@babel.sty}}}{% - \bbl@xin@{,provide,}{,#1,}% - \ifin@ - \def\bbl@opt@provide{#2}% - \bbl@replace\bbl@opt@provide{;}{,}% - \fi}% - \bbl@exp{% - \\\babelprovide[\bbl@opt@provide,import,main]{\bbl@opt@main}}% + \DeclareOption{\bbl@opt@main}{\bbl@loadmain} \fi - \bbl@afterldf{}% - \else % case 0,2 - \chardef\bbl@iniflag\z@ % Force ldf - \expandafter\let\csname ds@\bbl@opt@main\endcsname\bbl@loadmain \ExecuteOptions{\bbl@opt@main} - \DeclareOption*{}% - \ProcessOptions* + \@namedef{ds@\bbl@opt@main}{}% \fi + \DeclareOption*{} + \ProcessOptions* \fi \def\AfterBabelLanguage{% \bbl@error diff --git a/Master/texmf-dist/tex/generic/babel/hyphen.cfg b/Master/texmf-dist/tex/generic/babel/hyphen.cfg index d020af4e954..496427e3bf7 100644 --- a/Master/texmf-dist/tex/generic/babel/hyphen.cfg +++ b/Master/texmf-dist/tex/generic/babel/hyphen.cfg @@ -38,10 +38,10 @@ \wlog{File: #1 #4 #3 <#2>}% \let\ProvidesFile\@undefined} \fi -\ProvidesFile{hyphen.cfg}[2021/11/29 3.67 Babel hyphens] +\ProvidesFile{hyphen.cfg}[2021/12/28 3.68 Babel hyphens] \xdef\bbl@format{\jobname} -\def\bbl@version{3.67} -\def\bbl@date{2021/11/29} +\def\bbl@version{3.68} +\def\bbl@date{2021/12/28} \ifx\AtBeginDocument\@undefined \def\@empty{} \fi diff --git a/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini b/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini index 582bc6350d3..c8662c3d848 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/as/babel-as.ini @@ -12,8 +12,8 @@ [identification] charset = utf8 -version = 1.9 -date = 2021-06-25 +version = 1.10 +date = 2021-12-13 name.local = অসমীয়া name.english = Assamese name.babel = assamese @@ -116,7 +116,7 @@ hyphenrules = assaseme lefthyphenmin = righthyphenmin = hyphenchar = -prehyphenchar = 0 +prehyphenchar = posthyphenchar = exhyphenchar = preexhyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini b/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini index 69d04371581..ce2def128d1 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/bn/babel-bn.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.9 -date = 2021-06-25 +version = 1.10 +date = 2021-12-13 name.local = বাংলা name.english = Bangla name.babel = bengali @@ -116,7 +116,7 @@ hyphenrules = bengali lefthyphenmin = 2 righthyphenmin = 2 hyphenchar = -prehyphenchar = 0 +prehyphenchar = posthyphenchar = exhyphenchar = preexhyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini b/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini index 76da70546a4..e47339cf266 100644 --- a/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini +++ b/Master/texmf-dist/tex/generic/babel/locale/gu/babel-gu.ini @@ -11,8 +11,8 @@ [identification] charset = utf8 -version = 1.8 -date = 2021-06-25 +version = 1.9 +date = 2021-12-13 name.local = ગુજરાતી name.english = Gujarati name.babel = gujarati @@ -138,7 +138,7 @@ hyphenrules = gujarati lefthyphenmin = righthyphenmin = hyphenchar = -prehyphenchar = 0 +prehyphenchar = posthyphenchar = exhyphenchar = preexhyphenchar = diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def index d5c8c17511b..2978df88822 100644 --- a/Master/texmf-dist/tex/generic/babel/luababel.def +++ b/Master/texmf-dist/tex/generic/babel/luababel.def @@ -1334,12 +1334,42 @@ end \frozen@everydisplay\expandafter{% \expandafter\bbl@mathboxdir\the\frozen@everydisplay} \fi +\def\bbl@truellap{%s + \ifcase\bbl@attr@dir\expandafter\llap\else\expandafter\rlap\fi} +\def\bbl@truerlap{% + \ifcase\bbl@attr@dir\expandafter\rlap\else\expandafter\llap\fi} \bbl@trace{Redefinitions for bidi layout} +\AtBeginDocument{% amsmath + \ifx\place@tag\@undefined\else + \bbl@sreplace\place@tag{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag@gather{\llap}{\bbl@truellap}% + \bbl@sreplace\place@tag{\rlap}{\bbl@truerlap}% + \bbl@sreplace\place@tag@gather{\rlap}{\bbl@truerlap}% + \fi} +\ifx\AddToHook\@undefined\else + \AddToHook{env/equation/before}{\pardir TLT }{} +\fi \ifx\@eqnnum\@undefined\else \ifx\bbl@attr@dir\@undefined\else - \edef\@eqnnum{{% - \unexpanded{\ifcase\bbl@attr@dir\else\bbl@textdir\@ne\fi}% - \unexpanded\expandafter{\@eqnnum}}} + \bbl@xin@{,leqno,}{,\@classoptionslist,}% + \ifin@ + \bbl@sreplace\@eqnnum{\rlap}{\bbl@leqno@aux} + \def\bbl@leqno@aux#1{% + \bbl@truerlap{% + \ifcase\bbl@attr@dir + #1% + \else + \bbl@textdir\@ne + #1% + \hskip-\displaywidth + \fi}} + \else + \bbl@exp{% + \def\\\@eqnnum{{% + \<ifcase>\\\bbl@attr@dir\<else>\\\bbl@textdir\@ne\<fi>% + \\\bbl@ifsamestring{\\\@currenvir}{equation}% + {}{\\\bbl@truellap}{\[@eqnnum]}}}} + \fi \fi \fi \ifx\bbl@opt@layout\@nnil\endinput\fi % if no layout diff --git a/Master/texmf-dist/tex/generic/babel/nil.ldf b/Master/texmf-dist/tex/generic/babel/nil.ldf index c484114f956..59b40c34ce0 100644 --- a/Master/texmf-dist/tex/generic/babel/nil.ldf +++ b/Master/texmf-dist/tex/generic/babel/nil.ldf @@ -33,7 +33,7 @@ %% extension |.ins|) which are part of the distribution. %% -\ProvidesLanguage{nil}[2021/11/29 3.67 Nil language] +\ProvidesLanguage{nil}[2021/12/28 3.68 Nil language] \LdfInit{nil}{datenil} \ifx\l@nil\@undefined \newlanguage\l@nil |