[latex3-commits] [git/LaTeX3-latex3-babel] main: Bump to 3.81. (0a43d5f)

Javier email at dante.de
Tue Oct 4 17:20:48 CEST 2022


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/0a43d5f8a23788c26cbd4c270d3aa3b411f8d15a

>---------------------------------------------------------------

commit 0a43d5f8a23788c26cbd4c270d3aa3b411f8d15a
Author: Javier <email at localhost>
Date:   Tue Oct 4 17:20:48 2022 +0200

    Bump to 3.81.


>---------------------------------------------------------------

0a43d5f8a23788c26cbd4c270d3aa3b411f8d15a
 README.md                   |  27 +++++-------------
 babel.dtx                   |  68 ++++++++++++++++++++++++++++++++++----------
 babel.ins                   |   2 +-
 babel.pdf                   | Bin 883707 -> 885961 bytes
 bbcompat.dtx                |   2 +-
 locale/bo/babel-bo.ini      |   4 +--
 locale/bo/babel-tibetan.tex |  43 +++++++++++++++++++++-------
 7 files changed, 96 insertions(+), 50 deletions(-)

diff --git a/README.md b/README.md
index b6e1116..173be37 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.80.2876
+## Babel 3.81
 
 **Development**
 
@@ -48,27 +48,14 @@ respective authors.
 
 ### Summary of latest changes
 ```
-3.81  dev
+3.81  2022-10-04
       * Tibetan line breaking and justification (lines padded with
         trailing tshegs).
-      * No 'fontspec' warnings about inexistent languages and
-        scripts.
-
-3.80  2022-09-16
-      * Ethiopic calendar.
-      * Hungarian date in the superessive case.
-      * Captions for Hausa by Abubakar Yusuf (@fatherofcamels)
-      * Fixes in dates:
-        - Latin: In `pdftex`, numerals were printed in arabic form.
-        - Thai: Buddhist and Gregorian were reversed.
-        - Persian: The Persian calendar was not loaded.
-      * More updates to the CLDR 41: Galician, Swiss German, Gujarati,
-        Hausa, Hebrew, Hindi, Croatian, Upper Sorbian, Hungarian,
-        Armenian, Interlingua, Indonesian, Igbo, Sichuan Yi, Icelandic,
-        Italian, Japanese, Ngomba, Georgian, Kabyle, Kabuverdianu,
-        Kazakh, Kako, Kalaallisut, Khmer, Kannada, Korean, Konkani,
-        Kashmiri, Colognian, Cornish, Kyrgyz, Lakota, Lao, Northern
-        Luri, Lithuanian, Macedonian, Malayalam, Mongolian.
+      * New option 'letters' for 'onchar'.
+      * Conceal 'fontspec' warnings about unknown languages and
+        scripts with \babelfont.
+      * More updates to the CLDR 41: Burmese, Dutch, Kwasio, Malay,
+        Marathi, Mazanderani, Nepali, Norwegian, Norwegian Nynorsk.
 ```
 
 ### Previous changes
