From 2f80535c778eacefb7c73b39d2cb4f877f3d3341 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 27 Jun 2022 03:04:10 +0000 Subject: CTAN sync 202206270304 --- macros/latex/required/babel/base/README.md | 26 +-- macros/latex/required/babel/base/babel.dtx | 245 +++++++++++++++++--------- macros/latex/required/babel/base/babel.ins | 4 +- macros/latex/required/babel/base/babel.pdf | Bin 882541 -> 885137 bytes macros/latex/required/babel/base/bbcompat.dtx | 2 +- 5 files changed, 185 insertions(+), 92 deletions(-) (limited to 'macros/latex/required/babel') diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md index 6b2fb1b240..74e4830b48 100644 --- a/macros/latex/required/babel/base/README.md +++ b/macros/latex/required/babel/base/README.md @@ -1,4 +1,4 @@ -## Babel 3.76 +## Babel 3.77 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 . -Changes in version 3.76 are described in: +Changes in version 3.77 are described in: -https://latex3.github.io/babel/news/whats-new-in-babel-3.76.html +https://latex3.github.io/babel/news/whats-new-in-babel-3.77.html Apart from the manual, you can find information on some aspects of babel at: @@ -46,13 +46,19 @@ respective authors. ### Summary of latest changes ``` -3.76 2022-06-06 - * Calendar conversion with a new macro \babelcalendar: hebrew, - islamic-civil, islamic-umalqura, persian. - * Added 6 locales for Arabic: Egypt, Iraq, Jordan, Lebanon, - Palestinian Territories, Tunisia. - * More updates to CLDR 4.1: French, English, Moldavian and - Arabic. +3.77 2022-06-26 + * More on calendar conversions (\localedate, \today). + * New calendars: 'coptic' (ar-EG, cop), 'buddhist' (th). + * New Arabic locale for Saudi Arabia, with the Umm al-Qura + calendar. + * Date now defaults to 'persian' in a few locales: Persian, + Northern Luri, Mazanderani, Pashto. + * `bangla` is now the preferred name for `bengali`. + * Attempt to deal with 'german' and 'swissgerman', whose names + conflict with the CLDR ones. + * More minor updates to the CLDR 41: Afrikaans, Arabic, Assamese, + Asturian, Azerbaijani, Belarusian, Bulgarian, Bangla, Tibetan, + Breton, Bodo, Bosnian, Catalan, English. ``` ### Previous changes diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx index 4d1fec7dcd..21493d3f4e 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/06/06 v3.76 The Babel package] +\ProvidesFile{babel.dtx}[2022/06/26 v3.77 The Babel package] \documentclass{ltxdoc} \GetFileInfo{babel.dtx} \usepackage{fontspec} @@ -1521,8 +1521,15 @@ captions): \tag{am} Amharic\hascapu\hascapl \tag{ar} Arabic\hascapu\hascapl \tag{ar-DZ} Arabic\hascapu\hascapl +\tag{ar-EG} Arabic\hascapu\hascapl +\tag{ar-IQ} Arabic\hascapu\hascapl +\tag{ar-JO} Arabic\hascapu\hascapl +\tag{ar-LB} Arabic\hascapu\hascapl \tag{ar-MA} Arabic\hascapu\hascapl +\tag{ar-PS} Arabic\hascapu\hascapl +\tag{ar-SA} Arabic\hascapu\hascapl \tag{ar-SY} Arabic\hascapu\hascapl +\tag{ar-TN} Arabic\hascapu\hascapl \tag{as} Assamese \tag{asa} Asu \tag{ast} Asturian\hascapu\hascapl @@ -1555,7 +1562,7 @@ captions): \tag{da} Danish\hascapu\hascapl \tag{dav} Taita \tag{de-AT} German\hascapu\hascapl -\tag{de-CH} German\hascapu\hascapl +\tag{de-CH} Swiss High German\hascapu\hascapl \tag{de} German\hascapu\hascapl \tag{dje} Zarma \tag{dsb} Lower Sorbian\hascapu\hascapl @@ -1614,7 +1621,7 @@ captions): \tag{ii} Sichuan Yi \tag{is} Icelandic\hascapu\hascapl \tag{it} Italian\hascapu\hascapl -\tag{ja} Japanese +\tag{ja} Japanese\hascapu \tag{jgo} Ngomba \tag{jmc} Machame \tag{ka} Georgian\hascapu\hascapl @@ -1629,8 +1636,9 @@ captions): \tag{kl} Kalaallisut \tag{kln} Kalenjin \tag{km} Khmer +\tag{kmr} Northern Kurdish\hascapu \tag{kn} Kannada\hascapu\hascapl -\tag{ko} Korean +\tag{ko} Korean\hascapu \tag{kok} Konkani \tag{ks} Kashmiri \tag{ksb} Shambala @@ -1639,7 +1647,7 @@ captions): \tag{kw} Cornish \tag{ky} Kyrgyz \tag{lag} Langi -\tag{lb} Luxembourgish +\tag{lb} Luxembourgish\hascapu\hascapl \tag{lg} Ganda \tag{lkt} Lakota \tag{ln} Lingala @@ -1675,6 +1683,7 @@ captions): \tag{nmg} Kwasio \tag{nn} Norwegian Nynorsk\hascapu\hascapl \tag{nnh} Ngiemboon +\tag{no} Norwegian \tag{nus} Nuer \tag{nyn} Nyankole \tag{om} Oromo @@ -1693,6 +1702,7 @@ captions): \tag{rm} Romansh\hascapu\hascapl \tag{rn} Rundi \tag{ro} Romanian\hascapu\hascapl +\tag{ro-MD} Moldavian\hascapu\hascapl \tag{rof} Rombo \tag{ru} Russian\hascapu\hascapl \tag{rw} Kinyarwanda @@ -1761,14 +1771,14 @@ captions): \tag{yo} Yoruba \tag{yue} Cantonese \tag{zgh} Standard Moroccan Tamazight -\tag{zh-Hans-HK} Chinese -\tag{zh-Hans-MO} Chinese -\tag{zh-Hans-SG} Chinese -\tag{zh-Hans} Chinese -\tag{zh-Hant-HK} Chinese -\tag{zh-Hant-MO} Chinese -\tag{zh-Hant} Chinese -\tag{zh} Chinese +\tag{zh-Hans-HK} Chinese\hascapu +\tag{zh-Hans-MO} Chinese\hascapu +\tag{zh-Hans-SG} Chinese\hascapu +\tag{zh-Hans} Chinese\hascapu +\tag{zh-Hant-HK} Chinese\hascapu +\tag{zh-Hant-MO} Chinese\hascapu +\tag{zh-Hant} Chinese\hascapu +\tag{zh} Chinese\hascapu \tag{zu} Zulu \end{multicols} @@ -1821,7 +1831,7 @@ basque\\ belarusian\\ bemba\\ bena\\ -bengali\\ +bangla\\ bodo\\ bosnian-cyrillic\\ bosnian-cyrl\\ @@ -2787,7 +2797,7 @@ The styles are: \item[Belarusan, Bulgarian, Church Slavic, Macedonian, Serbian] |lower|, |upper| -\item[Bengali] |alphabetic| +\item[Bangla] |alphabetic| \item[Central Kurdish] |alphabetic| @@ -2849,7 +2859,7 @@ be printed with the numeral style |digits|. date corresponding to the Gregorian calendar and other lunisolar systems with the following command. -\Describe{\localedate}{\oarg{calendar=.., variant=..}% +\Describe{\localedate}{\oarg{calendar=.., variant=.., convert}% {\marg{year}\marg{month}\marg{day}}} By default the calendar is the Gregorian, but an |ini| file may define @@ -2857,7 +2867,9 @@ strings for other calendars (currently |ar|, |ar-|*, |he|, |fa|, |hi|). In the latter case, the three arguments are the year, the month, and the day in those in the corresponding calendar. They are \textit{not} the Gregorian data to be converted (which means, say, 13 is a valid -month number with |calendar=hebrew|). +month number with |calendar=hebrew| and |calendar=coptic|). However, +with the option |convert| it’s converted (using internally the +following command). Even with a certain calendar there may be variants. In Kurmanji the default variant prints something like \textit{30. Çileya Pêşîn 2019}, @@ -2865,7 +2877,7 @@ but with |variant=izafa| it prints \textit{31’ê Çileya Pêşînê 2019}. \Describe{\babelcalendar}{\oarg{date}% \marg{calendar}\marg{year-macro}\m{month-macro}\m{day-macro}} - + \New{3.76} Although calendars aren’t the primary concern of \babel, the package should be able to, at least, generate correctly the current date in the way users would expect in their own culture. Currently, @@ -2873,9 +2885,11 @@ date in the way users would expect in their own culture. Currently, \textsf{ini} locale file has been imported), but year, month and day had to be entered by hand, which is very inconvenient. With this macro, the current date is converted and stored in the three last arguments, -which must be macros. The optional argument converts the given date, in -the form ‘\m{year}-\m{month}-\m{day}’. Please, refer to the page on the -news for 3.76 in the \babel{} site for further details. +which must be macros: allowed calendars are |buddhist|, |coptic|, +|hebrew|, |islamic-civil|, |islamic-umalqura|, |persian|. The optional +argument converts the given date, in the form +‘\m{year}-\m{month}-\m{day}’. Please, refer to the page on the news for +3.76 in the \babel{} site for further details. \subsection{Accessing language info} @@ -5157,8 +5171,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 @@ -9696,6 +9710,7 @@ help from Bernd Raichle, for which I am grateful. \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 @@ -10020,6 +10035,24 @@ help from Bernd Raichle, for which I am grateful. \\\bbl@add\{% \let\\\@Alph\}}% \fi + % == Calendars == + \ifx\bbl@KVP@calendar\@nil + \edef\bbl@KVP@calendar{\bbl@cl{calpr}}% + \fi + \def\bbl@tempe##1 ##2\@@{% Get first calendar + \def\bbl@tempa{##1}}% + \bbl@exp{\\\bbl@tempe\bbl@KVP@calendar\space\\\@@}% + \def\bbl@tempe##1.##2.##3\@@{% + \def\bbl@tempc{##1}% + \def\bbl@tempb{##2}}% + \expandafter\bbl@tempe\bbl@tempa..\@@ + \bbl@csarg\edef{calpr@\languagename}{% + \ifx\bbl@tempc\@empty\else + calendar=\bbl@tempc + \fi + \ifx\bbl@tempb\@empty\else + ,variant=\bbl@tempb + \fi}% % == require.babel in ini == % To load or reaload the babel-*.tex, if require.babel in ini \ifx\bbl@beforestart\relax\else % But not in doc aux or body @@ -10474,6 +10507,7 @@ help from Bernd Raichle, for which I am grateful. \fi % Conditional \ifnum#1>\z@ % 0 = only info, 1, 2 = basic, (re)new + \bbl@exportkey{calpr}{date.calendar.preferred}{}% \bbl@exportkey{lnbrk}{typography.linebreaking}{h}% \bbl@exportkey{hyphr}{typography.hyphenrules}{}% \bbl@exportkey{lfthm}{typography.lefthyphenmin}{2}% @@ -10509,6 +10543,7 @@ help from Bernd Raichle, for which I am grateful. % % \begin{macrocode} \let\bbl@inikv@identification\bbl@inikv +\let\bbl@inikv@date\bbl@inikv \let\bbl@inikv@typography\bbl@inikv \let\bbl@inikv@characters\bbl@inikv \let\bbl@inikv@numbers\bbl@inikv @@ -10713,7 +10748,9 @@ help from Bernd Raichle, for which I am grateful. \fi % \end{macrocode} % -% \textbf{Date.} TODO. Document +% \textbf{Date.} Arguments (year, month, day) are \textit{not} +% protected, on purpose. In |\today|, arguments are always gregorian, +% and therefore always converted with other calendars. TODO. Document % % \begin{macrocode} % Arguments are _not_ protected. @@ -10721,21 +10758,35 @@ help from Bernd Raichle, for which I am grateful. \DeclareRobustCommand\localedate[1][]{\bbl@localedate{#1}} \def\bbl@localedate#1#2#3#4{% \begingroup - \ifx\@empty#1\@empty\else - \let\bbl@ld@calendar\@empty - \let\bbl@ld@variant\@empty - \edef\bbl@tempa{\zap@space#1 \@empty}% - \def\bbl@tempb##1=##2\@@{\@namedef{bbl@ld@##1}{##2}}% - \bbl@foreach\bbl@tempa{\bbl@tempb##1\@@}% - \edef\bbl@calendar{% - \bbl@ld@calendar - \ifx\bbl@ld@variant\@empty\else - .\bbl@ld@variant - \fi}% - \bbl@replace\bbl@calendar{gregorian}{}% + \edef\bbl@they{#2}% + \edef\bbl@them{#3}% + \edef\bbl@thed{#4}% + \edef\bbl@tempe{% + \bbl@ifunset{bbl@calpr@\languagename}{}{\bbl@cl{calpr}},% + #1}% + \bbl@replace\bbl@tempe{ }{}% + \bbl@replace\bbl@tempe{convert}{convert=}% + \let\bbl@ld@calendar\@empty + \let\bbl@ld@variant\@empty + \let\bbl@ld@convert\relax + \def\bbl@tempb##1=##2\@@{\@namedef{bbl@ld@##1}{##2}}% + \bbl@foreach\bbl@tempe{\bbl@tempb##1\@@}% + \bbl@replace\bbl@ld@calendar{gregorian}{}% + \ifx\bbl@ld@calendar\@empty\else + \ifx\bbl@ld@convert\relax\else + \babelcalendar[\bbl@they-\bbl@them-\bbl@thed]% + {\bbl@ld@calendar}\bbl@they\bbl@them\bbl@thed + \fi \fi + \@nameuse{bbl@precalendar}% Remove, eg, +, -civil (-ca-islamic) + \edef\bbl@calendar{% Used in \month..., too + \bbl@ld@calendar + \ifx\bbl@ld@variant\@empty\else + .\bbl@ld@variant + \fi}% \bbl@cased - {\@nameuse{bbl@date@\languagename @\bbl@calendar}{#2}{#3}{#4}}% + {\@nameuse{bbl@date@\languagename @\bbl@calendar}% + \bbl@they\bbl@them\bbl@thed}% \endgroup} % eg: 1=months, 2=wide, 3=1, 4=dummy, 5=value, 6=calendar \def\bbl@inidate#1.#2.#3.#4\relax#5#6{% TODO - ignore with 'captions' @@ -10752,21 +10803,19 @@ help from Bernd Raichle, for which I am grateful. {\lowercase{\def\bbl@tempb{#6}}% \bbl@trim@def\bbl@toreplace{#5}% \bbl@TG@@date - \bbl@ifunset{bbl@date@\languagename @}% - {\bbl@exp{% TODO. Move to a better place. - \gdef\<\languagename date>{\\\protect\<\languagename date >}% - \gdef\<\languagename date >####1####2####3{% - \\\bbl@usedategrouptrue - \{% - \\\localedate{####1}{####2}{####3}}}% - \\\bbl@add\\\bbl@savetoday{% - \\\SetString\\\today{% - \<\languagename date>% - {\\\the\year}{\\\the\month}{\\\the\day}}}}}% - {}% - \global\bbl@csarg\let{date@\languagename @}\bbl@toreplace - \ifx\bbl@tempb\@empty\else - \global\bbl@csarg\let{date@\languagename @\bbl@tempb}\bbl@toreplace + \global\bbl@csarg\let{date@\languagename @\bbl@tempb}\bbl@toreplace + \ifx\bbl@savetoday\@empty + \bbl@exp{% TODO. Move to a better place. + \\\AfterBabelCommands{% + \def\<\languagename date>{\\\protect\<\languagename date >}% + \\\newcommand\<\languagename date >[4][]{% + \\\bbl@usedategrouptrue + \{% + \\\localedate[####1]{####2}{####3}{####4}}}}% + \def\\\bbl@savetoday{% + \\\SetString\\\today{% + \<\languagename date>[convert]% + {\\\the\year}{\\\the\month}{\\\the\day}}}}% \fi}% {}}} % \end{macrocode} @@ -12926,7 +12975,7 @@ help from Bernd Raichle, for which I am grateful. There is nothing intrinsically wrong with this warning, and\\% you can ignore it altogether if you do not need these\\% families. But if they are used in the document, you should be\\% - aware 'babel' will no set Script and Language for them, so\\% + aware 'babel' will not set Script and Language for them, so\\% you may consider defining a new family with \string\babelfont.\\% See the manual for further details about \string\babelfont.\\% Reported}} @@ -22721,24 +22770,28 @@ Babel.cjk_breaks = { % specific files, loaded when requested by an |ini| file in the % |identification| section with |require.calendars|. % -% \subsection{Islamic} -% % Start with function to compute the Julian day. It’s based on the % little library |calendar.js|, by John Walker, in the public domain. -% The code for the Civil calendar is based on it, too. -% % \begin{macrocode} -%<*ca-islamic> -\ExplSyntaxOn +%<<*Compute Julian day>> \def\bbl@fpmod#1#2{(#1-#2*floor(#1/#2))} \def\bbl@cs@gregleap#1{% (\bbl@fpmod{#1}{4} == 0) && (!((\bbl@fpmod{#1}{100} == 0) && (\bbl@fpmod{#1}{400} != 0)))} -\def\bbl@ca@jd#1#2#3{% year, month, day +\def\bbl@cs@jd#1#2#3{% year, month, day \fp_eval:n{ 1721424.5 + (365 * (#1 - 1)) + floor((#1 - 1) / 4) + (-floor((#1 - 1) / 100)) + floor((#1 - 1) / 400) + floor((((367 * #2) - 362) / 12) + - ((#2 <= 2) ? 0 : (\bbl@cs@gregleap{#1} ? -1 : -2)) + #3) }} + ((#2 <= 2) ? 0 : (\bbl@cs@gregleap{#1} ? -1 : -2)) + #3) }} +%<> +% \end{macrocode} +% \subsection{Islamic} +% The code for the Civil calendar is based on it, too. +% +% \begin{macrocode} +%<*ca-islamic> +\ExplSyntaxOn +<@Compute Julian day@> % == islamic (default) % Not yet implemented \def\bbl@ca@islamic#1-#2-#3\@@#4#5#6{} @@ -22758,7 +22811,7 @@ Babel.cjk_breaks = { \@namedef{bbl@ca@islamic-civil--}{\bbl@ca@islamicvl@x{-2}} \def\bbl@ca@islamicvl@x#1#2-#3-#4\@@#5#6#7{% \edef\bbl@tempa{% - \fp_eval:n{ floor(\bbl@ca@jd{#2}{#3}{#4})+0.5 #1}}% + \fp_eval:n{ floor(\bbl@cs@jd{#2}{#3}{#4})+0.5 #1}}% \edef#5{% \fp_eval:n{ floor(((30*(\bbl@tempa-1948439.5)) + 10646)/10631) }}% \edef#6{\fp_eval:n{ @@ -22774,7 +22827,7 @@ Babel.cjk_breaks = { % $\sim$2014/$\sim$2038). % % \begin{macrocode} -\def\bbl@ca@umalqura@data{56660, 56690,56719,56749,56778,56808,% +\def\bbl@cs@umalqura@data{56660, 56690,56719,56749,56778,56808,% 56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,% 57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,% 57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,% @@ -22814,9 +22867,9 @@ Babel.cjk_breaks = { \fi\fi {\bbl@error{Year~out~of~range}{The~allowed~range~is~2014-2038}}% \edef\bbl@tempd{\fp_eval:n{ % (Julian) day - \bbl@ca@jd{#2}{#3}{#4} + 0.5 - 2400000 #1}}% + \bbl@cs@jd{#2}{#3}{#4} + 0.5 - 2400000 #1}}% \count@\@ne - \bbl@foreach\bbl@ca@umalqura@data{% + \bbl@foreach\bbl@cs@umalqura@data{% \advance\count@\@ne \ifnum##1>\bbl@tempd\else \edef\bbl@tempe{\the\count@}% @@ -22828,6 +22881,11 @@ Babel.cjk_breaks = { \edef#6{\fp_eval:n{ \bbl@templ - (12 * \bbl@tempa) }}% \edef#7{\fp_eval:n{ \bbl@tempd - \bbl@tempb + 1 }}} \ExplSyntaxOff +\bbl@add\bbl@precalendar{% + \bbl@replace\bbl@ld@calendar{-civil}{}% + \bbl@replace\bbl@ld@calendar{-umalqura}{}% + \bbl@replace\bbl@ld@calendar{+}{}% + \bbl@replace\bbl@ld@calendar{-}{}} % % \end{macrocode} % @@ -23110,16 +23168,8 @@ Babel.cjk_breaks = { % \begin{macrocode} %<*ca-persian> \ExplSyntaxOn -\def\bbl@fpmod#1#2{(#1-#2*floor(#1/#2))} -\def\bbl@cs@gregleap#1{% - (\bbl@fpmod{#1}{4} == 0) && - (!((\bbl@fpmod{#1}{100} == 0) && (\bbl@fpmod{#1}{400} != 0)))} -\def\bbl@ca@jd#1#2#3{% year, month, day - \fp_eval:n{ 1721424.5 + (365 * (#1 - 1)) + - floor((#1 - 1) / 4) + (-floor((#1 - 1) / 100)) + - floor((#1 - 1) / 400) + floor((((367 * #2) - 362) / 12) + - ((#2 <= 2) ? 0 : (\bbl@cs@gregleap{#1} ? -1 : -2)) + #3) }} -\def\bbl@ca@firstjal@xx{2012,2016,2020,2024,2028,2029,% March 20 +<@Compute Julian day@> +\def\bbl@cs@firstjal@xx{2012,2016,2020,2024,2028,2029,% March 20 2032,2033,2036,2037,2040,2041,2044,2045,2048,2049} \def\bbl@ca@persian#1-#2-#3\@@#4#5#6{% \edef\bbl@tempa{#1}% 20XX-03-\bbl@tempe = 1 farvardin: @@ -23127,15 +23177,15 @@ Babel.cjk_breaks = { \bbl@afterfi\expandafter\@gobble \fi\fi {\bbl@error{Year~out~of~range}{The~allowed~range~is~2013-2050}}% - \bbl@xin@{\bbl@tempa}{\bbl@ca@firstjal@xx}% + \bbl@xin@{\bbl@tempa}{\bbl@cs@firstjal@xx}% \ifin@\def\bbl@tempe{20}\else\def\bbl@tempe{21}\fi - \edef\bbl@tempc{\fp_eval:n{\bbl@ca@jd{\bbl@tempa}{#2}{#3}+.5}}% current - \edef\bbl@tempb{\fp_eval:n{\bbl@ca@jd{\bbl@tempa}{03}{\bbl@tempe}+.5}}% begin + \edef\bbl@tempc{\fp_eval:n{\bbl@cs@jd{\bbl@tempa}{#2}{#3}+.5}}% current + \edef\bbl@tempb{\fp_eval:n{\bbl@cs@jd{\bbl@tempa}{03}{\bbl@tempe}+.5}}% begin \ifnum\bbl@tempc<\bbl@tempb \edef\bbl@tempa{\fp_eval:n{\bbl@tempa-1}}% go back 1 year and redo - \bbl@xin@{\bbl@tempa}{\bbl@ca@firstjal@xx}% + \bbl@xin@{\bbl@tempa}{\bbl@cs@firstjal@xx}% \ifin@\def\bbl@tempe{20}\else\def\bbl@tempe{21}\fi - \edef\bbl@tempb{\fp_eval:n{\bbl@ca@jd{\bbl@tempa}{03}{\bbl@tempe}+.5}}% + \edef\bbl@tempb{\fp_eval:n{\bbl@cs@jd{\bbl@tempa}{03}{\bbl@tempe}+.5}}% \fi \edef#4{\fp_eval:n{\bbl@tempa-621}}% set Jalali year \edef#6{\fp_eval:n{\bbl@tempc-\bbl@tempb+1}}% days from 1 farvardin @@ -23147,6 +23197,41 @@ Babel.cjk_breaks = { % % \end{macrocode} % +% \section{Coptic} +% +% Adapted from \texttt{jquery.calendars.package-1.1.4}, written by Keith +% Wood, 2010. Dual license: GPL and MIT. +% +% \begin{macrocode} +%<*ca-coptic> +\ExplSyntaxOn +<@Compute Julian day@> +\def\bbl@ca@coptic#1-#2-#3\@@#4#5#6{% + \edef\bbl@tempd{\fp_eval:n{floor(\bbl@cs@jd{#1}{#2}{#3}) + 0.5}}% + \edef\bbl@tempc{\fp_eval:n{\bbl@tempd - 1825029.5}}% + \edef#4{\fp_eval:n{% + floor((\bbl@tempc - floor((\bbl@tempc+366) / 1461)) / 365) + 1}}% + \edef\bbl@tempc{\fp_eval:n{% + \bbl@tempd - (#4-1) * 365 - floor(#4/4) - 1825029.5}}% + \edef#5{\fp_eval:n{floor(\bbl@tempc / 30) + 1}}% + \edef#6{\fp_eval:n{\bbl@tempc - (#5 - 1) * 30 + 1}}} +\ExplSyntaxOff +% +% \end{macrocode} +% +% \section{Buddhist} +% +% That’s very simple. +% +% \begin{macrocode} +%<*ca-buddhist> +\def\bbl@ca@buddhist#1-#2-#3\@@#4#5#6{% + \edef#4{\number\numexpr#1+543\relax}% + \edef#5{#2}% + \edef#6{#3}} +% +% \end{macrocode} +% % \section{Support for Plain \TeX\ (\texttt{plain.def})} % % \subsection{Not renaming \file{hyphen.tex}} diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins index 6988ba0b04..007c7d6b9b 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/06/06} +\def\filedate{2022/06/26} \def\batchfile{babel.ins} \input docstrip.tex @@ -135,6 +135,8 @@ \file{switch.def}{\from{babel.dtx}{kernel}} \file{hyphen.cfg}{\from{babel.dtx}{patterns}} \file{nil.ldf}{\from{babel.dtx}{nil}} + \file{babel-ca-buddhist.tex}{\from{babel.dtx}{ca-buddhist}} + \file{babel-ca-coptic.tex}{\from{babel.dtx}{ca-coptic}} \file{babel-ca-hebrew.tex}{\from{babel.dtx}{ca-hebrew}} \file{babel-ca-islamic.tex}{\from{babel.dtx}{ca-islamic}} \file{babel-ca-persian.tex}{\from{babel.dtx}{ca-persian}} diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf index 4585e8ca83..1e47810554 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 eeb5593f43..5538587a42 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/06/06 v3.76] +\ProvidesFile{bbcompat.dtx}[2022/06/26 v3.77] % % %% File 'bbcompat.dtx' -- cgit v1.2.3