summaryrefslogtreecommitdiff
path: root/macros/latex/required/babel/base/babel.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-09-13 03:01:35 +0000
committerNorbert Preining <norbert@preining.info>2023-09-13 03:01:35 +0000
commitde0fb15550a55ba5685a755fec7326e21a79fccd (patch)
treed31a21d9ea35405a0482f92ff12caabd84eae9e4 /macros/latex/required/babel/base/babel.dtx
parentbecf79ac9bbdddd15ef9d66a35c6d64252a2cd46 (diff)
CTAN sync 202309130301
Diffstat (limited to 'macros/latex/required/babel/base/babel.dtx')
-rw-r--r--macros/latex/required/babel/base/babel.dtx78
1 files changed, 60 insertions, 18 deletions
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index 55b6e0c26f..95ede8b7f4 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}[2023/08/29 v3.93 The Babel package]
+\ProvidesFile{babel.dtx}[2023/09/12 v3.94 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -2042,6 +2042,7 @@ inuktitut\\
irish\\
italian\\
japanese\\
+javanese\\
jju\\
jolafonyi\\
kabuverdianu\\
@@ -2081,6 +2082,7 @@ luxembourgish\\
luyia\\
macedonian\\
machame\\
+maithiri\\
makhuwameetto\\
makonde\\
malagasy\\
@@ -2114,6 +2116,7 @@ ngerman\\
ngiemboon\\
ngomba\\
nheengatu\\
+nigerianpidgin\\
nko\\
norsk\\
northernkurdish\\
@@ -2277,6 +2280,7 @@ walser\\
welsh\\
westernfrisian\\
wolaytta\\
+wolof\\
yangben\\
yiddish\\
yoruba\\
@@ -2288,6 +2292,30 @@ zulu
\bigskip
+Many locale templates are quite useable, provided captions and dates are
+not required (which is a very frequent case, particularly in ancient
+languages). So, they will be included in the default \babel{} distribution.
+This can serve to encourage contributions, too. A warning will remember
+they are ‘bare minumum locales’. The locales are currently
+the following:
+\begin{multicols}{4}
+\small
+akkadian\\
+ancientegyptian\\
+balinese\\
+divehi\\
+egyptianarabic\footnote{Masri or Colloquial Egyptian, with tag
+\texttt{arz}, not to be confused with the Standard Arabic as spoken in
+Egypt, with tag \texttt{ar-EG}).}\\
+ladino\\
+lombard\\
+navajo\\
+newari\\
+oldnorse\\
+phoenician\\
+southernaltai
+\end{multicols}
+
\textbf{Modifying and adding values to |ini| files}
\nobreak
@@ -3145,7 +3173,7 @@ the current date is converted and stored in the three last arguments,
which must be macros. Allowed calendars are:
\begin{multicols}{4}
|buddhist|\\
- |chinese| (strings in locales pending) \New{3.93}\\
+ |chinese| \New{3.94}\\
|coptic|\\
|ethiopic|\\
|hebrew|\\
@@ -5499,8 +5527,8 @@ wouldn’t exist.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.93>>
-%<<date=2023/08/29>>
+%<<version=3.94>>
+%<<date=2023/09/12>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -11212,6 +11240,7 @@ wouldn’t exist.
{There is little you can do. Sorry.}%
\fi\fi\fi\fi}}
\newcommand\BabelDateyyyy[1]{{\number#1}} % TODO - add leading 0
+\newcommand\BabelDateU[1]{{\number#1}}%
\def\bbl@replace@finish@iii#1{%
\bbl@exp{\def\\#1####1####2####3{\the\toks@}}}
\def\bbl@TG@@date{%
@@ -11225,7 +11254,9 @@ wouldn’t exist.
\bbl@replace\bbl@toreplace{[y]}{\BabelDatey{####1}}%
\bbl@replace\bbl@toreplace{[yy]}{\BabelDateyy{####1}}%
\bbl@replace\bbl@toreplace{[yyyy]}{\BabelDateyyyy{####1}}%
+ \bbl@replace\bbl@toreplace{[U]}{\BabelDateU{####1}}%
\bbl@replace\bbl@toreplace{[y|}{\bbl@datecntr[####1|}%
+ \bbl@replace\bbl@toreplace{[U|}{\bbl@datecntr[####1|}%
\bbl@replace\bbl@toreplace{[m|}{\bbl@datecntr[####2|}%
\bbl@replace\bbl@toreplace{[d|}{\bbl@datecntr[####3|}%
\bbl@replace@finish@iii\bbl@toreplace}
@@ -12417,7 +12448,12 @@ wouldn’t exist.
\AtEndOfPackage{%
\EnableBabelHook{babel-bidi}%
\bbl@loadfontspec % bidi needs fontspec
- \usepackage#1{bidi}}%
+ \usepackage#1{bidi}%
+ \let\bbl@digitsdotdash\DigitsDotDashInterCharToks
+ \def\DigitsDotDashInterCharToks{% See the 'bidi' package
+ \ifnum\@nameuse{bbl@wdir@\languagename}=\tw@ % 'AL' bidi
+ \bbl@digitsdotdash % So ignore in 'R' bidi
+ \fi}}%
\fi}
\ifnum\bbl@bidimode>200 % Any xe bidi=
\ifcase\expandafter\@gobbletwo\the\bbl@bidimode\or
@@ -12465,7 +12501,7 @@ wouldn’t exist.
\global\bbl@csarg\chardef{wdir@#1}\@ne
\bbl@xin@{\csname bbl@sname@#1\endcsname}{\bbl@alscripts}%
\ifin@
- \global\bbl@csarg\chardef{wdir@#1}\tw@ % useless in xetex
+ \global\bbl@csarg\chardef{wdir@#1}\tw@
\fi
\else
\global\bbl@csarg\chardef{wdir@#1}\z@
@@ -12506,9 +12542,11 @@ wouldn’t exist.
\def\bbl@textdir#1{%
\ifcase#1\relax
\chardef\bbl@thetextdir\z@
+ \@nameuse{setlatin}%
\bbl@textdir@i\beginL\endL
\else
\chardef\bbl@thetextdir\@ne
+ \@nameuse{setnonlatin}%
\bbl@textdir@i\beginR\endR
\fi}
\def\bbl@textdir@i#1#2{%
@@ -14503,7 +14541,7 @@ end
\catcode`_=11 \catcode`:=11
\gdef\bblar@nofswarn{\gdef\msg_warning:nnx##1##2##3{}}
\endgroup
-\gdef\bbl@arabicjust{%
+\gdef\bbl@arabicjust{% TODO. Allow for serveral locales.
\let\bbl@arabicjust\relax
\newattribute\bblar@kashida
\directlua{ Babel.attr_kashida = luatexbase.registernumber'bblar@kashida' }%
@@ -14699,13 +14737,15 @@ function Babel.arabic.justify_hlist(head, line, gc, size, pack)
width = node.dimensions(line.head) % The 'natural' width
k_curr = #k_list % Traverse backwards, from the end
wt_pos = 1
-
+
while width < goal do
subst_done = true
k_item = k_list[k_curr].node
- if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then
+ if k_list[k_curr].weight == Babel.kashida_wts[wt_pos] then
d = node.copy(k_item)
d.char = 0x0640
+ d.yoffset = 0 % TODO. From the prev char. But 0 seems safe.
+ d.xoffset = 0
line.head, new = node.insert_after(line.head, k_item, d)
width_new = node.dimensions(line.head)
if width > goal or width == width_new then
@@ -15356,9 +15396,7 @@ end
%<</More package options>>
%
\ifnum\bbl@bidimode>\z@ % Any bidi=
- \ifx\matheqdirmode\@undefined\else
- \matheqdirmode\@ne % A luatex primitive
- \fi
+ \matheqdirmode\@ne % A luatex primitive
\let\bbl@eqnodir\relax
\def\bbl@eqdel{()}
\def\bbl@eqnum{%
@@ -15371,17 +15409,21 @@ end
\def\bbl@eqno@flip#1{%
\ifdim\predisplaysize=-\maxdimen
\eqno
- \hb@xt@.01pt{\hb@xt@\displaywidth{\hss{#1}}\hss}%
+ \hb@xt@.01pt{%
+ \hb@xt@\displaywidth{\hss{#1\glet\bbl@upset\@currentlabel}}\hss}%
\else
- \leqno\hbox{#1}%
- \fi}
+ \leqno\hbox{#1\glet\bbl@upset\@currentlabel}%
+ \fi
+ \bbl@exp{\def\\\@currentlabel{\[bbl@upset]}}}
\def\bbl@leqno@flip#1{%
\ifdim\predisplaysize=-\maxdimen
\leqno
- \hb@xt@.01pt{\hss\hb@xt@\displaywidth{{#1}\hss}}%
+ \hb@xt@.01pt{%
+ \hss\hb@xt@\displaywidth{{#1\glet\bbl@upset\@currentlabel}\hss}}%
\else
- \eqno\hbox{#1}%
- \fi}
+ \eqno\hbox{#1\glet\bbl@upset\@currentlabel}%
+ \fi
+ \bbl@exp{\def\\\@currentlabel{\[bbl@upset]}}}
\AtBeginDocument{%
\ifx\bbl@noamsmath\relax\else
\ifx\maketag@@@\@undefined % Normal equation, eqnarray