diff --git a/babel.dtx b/babel.dtx
index 907442a..3d8eddc 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2022/09/30 v3.80.2876 The Babel package]
+\ProvidesFile{babel.dtx}[2022/10/04 v3.81 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -2308,7 +2308,6 @@ to select fonts in addition to the three basic families.
   \babel{} and should be set with |fontspec| if necessary.
 \end{warning}
 
-
 \begin{troubleshooting}
   \trouble{Package babel Info: The following fonts are not babel
   standard families} \textit{Package babel Info: The following fonts
@@ -2609,7 +2608,8 @@ the script, no matter which language is active. Although somewhat
 inconsistent, this makes setting a language up easier in most typical
 cases.
 
-\Describe{onchar=}{\texttt{ids} $\string|$ \texttt{fonts}}
+\Describe{onchar=}{\texttt{ids} $\string|$ \texttt{fonts}
+  $\string|$ \texttt{letters}}
 \New{3.38} This option is much like an ‘event’ called when a character
 belonging to the script of this locale is found (as its name implies,
 it acts on characters, not on spaces). There are currently two
@@ -2620,6 +2620,10 @@ locale (as set with |\babelfont|). This option is not compatible with
 |mapfont|. Characters can be added or modified with
 |\babelcharproperty|.
 
+\New{3.81} Option |letters| restricts the ‘actions’ to letters, in the
+\TeX{} sense (i.~e., with catcode 11). Digits and punctuation are then
+considered part of current locale (as set by a selector).
+
 \begin{note}
   An alternative approach with \luatex{} and Harfbuzz is the font
   option |RawFeature={multiscript=auto}|. It does not switch the
@@ -2643,7 +2647,8 @@ Currently used only in Southeast Asian scrips, like Thai. Ignored if 0
 See section~\ref{transforms}.
 
 \Describe{justification=}{\texttt{kashida} $\string|$
-\texttt{elongated} $\string|$ \texttt{unhyphenated}}
+\texttt{elongated} $\string|$ \texttt{unhyphenated}
+$\string|$ \texttt{padding}}
 \New{3.59} There are currently three options, mainly for the Arabic
 script. It sets the linebreaking and justification method, which can be
 based on the the \textsc{arabic tatweel} character or in the
@@ -2652,6 +2657,11 @@ explanation see the
 \href{https://latex3.github.io/babel/news/whats-new-in-babel-3.59.html}%
   {\babel\ site}.
 
+\New{3.81} The option |padding| has been devised primarily for Tibetan.
+It’s still somewhat experimental. Again, there is an explanation in the
+\href{https://latex3.github.io/babel/news/whats-new-in-babel-3.81.html}%
+  {\babel\ site}.
+
 \Describe{linebreaking=}{}
 \New{3.59} Just a synonymous for \texttt{justification}.
 
@@ -4093,6 +4103,10 @@ For example:
 \babelcharproperty{`)}{linebreak}{cl} % or id, op, cl, ns, ex, in, hy
 \end{verbatim}
 
+Please, refer to the Unicode standard (Annex \#9 and Annex \#14) for
+the meaning of the available codes. For example, |en| is ‘European
+number’ and |id| is ‘ideographic’.
+
 \New{3.39} Another property is |locale|, which adds characters to the
 list used by |onchar| in |\babelprovide|, or, if the last argument is
 empty, removes them. The last argument is the locale name:
@@ -5162,8 +5176,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.80.2876>>
-%<<date=2022/09/30>>
+%<<version=3.81>>
+%<<date=2022/10/04>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6515,9 +6529,10 @@ help from Bernd Raichle, for which I am grateful.
   \bbl at xin@{/u}{/\bbl at tempa}%
   \ifin@\else\bbl at xin@{/e}{/\bbl at tempa}\fi % elongated forms 
   \ifin@\else\bbl at xin@{/k}{/\bbl at tempa}\fi % only kashida
+  \ifin@\else\bbl at xin@{/p}{/\bbl at tempa}\fi % padding (eg, Tibetan)
   \ifin@\else\bbl at xin@{/v}{/\bbl at tempa}\fi % variable font
   \ifin@
-    % unhyphenated/kashida/elongated = allow stretching
+    % unhyphenated/kashida/elongated/padding = allow stretching
     \language\l at unhyphenated
     \babel at savevariable\emergencystretch
     \emergencystretch\maxdimen
@@ -9816,7 +9831,15 @@ help from Bernd Raichle, for which I am grateful.
         Babel.linebreaking.add_before(Babel.locale_map)
         Babel.loc_to_scr = {}
         Babel.chr_to_loc = Babel.chr_to_loc or {}
-      end}%
+      end
+      Babel.locale_props[\the\localeid].letters = false
+    }%
+    \bbl at xin@{ letters }{ \bbl at KVP@onchar\space}%
+    \ifin@
+      \directlua{
+        Babel.locale_props[\the\localeid].letters = true
+      }%
+    \fi
     \bbl at xin@{ ids }{ \bbl at KVP@onchar\space}%
     \ifin@
       \ifx\bbl at starthyphens\@undefined % Needed if no explicit selection
@@ -9919,7 +9942,8 @@ help from Bernd Raichle, for which I am grateful.
      \let\bbl at KVP@linebreaking\bbl at KVP@justification
   \fi
   \ifx\bbl at KVP@linebreaking\@nnil\else
-    \bbl at xin@{,\bbl at KVP@linebreaking,}{,elongated,kashida,cjk,unhyphenated,}%
+    \bbl at xin@{,\bbl at KVP@linebreaking,}%
+      {,elongated,kashida,cjk,padding,unhyphenated,}%
     \ifin@
       \bbl at csarg\xdef
         {lnbrk@\languagename}{\expandafter\@car\bbl at KVP@linebreaking\@nil}%
@@ -9928,6 +9952,8 @@ help from Bernd Raichle, for which I am grateful.
   \bbl at xin@{/e}{/\bbl at cl{lnbrk}}%
   \ifin@\else\bbl at xin@{/k}{/\bbl at cl{lnbrk}}\fi
   \ifin@\bbl at arabicjust\fi
+  \bbl at xin@{/p}{/\bbl at cl{lnbrk}}%
+  \ifin@\AtBeginDocument{\bbl at tibetanjust}\fi
   % == Line breaking: hyphenate.other.(locale|script) ==
   \ifx\bbl at lbkflag\@empty
     \bbl at ifunset{bbl at hyotl@\languagename}{}%
@@ -12899,9 +12925,12 @@ help from Bernd Raichle, for which I am grateful.
 %<<*Font selection>>
 \bbl at trace{Font handling with fontspec}
 \ifx\ExplSyntaxOn\@undefined\else
-  \def\bbl at fs@warn#1#2{% \bbl at tempfs is the original macro
+  \def\bbl at fs@warn at nx#1#2{% \bbl at tempfs is the original macro
     \in@{,#1,}{,no-script,language-not-exist,}%
-    \ifin@\else\bbl at tempfs{#1}{#2}\fi}
+    \ifin@\else\bbl at tempfs@nx{#1}{#2}\fi}
+  \def\bbl at fs@warn at nxx#1#2#3{%
+    \in@{,#1,}{,no-script,language-not-exist,}%
+    \ifin@\else\bbl at tempfs@nxx{#1}{#2}{#3}\fi}
   \def\bbl at loadfontspec{%
     \let\bbl at loadfontspec\relax 
     \ifx\fontspec\@undefined
@@ -13073,11 +13102,15 @@ help from Bernd Raichle, for which I am grateful.
       {\\\newfontscript{\bbl at cl{sname}}{\bbl at cl{sotf}}}%
     \<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl at cl{lname}}%
       {\\\newfontlanguage{\bbl at cl{lname}}{\bbl at cl{lotf}}}%
-    \let\\\bbl at tempfs\<__fontspec_warning:nx>%
-    \let\<__fontspec_warning:nx>\\\bbl at fs@warn
+    \let\\\bbl at tempfs@nx\<__fontspec_warning:nx>%
+    \let\<__fontspec_warning:nx>\\\bbl at fs@warn at nx
+    \let\\\bbl at tempfs@nxx\<__fontspec_warning:nxx>%
+    \let\<__fontspec_warning:nxx>\\\bbl at fs@warn at nxx
     \\\renewfontfamily\\#4%
       [\bbl at cl{lsys},#2]}{#3}% ie \bbl at exp{..}{#3}
-  \bbl at exp{\let\<__fontspec_warning:nx>\\\bbl at tempfs}%
+  \bbl at exp{%
+    \let\<__fontspec_warning:nx>\\\bbl at tempfs@nx
+    \let\<__fontspec_warning:nxx>\\\bbl at tempfs@nxx}%
   \begingroup
      #4%
      \xdef#1{\f at family}%     eg, \bbl at rmdflt@lang{FreeSerif(0)}
@@ -14328,6 +14361,11 @@ function Babel.locale_map(head)
           (item.char >= 0x1DC0 and item.char <= 0x1DFF) then
         toloc = toloc_save
       end
+      if toloc and Babel.locale_props[toloc] and
+          Babel.locale_props[toloc].letters and
+          tex.getcatcode(item.char) \string~= 11 then
+        toloc = nil
+      end
       if toloc and toloc > -1 then
         if Babel.locale_props[toloc].lg then
           item.lang = Babel.locale_props[toloc].lg
@@ -14338,7 +14376,7 @@ function Babel.locale_map(head)
         end
         toloc_save = toloc
       end
-    elseif not inmath and item.id == 7 then
+    elseif not inmath and item.id == 7 then % Apply recursively
       item.replace = item.replace and Babel.locale_map(item.replace)
       item.pre     = item.pre and Babel.locale_map(item.pre)
       item.post    = item.post and Babel.locale_map(item.post)  
diff --git a/babel.ins b/babel.ins
index 2612989..a40cfd7 100644
--- a/babel.ins
+++ b/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/09/30}
+\def\filedate{2022/10/04}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index fde44e7..c667f52 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index c97eb79..0bc850a 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/09/30 v3.80.2876]
+\ProvidesFile{bbcompat.dtx}[2022/10/04 v3.81]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/locale/bo/babel-bo.ini b/locale/bo/babel-bo.ini
index 0ba6f9a..38b6b11 100644
--- a/locale/bo/babel-bo.ini
+++ b/locale/bo/babel-bo.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.5
-date = 2022-06-14
+version = 1.6
+date = 2022-09-30
 name.local = བོད་སྐད་
 name.english = Tibetan
 name.babel = tibetan
diff --git a/locale/bo/babel-tibetan.tex b/locale/bo/babel-tibetan.tex
index c4663ba..31f7c3d 100644
--- a/locale/bo/babel-tibetan.tex
+++ b/locale/bo/babel-tibetan.tex
@@ -12,18 +12,39 @@
 
 \ifcase\bbl at engine\or
 
-\newcommand\EnableTibetanHJ[1][1 .1 0]{%
-  \bbl at warning{%
-    Tibetan line breaking and justification are tentative.\\%
-    They might not work as expected and their behavior\\%
-    could change in the future. Feel free to contribute.\\%
-    Reported}%
+\bbl at warning{%
+  Tibetan line breaking and justification are tentative.\\%
+  They might not work as expected and their behavior\\%
+  could change in the future. Feel free to contribute.\\%
+  Reported}%
+
+\directlua{
+  Babel.tibetan = Babel.tibetan or {}
+  Babel.tibetan.shad = {.5, 0, 0, false}
+  Babel.tibetan.tsheg = {0, .0001, 0, false}
+  Babel.tibetan.intraspace = {0, 0, 0} % TODO
+}
+
+\AtBeginDocument{%
+  % (1) Spacing
+  \edef\bbl at tempe{\directlua{
+    tex.print(table.concat(Babel.tibetan.shad, ' ', 1, 3))
+  }}%
   \babelprehyphenation{tibetan}{[{a}{p}]|}%
-    { {}, {space=#1, data=1 } }%
+    { {}, {space=\bbl at tempe, data=1 } }%
+  % (2) Line breaking
   \babelprehyphenation{tibetan}{[^^^^0f0d^^^^0f0e]|[^^^^0f0d^^^^0f0e]}%
     { {}, {insert, penalty=10000}, {}, {} }%
+  \babelprehyphenation{tibetan}{[^^^^0f0d^^^^0f0e][^^^^0f40-^^^^0f6a]}%
+    { {}, {insert, space=0 0 0}, {} }%
+  \edef\bbl at tempe{\directlua{
+    tex.print(table.concat(Babel.tibetan.tsheg, ' ', 1, 3))
+  }}%
   \babelprehyphenation{tibetan}{^^^^0f0b()([^ ^^^^0f0d^^^^0f0e])()}%
-    { {insert, space=0 .0001 0, data=1}, {string = {1}} }%
+    { {insert, space=\bbl at tempe, data=1}, {string = {1}} }}
+
+\def\bbl at tibetanjust{%
+  % (3) Justification
   \directlua{
     Babel.tibetan = Babel.tibetan or {}
     %
@@ -39,12 +60,12 @@
     end
     %
     function Babel.tibetan.justify_hbox(head, gc, size, pack)
-      local has_inf = false
+      local has_infte = false
       if Babel.tibetan.justify_enabled and pack == 'exactly' then
         for n in node.traverse_id(12, head) do
-          if n.stretch_order > 0 then has_inf = true end
+          if n.stretch_order > 0 then has_infte = true end
         end
-        if not has_inf then
+        if not has_infte then
           Babel.tibetan.justify_hlist(head, nil, gc, size, pack)
         end
       end





More information about the latex3-commits mailing list.