From 4bc2b698b6ed5ce830d5c57a945896738296714f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 29 Aug 2022 20:04:39 +0000 Subject: babel (29aug22) git-svn-id: svn://tug.org/texlive/trunk@64232 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/babel/babel.dtx | 444 +++++++++++----------- 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 838780 -> 835622 bytes 4 files changed, 232 insertions(+), 216 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/babel/babel.dtx b/Master/texmf-dist/source/latex/babel/babel.dtx index d9ebe75a444..1e7004c4711 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}[2022/07/20 v3.78 The Babel package] +\ProvidesFile{babel.dtx}[2022/08/29 v3.79 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -126,8 +126,9 @@ \def\MacroFont{\fontencoding \encodingdefault \fontfamily\ttdefault \fontseries\mddefault \fontshape\updefault \small \catcode`\_=\active} \definecolor{shadecolor}{rgb}{0.96,0.96,0.93} -\def\PrintDescribeMacro#1{% - \strut\MacroFont\color{thered}\normalsize\string#1} +\AtBeginDocument{% + \def\PrintDescribeMacro#1{% + \strut\MacroFont\color{thered}\normalsize\string#1}} \def\Describe#1{% \par\penalty-500\vskip3ex\noindent \DescribeMacro{#1}\args} @@ -5050,6 +5051,9 @@ help from Bernd Raichle, for which I am grateful. in: \TeX hax Digest, Volume 89, \#13, 17 February 1989. \bibitem{CJKV} Ken Lunde, \textit{CJKV Information Processing}, O'Reilly, 2nd ed., 2009. + \bibitem{ReinDersh} Edward M. Reingold and Nachum Dershowitz, + \emph{Calendrical Calculations: The Ultimate Edition}, + Cambridge University Press, 2018 \bibitem{HP} Hubert Partl, \emph{German \TeX}, \emph{TUGboat} 9 (1988) \#1, p.~70--72. @@ -5171,8 +5175,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 @@ -5636,9 +5640,7 @@ help from Bernd Raichle, for which I am grateful. \def\bbl@infowarn#1{% \begingroup \def\\{\MessageBreak}% - \GenericWarning - {(babel) \@spaces\@spaces\@spaces}% - {Package babel Info: #1}% + \PackageNote{babel}{#1}% \endgroup} \def\bbl@info#1{% \begingroup @@ -6945,6 +6947,7 @@ help from Bernd Raichle, for which I am grateful. define it after the language has been loaded\\% (typically in the preamble) with:\\% \string\setlocalecaption{\languagename}{\bbl@tempa}{..}\\% + Feel free to contribute on github.com/latex3/babel.\\% Reported}} \def\bbl@tentative{\protect\bbl@tentative@i} \def\bbl@tentative@i#1{% @@ -9661,6 +9664,9 @@ help from Bernd Raichle, for which I am grateful. % \end{macrocode} % % \subsection{Load engine specific macros} +% +% Some macros are not defined in all engines, so, after loading the +% files define them if necessary to raise an error. % % \begin{macrocode} \bbl@trace{Input engine specific macros} @@ -9671,6 +9677,19 @@ help from Bernd Raichle, for which I am grateful. \or \input xebabel.def \fi +\providecommand\babelfont{% + \bbl@error + {This macro is available only in LuaLaTeX and XeLaTeX.}% + {Consider switching to these engines.}} +\providecommand\babelprehyphenation{% + \bbl@error + {This macro is available only in LuaLaTeX.}% + {Consider switching to that engine.}} +\ifx\babelposthyphenation\@undefined + \let\babelposthyphenation\babelprehyphenation + \let\babelpatterns\babelprehyphenation + \let\babelcharproperty\babelprehyphenation +\fi % \end{macrocode} % % \subsection{Creating and modifying languages} @@ -9690,28 +9709,12 @@ help from Bernd Raichle, for which I am grateful. \edef\languagename{#2}% \bbl@id@assign % Initialize keys - \let\bbl@KVP@captions\@nil - \let\bbl@KVP@date\@nil - \let\bbl@KVP@import\@nil - \let\bbl@KVP@main\@nil - \let\bbl@KVP@script\@nil - \let\bbl@KVP@language\@nil - \let\bbl@KVP@hyphenrules\@nil - \let\bbl@KVP@linebreaking\@nil - \let\bbl@KVP@justification\@nil - \let\bbl@KVP@mapfont\@nil - \let\bbl@KVP@maparabic\@nil - \let\bbl@KVP@mapdigits\@nil - \let\bbl@KVP@intraspace\@nil - \let\bbl@KVP@intrapenalty\@nil - \let\bbl@KVP@onchar\@nil - \let\bbl@KVP@transforms\@nil + \bbl@vforeach{captions,date,import,main,script,language,% + hyphenrules,linebreaking,justification,mapfont,maparabic,% + mapdigits,intraspace,intrapenalty,onchar,transforms,alph,% + Alph,labels,labels*,calendar}% + {\bbl@csarg\let{KVP@##1}\@nnil}% \global\let\bbl@release@transforms\@empty - \let\bbl@KVP@alph\@nil - \let\bbl@KVP@Alph\@nil - \let\bbl@KVP@labels\@nil - \bbl@csarg\let{KVP@labels*}\@nil - \let\bbl@KVP@calendar\@nil \let\bbl@calendars\@empty \global\let\bbl@inidata\@empty \global\let\bbl@extend@ini\@gobble @@ -9722,6 +9725,11 @@ help from Bernd Raichle, for which I am grateful. \global\let\bbl@extend@ini\bbl@extend@ini@aux \bbl@renewinikey##1\@@{##2}% \else + \bbl@csarg\ifx{KVP@##1}\@nnil\else + \bbl@error + {Unknown key '##1' in \string\babelprovide}% + {See the manual for valid keys}% + \fi \bbl@csarg\def{KVP@##1}{##2}% \fi}% \chardef\bbl@howloaded=% 0:none; 1:ldf without ini; 2:ini @@ -9735,15 +9743,15 @@ help from Bernd Raichle, for which I am grateful. \ifcase\bbl@howloaded \let\bbl@lbkflag\@empty % new \else - \ifx\bbl@KVP@hyphenrules\@nil\else + \ifx\bbl@KVP@hyphenrules\@nnil\else \let\bbl@lbkflag\@empty \fi - \ifx\bbl@KVP@import\@nil\else + \ifx\bbl@KVP@import\@nnil\else \let\bbl@lbkflag\@empty \fi \fi % == import, captions == - \ifx\bbl@KVP@import\@nil\else + \ifx\bbl@KVP@import\@nnil\else \bbl@exp{\\\bbl@ifblank{\bbl@KVP@import}}% {\ifx\bbl@initoload\relax \begingroup @@ -9755,11 +9763,11 @@ help from Bernd Raichle, for which I am grateful. \fi}% {}% \fi - \ifx\bbl@KVP@captions\@nil + \ifx\bbl@KVP@captions\@nnil \let\bbl@KVP@captions\bbl@KVP@import \fi % == - \ifx\bbl@KVP@transforms\@nil\else + \ifx\bbl@KVP@transforms\@nnil\else \bbl@replace\bbl@KVP@transforms{ }{,}% \fi % == Load ini == @@ -9777,7 +9785,7 @@ help from Bernd Raichle, for which I am grateful. \bbl@extend@ini{#2}% \fi % == ensure captions == - \ifx\bbl@KVP@captions\@nil\else + \ifx\bbl@KVP@captions\@nnil\else \bbl@ifunset{bbl@extracaps@#2}% {\bbl@exp{\\\babelensure[exclude=\\\today]{#2}}}% {\bbl@exp{\\\babelensure[exclude=\\\today, @@ -9800,10 +9808,10 @@ help from Bernd Raichle, for which I am grateful. \bbl@load@basic{#2}% % == script, language == % Override the values from ini or defines them - \ifx\bbl@KVP@script\@nil\else + \ifx\bbl@KVP@script\@nnil\else \bbl@csarg\edef{sname@#2}{\bbl@KVP@script}% \fi - \ifx\bbl@KVP@language\@nil\else + \ifx\bbl@KVP@language\@nnil\else \bbl@csarg\edef{lname@#2}{\bbl@KVP@language}% \fi \ifcase\bbl@engine\or @@ -9812,7 +9820,7 @@ help from Bernd Raichle, for which I am grateful. Babel.set_chranges_b('\bbl@cl{sbcp}', '\bbl@cl{chrng}') }}% \fi % == onchar == - \ifx\bbl@KVP@onchar\@nil\else + \ifx\bbl@KVP@onchar\@nnil\else \bbl@luahyphenate \bbl@exp{% \\\AddToHook{env/document/before}{{\\\select@language{#2}{}}}}% @@ -9872,7 +9880,7 @@ help from Bernd Raichle, for which I am grateful. \fi % == mapfont == % For bidi texts, to switch the font based on direction - \ifx\bbl@KVP@mapfont\@nil\else + \ifx\bbl@KVP@mapfont\@nnil\else \bbl@ifsamestring{\bbl@KVP@mapfont}{direction}{}% {\bbl@error{Option '\bbl@KVP@mapfont' unknown for\\% mapfont. Use 'direction'.% @@ -9898,7 +9906,7 @@ help from Bernd Raichle, for which I am grateful. \fi % == 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 + \ifx\bbl@KVP@intraspace\@nnil\else % We can override the ini or set \bbl@csarg\edef{intsp@#2}{\bbl@KVP@intraspace}% \fi \bbl@provide@intraspace @@ -9921,10 +9929,10 @@ help from Bernd Raichle, for which I am grateful. \fi \fi % == Line breaking: justification == - \ifx\bbl@KVP@justification\@nil\else + \ifx\bbl@KVP@justification\@nnil\else \let\bbl@KVP@linebreaking\bbl@KVP@justification \fi - \ifx\bbl@KVP@linebreaking\@nil\else + \ifx\bbl@KVP@linebreaking\@nnil\else \bbl@xin@{,\bbl@KVP@linebreaking,}{,elongated,kashida,cjk,unhyphenated,}% \ifin@ \bbl@csarg\xdef @@ -9966,7 +9974,7 @@ help from Bernd Raichle, for which I am grateful. {\expandafter\ifx\csname bbl@dgnat@\languagename\endcsname\@empty\else \expandafter\expandafter\expandafter \bbl@setdigits\csname bbl@dgnat@\languagename\endcsname - \ifx\bbl@KVP@maparabic\@nil\else + \ifx\bbl@KVP@maparabic\@nnil\else \ifx\bbl@latinarabic\@undefined \expandafter\let\expandafter\@arabic \csname bbl@counter@\languagename\endcsname @@ -9980,7 +9988,7 @@ help from Bernd Raichle, for which I am grateful. % == Counters: mapdigits == % Native digits (lua level). \ifodd\bbl@engine - \ifx\bbl@KVP@mapdigits\@nil\else + \ifx\bbl@KVP@mapdigits\@nnil\else \bbl@ifunset{bbl@dgnat@\languagename}{}% {\RequirePackage{luatexbase}% \bbl@activate@preotf @@ -10018,7 +10026,7 @@ help from Bernd Raichle, for which I am grateful. % 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. - \ifx\bbl@KVP@alph\@nil\else + \ifx\bbl@KVP@alph\@nnil\else \bbl@extras@wrap{\\\bbl@alph@saved}% {\let\bbl@alph@saved\@alph}% {\let\@alph\bbl@alph@saved @@ -10027,7 +10035,7 @@ help from Bernd Raichle, for which I am grateful. \\\bbl@add\{% \let\\\@alph\}}% \fi - \ifx\bbl@KVP@Alph\@nil\else + \ifx\bbl@KVP@Alph\@nnil\else \bbl@extras@wrap{\\\bbl@Alph@saved}% {\let\bbl@Alph@saved\@Alph}% {\let\@Alph\bbl@Alph@saved @@ -10037,7 +10045,7 @@ help from Bernd Raichle, for which I am grateful. \let\\\@Alph\}}% \fi % == Calendars == - \ifx\bbl@KVP@calendar\@nil + \ifx\bbl@KVP@calendar\@nnil \edef\bbl@KVP@calendar{\bbl@cl{calpr}}% \fi \def\bbl@tempe##1 ##2\@@{% Get first calendar @@ -10087,7 +10095,7 @@ help from Bernd Raichle, for which I am grateful. % == Release saved transforms == \bbl@release@transforms\relax % \relax closes the last item. % == main == - \ifx\bbl@KVP@main\@nil % Restore only if not 'main' + \ifx\bbl@KVP@main\@nnil % Restore only if not 'main' \let\languagename\bbl@savelangname \chardef\localeid\bbl@savelocaleid\relax \fi} @@ -10103,7 +10111,7 @@ help from Bernd Raichle, for which I am grateful. \@namedef{extras#1}{}% \@namedef{noextras#1}{}% \bbl@startcommands*{#1}{captions}% - \ifx\bbl@KVP@captions\@nil % and also if import, implicit + \ifx\bbl@KVP@captions\@nnil % and also if import, implicit \def\bbl@tempb##1{% elt for \bbl@captionslist \ifx##1\@empty\else \bbl@exp{% @@ -10120,7 +10128,7 @@ help from Bernd Raichle, for which I am grateful. \fi \fi \StartBabelCommands*{#1}{date}% - \ifx\bbl@KVP@import\@nil + \ifx\bbl@KVP@import\@nnil \bbl@exp{% \\\SetString\\\today{\\\bbl@nocaption{today}{#1today}}}% \else @@ -10136,17 +10144,17 @@ help from Bernd Raichle, for which I am grateful. {\bbl@ifunset{bbl@rgthm@#1}{3}{\bbl@cs{rgthm@#1}}}}}% % == hyphenrules (also in renew) == \bbl@provide@hyphens{#1}% - \ifx\bbl@KVP@main\@nil\else + \ifx\bbl@KVP@main\@nnil\else \expandafter\main@language\expandafter{#1}% \fi} % \def\bbl@provide@renew#1{% - \ifx\bbl@KVP@captions\@nil\else + \ifx\bbl@KVP@captions\@nnil\else \StartBabelCommands*{#1}{captions}% \bbl@read@ini{\bbl@KVP@captions}2% % Here all letters cat = 11 \EndBabelCommands \fi - \ifx\bbl@KVP@import\@nil\else + \ifx\bbl@KVP@import\@nnil\else \StartBabelCommands*{#1}{date}% \bbl@savetoday \bbl@savedate @@ -10193,7 +10201,7 @@ help from Bernd Raichle, for which I am grateful. % \begin{macrocode} \def\bbl@provide@hyphens#1{% \let\bbl@tempa\relax - \ifx\bbl@KVP@hyphenrules\@nil\else + \ifx\bbl@KVP@hyphenrules\@nnil\else \bbl@replace\bbl@KVP@hyphenrules{ }{,}% \bbl@foreach\bbl@KVP@hyphenrules{% \ifx\bbl@tempa\relax % if not yet found @@ -10206,7 +10214,7 @@ help from Bernd Raichle, for which I am grateful. \fi}% \fi \ifx\bbl@tempa\relax % if no opt or no language in opt found - \ifx\bbl@KVP@import\@nil + \ifx\bbl@KVP@import\@nnil \ifx\bbl@initoload\relax\else \bbl@exp{% and hyphenrules is not empty \\\bbl@ifblank{\bbl@cs{hyphr@#1}}% @@ -10655,7 +10663,7 @@ help from Bernd Raichle, for which I am grateful. \def\bbl@inikv@labels#1#2{% \in@{.map}{#1}% \ifin@ - \ifx\bbl@KVP@labels\@nil\else + \ifx\bbl@KVP@labels\@nnil\else \bbl@xin@{ map }{ \bbl@KVP@labels\space}% \ifin@ \def\bbl@tempc{#1}% @@ -10889,7 +10897,7 @@ help from Bernd Raichle, for which I am grateful. \catcode`\%=12 \catcode`\&=14 \gdef\bbl@transforms#1#2#3{&% - \ifx\bbl@KVP@transforms\@nil\else + \ifx\bbl@KVP@transforms\@nnil\else \directlua{ local str = [==[#2]==] str = str:gsub('%.%d+%.%d+$', '') @@ -13196,18 +13204,18 @@ help from Bernd Raichle, for which I am grateful. \ifin@ \bbl@ifunset{bbl@intsp@\languagename}{}% {\expandafter\ifx\csname bbl@intsp@\languagename\endcsname\@empty\else - \ifx\bbl@KVP@intraspace\@nil + \ifx\bbl@KVP@intraspace\@nnil \bbl@exp{% \\\bbl@intraspace\bbl@cl{intsp}\\\@@}% \fi - \ifx\bbl@KVP@intrapenalty\@nil + \ifx\bbl@KVP@intrapenalty\@nnil \bbl@intrapenalty0\@@ \fi \fi - \ifx\bbl@KVP@intraspace\@nil\else % We may override the ini + \ifx\bbl@KVP@intraspace\@nnil\else % We may override the ini \expandafter\bbl@intraspace\bbl@KVP@intraspace\@@ \fi - \ifx\bbl@KVP@intrapenalty\@nil\else + \ifx\bbl@KVP@intrapenalty\@nnil\else \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@ \fi \bbl@exp{% @@ -13612,15 +13620,18 @@ help from Bernd Raichle, for which I am grateful. end lang.patterns(lg, pats) end + Babel.characters = Babel.characters or {} + Babel.ranges = Babel.ranges or {} function Babel.hlist_has_bidi(head) local has_bidi = false + local ranges = Babel.ranges for item in node.traverse(head) do if item.id == node.id'glyph' then local itemchar = item.char local chardata = Babel.characters[itemchar] local dir = chardata and chardata.d or nil if not dir then - for nn, et in ipairs(Babel.ranges) do + for nn, et in ipairs(ranges) do if itemchar < et[1] then break elseif itemchar <= et[2] then @@ -13957,7 +13968,7 @@ help from Bernd Raichle, for which I am grateful. Babel.locale_props[\the\localeid].linebreak = 'c' }% \bbl@exp{\\\bbl@intraspace\bbl@cl{intsp}\\\@@}% - \ifx\bbl@KVP@intrapenalty\@nil + \ifx\bbl@KVP@intrapenalty\@nnil \bbl@intrapenalty0\@@ \fi \else % sea @@ -13969,12 +13980,12 @@ help from Bernd Raichle, for which I am grateful. Babel.set_chranges('\bbl@cl{sbcp}', '\bbl@cl{chrng}') }% - \ifx\bbl@KVP@intrapenalty\@nil + \ifx\bbl@KVP@intrapenalty\@nnil \bbl@intrapenalty0\@@ \fi \fi \fi - \ifx\bbl@KVP@intrapenalty\@nil\else + \ifx\bbl@KVP@intrapenalty\@nnil\else \expandafter\bbl@intrapenalty\bbl@KVP@intrapenalty\@@ \fi}} % \end{macrocode} @@ -14941,13 +14952,18 @@ end \bbl@sreplace\tikz{\begingroup}{\begingroup\bbl@pictsetdir\tw@}% \fi \ifx\tcolorbox\@undefined\else - \AddToHook{env/tcolorbox/begin}{\bbl@pictsetdir\@ne}% - \bbl@sreplace\tcb@savebox - {\ignorespaces}{\ignorespaces\bbl@pictresetdir}% - \ifx\tikzpicture@tcb@hooked\@undefined\else - \bbl@sreplace\tikzpicture@tcb@hooked{\noexpand\tikzpicture}% - {\textdir TLT\noexpand\tikzpicture}% - \fi + \def\tcb@drawing@env@begin{% + \csname tcb@before@\tcb@split@state\endcsname + \bbl@pictsetdir\tw@ + \begin{\kvtcb@graphenv}% + \tcb@bbdraw% + \tcb@apply@graph@patches + }% + \def\tcb@drawing@env@end{% + \end{\kvtcb@graphenv}% + \bbl@pictresetdir + \csname tcb@after@\tcb@split@state\endcsname + }% \fi }} {} @@ -15535,7 +15551,7 @@ end Babel = Babel or {} -Babel.ranges={ +Babel.ranges = { {0x0590, 0x05FF, 'r'}, {0x0600, 0x07BF, 'al'}, {0x07C0, 0x085F, 'r'}, @@ -15553,7 +15569,7 @@ Babel.ranges={ {0x100000, 0x10FFFD, 'on'} -- PUA } -Babel.characters={ +Babel.characters = { [0x0]={d='bn'}, [0x1]={d='bn'}, [0x2]={d='bn'}, @@ -22848,21 +22864,22 @@ Babel.cjk_breaks = { % This is basically the set of macros written by Michail Rozman in % 1991, with corrections and adaptions by Rama Porrat, Misha, Dan Haran % and Boris Lavva. This must be eventually replaced by computations -% with \textsf{l3fp}. +% with \textsf{l3fp}. An explanation of what’s going on can be found in +% \texttt{hebcal.sty} % % \begin{macrocode} %<*ca-hebrew> \newcount\bbl@cntcommon \def\bbl@remainder#1#2#3{% - #3 = #1 % c = a - \divide #3 by #2 % c = a/b - \multiply #3 by -#2 % c = -b(a/b) - \advance #3 by #1 }% % c = a - b(a/b) + #3=#1\relax + \divide #3 by #2\relax + \multiply #3 by -#2\relax + \advance #3 by #1\relax}% \newif\ifbbl@divisible \def\bbl@checkifdivisible#1#2{% - {\countdef\tmp = 0 % \tmp == \count0 - temporary variable + {\countdef\tmp=0 \bbl@remainder{#1}{#2}{\tmp}% - \ifnum \tmp = 0 + \ifnum \tmp=0 \global\bbl@divisibletrue \else \global\bbl@divisiblefalse @@ -22886,94 +22903,94 @@ Babel.cjk_breaks = { \bbl@gregleapfalse \fi \ifbbl@gregleap} -\def\bbl@gregdayspriormonths#1#2#3{% no month number 0 - {#3 = \ifcase #1 0 \or 0 \or 31 \or 59 \or 90 \or 120 \or 151 \or +\def\bbl@gregdayspriormonths#1#2#3{% + {#3=\ifcase #1 0 \or 0 \or 31 \or 59 \or 90 \or 120 \or 151 \or 181 \or 212 \or 243 \or 273 \or 304 \or 334 \fi \bbl@ifgregleap{#2}% - \ifnum #1 > 2 % if month after February - \advance #3 by 1 % add leap day + \ifnum #1 > 2 + \advance #3 by 1 \fi \fi - \global\bbl@cntcommon = #3}% - #3 = \bbl@cntcommon} + \global\bbl@cntcommon=#3}% + #3=\bbl@cntcommon} \def\bbl@gregdaysprioryears#1#2{% - {\countdef\tmpc = 4 % \tmpc==\count4 - \countdef\tmpb = 2 % \tmpb==\count2 - \tmpb = #1 % - \advance \tmpb by -1 % - \tmpc = \tmpb % \tmpc = \tmpb = year-1 - \multiply \tmpc by 365 % Days in prior years = - #2 = \tmpc % = 365*(year-1) ... - \tmpc = \tmpb % - \divide \tmpc by 4 % \tmpc = (year-1)/4 - \advance #2 by \tmpc % ... plus Julian leap days ... - \tmpc = \tmpb % - \divide \tmpc by 100 % \tmpc = (year-1)/100 - \advance #2 by -\tmpc % ... minus century years ... - \tmpc = \tmpb % - \divide \tmpc by 400 % \tmpc = (year-1)/400 - \advance #2 by \tmpc % ... plus 4-century years. - \global\bbl@cntcommon = #2}% - #2 = \bbl@cntcommon} + {\countdef\tmpc=4 + \countdef\tmpb=2 + \tmpb=#1\relax + \advance \tmpb by -1 + \tmpc=\tmpb + \multiply \tmpc by 365 + #2=\tmpc + \tmpc=\tmpb + \divide \tmpc by 4 + \advance #2 by \tmpc + \tmpc=\tmpb + \divide \tmpc by 100 + \advance #2 by -\tmpc + \tmpc=\tmpb + \divide \tmpc by 400 + \advance #2 by \tmpc + \global\bbl@cntcommon=#2\relax}% + #2=\bbl@cntcommon} \def\bbl@absfromgreg#1#2#3#4{% - {\countdef\tmpd = 0 % \tmpd==\count0 - #4 = #1 % days so far this month + {\countdef\tmpd=0 + #4=#1\relax \bbl@gregdayspriormonths{#2}{#3}{\tmpd}% - \advance #4 by \tmpd % add days in prior months + \advance #4 by \tmpd \bbl@gregdaysprioryears{#3}{\tmpd}% - \advance #4 by \tmpd % add days in prior years - \global\bbl@cntcommon = #4}% - #4 = \bbl@cntcommon} + \advance #4 by \tmpd + \global\bbl@cntcommon=#4\relax}% + #4=\bbl@cntcommon} \newif\ifbbl@hebrleap \def\bbl@checkleaphebryear#1{% - {\countdef\tmpa = 0 % \tmpa==\count0 - \countdef\tmpb = 1 % \tmpb==\count1 - \tmpa = #1 + {\countdef\tmpa=0 + \countdef\tmpb=1 + \tmpa=#1\relax \multiply \tmpa by 7 \advance \tmpa by 1 \bbl@remainder{\tmpa}{19}{\tmpb}% - \ifnum \tmpb < 7 % \tmpb = (7*year+1)%19 + \ifnum \tmpb < 7 \global\bbl@hebrleaptrue \else \global\bbl@hebrleapfalse \fi}} \def\bbl@hebrelapsedmonths#1#2{% - {\countdef\tmpa = 0 % \tmpa==\count0 - \countdef\tmpb = 1 % \tmpb==\count1 - \countdef\tmpc = 2 % \tmpc==\count2 - \tmpa = #1 % - \advance \tmpa by -1 % - #2 = \tmpa % #2 = \tmpa = year-1 - \divide #2 by 19 % Number of complete Meton cycles - \multiply #2 by 235 % #2 = 235*((year-1)/19) - \bbl@remainder{\tmpa}{19}{\tmpb}% \tmpa = years%19-years this cycle - \tmpc = \tmpb % - \multiply \tmpb by 12 % - \advance #2 by \tmpb % add regular months this cycle - \multiply \tmpc by 7 % - \advance \tmpc by 1 % - \divide \tmpc by 19 % \tmpc = (1+7*((year-1)%19))/19 - - \advance #2 by \tmpc % add leap months - \global\bbl@cntcommon = #2}% - #2 = \bbl@cntcommon} + {\countdef\tmpa=0 + \countdef\tmpb=1 + \countdef\tmpc=2 + \tmpa=#1\relax + \advance \tmpa by -1 + #2=\tmpa + \divide #2 by 19 + \multiply #2 by 235 + \bbl@remainder{\tmpa}{19}{\tmpb}% \tmpa=years%19-years this cycle + \tmpc=\tmpb + \multiply \tmpb by 12 + \advance #2 by \tmpb + \multiply \tmpc by 7 + \advance \tmpc by 1 + \divide \tmpc by 19 + \advance #2 by \tmpc + \global\bbl@cntcommon=#2}% + #2=\bbl@cntcommon} \def\bbl@hebrelapseddays#1#2{% - {\countdef\tmpa = 0 % \tmpa==\count0 - \countdef\tmpb = 1 % \tmpb==\count1 - \countdef\tmpc = 2 % \tmpc==\count2 + {\countdef\tmpa=0 + \countdef\tmpb=1 + \countdef\tmpc=2 \bbl@hebrelapsedmonths{#1}{#2}% - \tmpa = #2 % - \multiply \tmpa by 13753 % - \advance \tmpa by 5604 % \tmpa=MonthsElapsed*13758 + 5604 + \tmpa=#2\relax + \multiply \tmpa by 13753 + \advance \tmpa by 5604 \bbl@remainder{\tmpa}{25920}{\tmpc}% \tmpc == ConjunctionParts \divide \tmpa by 25920 \multiply #2 by 29 \advance #2 by 1 - \advance #2 by \tmpa % #2 = 1 + MonthsElapsed*29 + - \bbl@remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek + \advance #2 by \tmpa + \bbl@remainder{#2}{7}{\tmpa}% \ifnum \tmpc < 19440 \ifnum \tmpc < 9924 - \else % New moon at 9 h. 204 p. or later - \ifnum \tmpa = 2 % on Tuesday ... + \else + \ifnum \tmpa=2 \bbl@checkleaphebryear{#1}% of a common year \ifbbl@hebrleap \else @@ -22982,8 +22999,8 @@ Babel.cjk_breaks = { \fi \fi \ifnum \tmpc < 16789 - \else % New moon at 15 h. 589 p. or later - \ifnum \tmpa = 1 % on Monday ... + \else + \ifnum \tmpa=1 \advance #1 by -1 \bbl@checkleaphebryear{#1}% at the end of leap year \ifbbl@hebrleap @@ -22992,113 +23009,112 @@ Babel.cjk_breaks = { \fi \fi \else - \advance #2 by 1 % new moon at or after midday + \advance #2 by 1 \fi - \bbl@remainder{#2}{7}{\tmpa}% % \tmpa == DayOfWeek - \ifnum \tmpa = 0 % if Sunday ... + \bbl@remainder{#2}{7}{\tmpa}% + \ifnum \tmpa=0 \advance #2 by 1 - \else % - \ifnum \tmpa = 3 % Wednesday ... + \else + \ifnum \tmpa=3 \advance #2 by 1 \else - \ifnum \tmpa = 5 % or Friday + \ifnum \tmpa=5 \advance #2 by 1 \fi \fi \fi - \global\bbl@cntcommon = #2}% - #2 = \bbl@cntcommon} + \global\bbl@cntcommon=#2\relax}% + #2=\bbl@cntcommon} \def\bbl@daysinhebryear#1#2{% - {\countdef\tmpe = 12 % \tmpe==\count12 + {\countdef\tmpe=12 \bbl@hebrelapseddays{#1}{\tmpe}% \advance #1 by 1 \bbl@hebrelapseddays{#1}{#2}% \advance #2 by -\tmpe - \global\bbl@cntcommon = #2}% - #2 = \bbl@cntcommon} + \global\bbl@cntcommon=#2}% + #2=\bbl@cntcommon} \def\bbl@hebrdayspriormonths#1#2#3{% - {\countdef\tmpf= 14 % \tmpf==\count14 - #3 = \ifcase #1 % Days in prior month of regular year - 0 \or % no month number 0 - 0 \or % Tishri - 30 \or % Heshvan - 59 \or % Kislev - 89 \or % Tebeth - 118 \or % Shebat - 148 \or % Adar I - 148 \or % Adar II - 177 \or % Nisan - 207 \or % Iyar - 236 \or % Sivan - 266 \or % Tammuz - 295 \or % Av - 325 \or % Elul - 400 % Dummy + {\countdef\tmpf= 14 + #3=\ifcase #1\relax + 0 \or + 0 \or + 30 \or + 59 \or + 89 \or + 118 \or + 148 \or + 148 \or + 177 \or + 207 \or + 236 \or + 266 \or + 295 \or + 325 \or + 400 \fi \bbl@checkleaphebryear{#2}% - \ifbbl@hebrleap % in leap year - \ifnum #1 > 6 % if month after Adar I - \advance #3 by 30 % add 30 days + \ifbbl@hebrleap + \ifnum #1 > 6 + \advance #3 by 30 \fi \fi \bbl@daysinhebryear{#2}{\tmpf}% \ifnum #1 > 3 - \ifnum \tmpf = 353 % - \advance #3 by -1 % - \fi % Short Kislev - \ifnum \tmpf = 383 % - \advance #3 by -1 % - \fi % + \ifnum \tmpf=353 + \advance #3 by -1 + \fi + \ifnum \tmpf=383 + \advance #3 by -1 + \fi \fi \ifnum #1 > 2 - \ifnum \tmpf = 355 % - \advance #3 by 1 % - \fi % Long Heshvan - \ifnum \tmpf = 385 % - \advance #3 by 1 % - \fi % + \ifnum \tmpf=355 + \advance #3 by 1 + \fi + \ifnum \tmpf=385 + \advance #3 by 1 + \fi \fi - \global\bbl@cntcommon = #3}% - #3 = \bbl@cntcommon} + \global\bbl@cntcommon=#3\relax}% + #3=\bbl@cntcommon} \def\bbl@absfromhebr#1#2#3#4{% - {#4 = #1 + {#4=#1\relax \bbl@hebrdayspriormonths{#2}{#3}{#1}% - \advance #4 by #1 % Add days in prior months this year + \advance #4 by #1\relax \bbl@hebrelapseddays{#3}{#1}% - \advance #4 by #1 % Add days in prior years - \advance #4 by -1373429 % Subtract days before Gregorian - \global\bbl@cntcommon = #4}% % 01.01.0001 - #4 = \bbl@cntcommon} + \advance #4 by #1\relax + \advance #4 by -1373429 + \global\bbl@cntcommon=#4\relax}% + #4=\bbl@cntcommon} \def\bbl@hebrfromgreg#1#2#3#4#5#6{% - {\countdef\tmpx= 17 % \tmpx==\count17 - \countdef\tmpy= 18 % \tmpy==\count18 - \countdef\tmpz= 19 % \tmpz==\count19 - #6 = #3 % - \global\advance #6 by 3761 % approximation from above + {\countdef\tmpx= 17 + \countdef\tmpy= 18 + \countdef\tmpz= 19 + #6=#3\relax + \global\advance #6 by 3761 \bbl@absfromgreg{#1}{#2}{#3}{#4}% - \tmpz = 1 \tmpy = 1 + \tmpz=1 \tmpy=1 \bbl@absfromhebr{\tmpz}{\tmpy}{#6}{\tmpx}% - \ifnum \tmpx > #4 % - \global\advance #6 by -1 % Hyear = Gyear + 3760 + \ifnum \tmpx > #4\relax + \global\advance #6 by -1 \bbl@absfromhebr{\tmpz}{\tmpy}{#6}{\tmpx}% - \fi % - \advance #4 by -\tmpx % Days in this year - \advance #4 by 1 % - #5 = #4 % - \divide #5 by 30 % Approximation for month from below - \loop % Search for month + \fi + \advance #4 by -\tmpx + \advance #4 by 1 + #5=#4\relax + \divide #5 by 30 + \loop \bbl@hebrdayspriormonths{#5}{#6}{\tmpx}% - \ifnum \tmpx < #4 + \ifnum \tmpx < #4\relax \advance #5 by 1 - \tmpy = \tmpx + \tmpy=\tmpx \repeat \global\advance #5 by -1 \global\advance #4 by -\tmpy}} \newcount\bbl@hebrday \newcount\bbl@hebrmonth \newcount\bbl@hebryear \newcount\bbl@gregday \newcount\bbl@gregmonth \newcount\bbl@gregyear -% \def\bbl@ca@hebrew#1-#2-#3\@@#4#5#6{% - \bbl@gregday=#3 \bbl@gregmonth=#2 \bbl@gregyear=#1 + \bbl@gregday=#3\relax \bbl@gregmonth=#2\relax \bbl@gregyear=#1\relax \bbl@hebrfromgreg {\bbl@gregday}{\bbl@gregmonth}{\bbl@gregyear}% {\bbl@hebrday}{\bbl@hebrmonth}{\bbl@hebryear}% diff --git a/Master/texmf-dist/source/latex/babel/babel.ins b/Master/texmf-dist/source/latex/babel/babel.ins index 13a22deb6a9..e33a43e916b 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{2022/07/20} +\def\filedate{2022/08/29} \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 c8f85ad5b65..95360a381a3 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}[2022/07/20 v3.78] +\ProvidesFile{bbcompat.dtx}[2022/08/29 v3.79] % % %% File 'bbcompat.dtx' diff --git a/Master/texmf-dist/source/latex/babel/locale.zip b/Master/texmf-dist/source/latex/babel/locale.zip index 9c061da3c43..41de80f008d 100644 Binary files a/Master/texmf-dist/source/latex/babel/locale.zip and b/Master/texmf-dist/source/latex/babel/locale.zip differ -- cgit v1.2.3