[latex3-commits] [git/LaTeX3-latex3-babel] master: Bump to 3.58. Experimental Arabic justification. (7e358ee)

Javier email at dante.de
Mon Apr 26 17:54:30 CEST 2021


Repository : https://github.com/latex3/babel
On branch  : master
Link       : https://github.com/latex3/babel/commit/7e358eebd9ddcf6a68e2daae1f76e4f2772ad319

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

commit 7e358eebd9ddcf6a68e2daae1f76e4f2772ad319
Author: Javier <email at localhost>
Date:   Mon Apr 26 17:54:30 2021 +0200

    Bump to 3.58. Experimental Arabic justification.


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

7e358eebd9ddcf6a68e2daae1f76e4f2772ad319
 README.md                                   |  24 ++++----
 babel.dtx                                   |  45 +++++++++------
 babel.ins                                   |   2 +-
 babel.pdf                                   | Bin 831891 -> 832617 bytes
 bbcompat.dtx                                |   2 +-
 locale/am/babel-am.ini                      |  10 ++--
 locale/ar/babel-ar.ini                      |   6 +-
 locale/ar/babel-arabic.tex                  |  84 ++++++++++++++++++++++++++++
 locale/cs/babel-cs.ini                      |   4 +-
 locale/es/babel-es.ini                      |   4 +-
 locale/hi/babel-hi.ini                      |   4 +-
 locale/ml/babel-ml.ini                      |   4 +-
 locale/nb/babel-nb.ini                      |   4 +-
 locale/pl/babel-pl.ini                      |   4 +-
 locale/pt/babel-pt-BR.ini                   |   4 +-
 locale/pt/babel-pt-PT.ini                   |   4 +-
 locale/pt/babel-pt.ini                      |   4 +-
 locale/sa/babel-sa-Deva.ini                 |  54 +++++++++++++++++-
 locale/sa/babel-sa.ini                      |  54 +++++++++++++++++-
 locale/sk/babel-sk.ini                      |   4 +-
 locale/sr/babel-sr-Cyrl-BA.ini              |   4 +-
 locale/sr/babel-sr-Cyrl-ME.ini              |   4 +-
 locale/sr/babel-sr-Cyrl-XK.ini              |   4 +-
 locale/sr/babel-sr-Cyrl.ini                 |   4 +-
 locale/sr/babel-sr.ini                      |   4 +-
 locale/ug/babel-uyghur.tex                  |   4 ++
 news-guides/README.md                       |   1 +
 news-guides/media/arabic-justification.png  | Bin 0 -> 90469 bytes
 news-guides/news/whats-new-in-babel-3.58.md |  83 +++++++++++++++++++--------
 29 files changed, 337 insertions(+), 92 deletions(-)

diff --git a/README.md b/README.md
index 63d8ace..8a954ea 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.57.2352
+## Babel 3.58
 
 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.57 are described in:
+Changes in version 3.58 are described in:
 
-https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.57.md
+https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.58.md
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -46,15 +46,19 @@ respective authors.
 
 ### Summary of Latest changes
 ```
-3.58   2021-04-28??
+3.58   2021-04-26
        * More predefined transforms (lua):
          - doubleletter.hyphen: Norsk
-         - oneletter.nobreak: Czech, Polish, Slovak
-         - hyphen.repeat:     Czech, Polish, Portuguese, Slovak, Spanish
-       * 'prehyphenation' transforms are disabled in verbatim.
-       * New linebreaking mode ‘unhyphenated’.
-       * Fixes:
-         - \shorthandoff*{^} was not revertible (#126).
+         - oneletter.nobreak:  Czech, Polish, Slovak
+         - hyphen.repeat:      Czech, Polish, Portuguese, Slovak, Spanish
+         - punctuation.space:  Hindi, Sanskrit
+         - transliteration.hk: Sanskrit 
+         - transliteration.gajica: Serbian
+       * 'prehyphenation' transforms are now disabled in verbatim.
+       * New line breaking mode ‘unhyphenated’.
+       * Fix: \shorthandoff*{^} was not revertible (#126).
+       * Experimental code for Arabic justification (with elongated
+         forms: lua).
          
 3.57   2021-04-07
        * Predefined transforms (lua):
diff --git a/babel.dtx b/babel.dtx
index a9d7106..745cf11 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/04/24 v3.57.2352 The Babel package]
+\ProvidesFile{babel.dtx}[2021/04/26 v3.58 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -1417,7 +1417,7 @@ need to set explicitly the script to either |deva| or |dev2|, eg:
 \begingroup
 \setmonofont[Script=Lao,Scale=MatchLowercase]{DejaVu Sans Mono}
 \begin{verbatim}
-\babelprovide[import,hyphenrules=+]{lao}
+\babelprovide[import, hyphenrules=+]{lao}
 \babelpatterns[lao]{1ດ 1ມ 1ອ 1ງ 1ກ 1າ} % Random
 \end{verbatim}
 \endgroup
@@ -2499,6 +2499,9 @@ for example:
 In other engines it just suppresses hyphenation (because the pattern
 list is empty).
 
+\New{3.58} Another special value is |unhyphenated|, which activates a
+line breking mode that allows spaces to be stretched to arbitrary amounts.
+
 \Describe{main}{} This valueless option makes the language the main one
 (thus overriding that set when \babel\ is loaded). Only in newly defined
 languages.
@@ -3074,8 +3077,11 @@ a non-syllabic preposition or conjunction into a non-breaking space.}
 upsilon if hyphenated just before. It works with the
 three variants.}
 
-\trans{Hindi}{transliteration.hk}{The Harvard-Kyoto system to romanize
-Devanagari.}
+\trans{Hindi, Sanskrit}{transliteration.hk}{The Harvard-Kyoto system to
+romanize Devanagari.}
+
+\trans{}{punctuation.space}{Inserts a space before the following
+four characters: \textit{!?:;}\,.}
 
 \trans{Hungarian}{digraphs.hyphen}{Hyphenates the long digraphs
 \textit{ccs}, \textit{ddz}, \textit{ggy}, \textit{lly}, \textit{nny},
@@ -3177,11 +3183,11 @@ This feature is activated with the first |\babelposthyphenation| or
 \begin{note}
   With \luatex{} there is another approach to make text
   transformations, with the function |fonts.handlers.otf.addfeature|,
-  which adds new features to an OTF font. These features can be made
-  language-dependent, and \babel{} by default recognizes this setting
-  if the font has been declared with |\babelfont|. The
-  \textit{transforms} mechanism supplements rather than replaces OTF
-  features.
+  which adds new features to an OTF font (substitution and
+  positioning). These features can be made language-dependent, and
+  \babel{} by default recognizes this setting if the font has been
+  declared with |\babelfont|. The \textit{transforms} mechanism
+  supplements rather than replaces OTF features.
   
   With \xetex{}, where \textit{transforms} are not available, there is
   still another approach, with font mappings, mainly meant to perform
@@ -4952,8 +4958,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.57.2352>>
-%<<date=2021/04/24>>
+%<<version=3.58>>
+%<<date=2021/04/26>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -7146,7 +7152,9 @@ help from Bernd Raichle, for which I am grateful.
     \count@#1\relax
     \def\bbl at elt##1##2##3##4{%
       \ifnum\count@=##2\relax
-        \bbl at info{\string#1 = using hyphenrules for ##1\\%
+        \edef\bbl at tempa{\expandafter\@gobbletwo\string#1}%
+        \bbl at info{Hyphen rules for '\expandafter\@gobble\bbl at tempa'
+                  set to \expandafter\string\csname l@##1\endcsname\\%
                   (\string\language\the\count@). Reported}%
         \def\bbl at elt####1####2####3####4{}%
       \fi}%
@@ -7640,10 +7648,15 @@ help from Bernd Raichle, for which I am grateful.
   \fi
   \let\bbl at hymapsel\@cclv
   % hyphenation - select rules
-  \bbl at xin@{/u}{/\bbl at cl{lnbrk}}%
+  \ifnum\csname l@\languagename\endcsname=\l at unhyphenated
+    \edef\bbl at tempa{u}%
+  \else
+    \edef\bbl at tempa{\bbl at cl{lnbrk}}%
+  \fi
+  \bbl at xin@{/u}{/\bbl at tempa}%
   \ifin@
     % 'unhyphenated' = allow stretching
-    \language\l at babelnohyphens
+    \language\l at unhyphenated
     \babel at savevariable\emergencystretch
     \emergencystretch\maxdimen
     \babel at savevariable\hbadness
@@ -10690,8 +10703,8 @@ help from Bernd Raichle, for which I am grateful.
   \chardef\l at english\z@
 \fi
 % The following is used to cancel rules in ini files (see Amharic).
-\ifx\l at babelnohyhens\@undefined
-  \newlanguage\l at babelnohyphens
+\ifx\l at unhyphenated\@undefined
+  \newlanguage\l at unhyphenated
 \fi
 %    \end{macrocode}
 %
diff --git a/babel.ins b/babel.ins
index dd8de65..3a07387 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{2021/04/24}
+\def\filedate{2021/04/26}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 66879b4..4eca976 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 6b254f8..a69fa73 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/04/24 v3.57.2352]
+\ProvidesFile{bbcompat.dtx}[2021/04/26 v3.58]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/locale/am/babel-am.ini b/locale/am/babel-am.ini
index 25dc87a..c2a12ae 100644
--- a/locale/am/babel-am.ini
+++ b/locale/am/babel-am.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2020-10-11
+version = 1.5
+date = 2021-04-24
 name.local = አማርኛ
 name.english = Amharic
 name.babel = amharic
@@ -149,7 +149,8 @@ time.short = [h]:[mm] [a]
 
 [typography]
 frenchspacing = yes
-hyphenrules = amharic
+; Modern practice. Use 'amharic' for the traditional one:
+hyphenrules = unhyphenated
 lefthyphenmin = 1
 righthyphenmin = 1
 hyphenchar = 
@@ -159,8 +160,7 @@ exhyphenchar =
 preexhyphenchar = 
 postexhyphenchar = 
 hyphenationmin = 
-; Modern practice. Use s(ea) for the tradicional one.
-linebreaking = u
+linebreaking = s
 intraspace = 0 .1 0
 ; The syntax is liable to change in 'other' values
 hyphenate.other.script = "1361 "1362 "1363 "1364 "1365 "1366 "1367 "1368
diff --git a/locale/ar/babel-ar.ini b/locale/ar/babel-ar.ini
index 6ebd0bf..ca0c4ff 100644
--- a/locale/ar/babel-ar.ini
+++ b/locale/ar/babel-ar.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.8
-date = 2021-04-05
+version = 1.9
+date = 2021-04-24
 name.local = العربية
 name.english = Arabic
 name.babel = arabic
@@ -26,6 +26,7 @@ script.tag.opentype = arab
 level = 1
 encodings = 
 derivate = no
+require.babel = arabic
 
 [captions]
 preface = مدخل
@@ -148,7 +149,6 @@ exhyphenchar =
 preexhyphenchar = 
 postexhyphenchar = 
 hyphenationmin = 
-linebreaking = u
 
 [characters]
 delimiters.quotes = ”“’‘
diff --git a/locale/ar/babel-arabic.tex b/locale/ar/babel-arabic.tex
index 52b4fc9..fbad883 100644
--- a/locale/ar/babel-arabic.tex
+++ b/locale/ar/babel-arabic.tex
@@ -9,4 +9,88 @@
 \fi
 \BabelBeforeIni{ar}{%
 }
+
+\ifcase\bbl at engine\or
+
+\directlua{
+
+Babel.ar_tolong = {}
+
+function Babel.ar_justify(head)
+  local substlist = Babel.ar_tolong
+  local GLYPH = node.id'glyph'
+  local substs, width, goal
+  local subst_done = true % false
+  math.randomseed(1)
+  for line in node.traverse_id(node.id'hlist', head) do
+    if (line.glue_sign == 1 and line.glue_order == 0) then % exclude last line!
+      substs = {} % we store all “expandable” letters of each line
+      for n in node.traverse_id(GLYPH, line.head) do
+        if (substlist[n.char]) then
+          table.insert(substs, n)
+        end
+      end
+      line.glue_set = 0   % deactivate normal glue expansion
+      width = node.dimensions(line.head)    % check the new width
+      goal = line.width
+      
+      while (width < goal and \string#substs > 0) do
+        x = math.random(\string#substs)     % choose randomly a glyph
+        oldchar = substs[x].char
+        substs[x].char = substlist[substs[x].char]
+        subst_done = true
+        width = node.dimensions(line.head)  % check if the line is too wide
+        % substitute back if the line would be too wide and break:
+        if width > goal then substs[x].char = oldchar break end 
+        % if further substitutions have to be done, remove the just
+        % substituted node from the list:
+        table.remove(substs,x)
+      end
+      % Must take into account marks and ins, see luatex manual.
+      % Have to be executed only if there are changes.
+      if subst_done then
+        line.head = node.hpack(line.head, goal, 'exactly')
+      end
+    end
+  end
+  return head
+end
+
+}
+
+\gdef\ArabicSetupJust{%
+  \directlua{
+    Babel.ar_tolong   = {}
+    luatexbase.add_to_callback('post_linebreak_filter',
+      Babel.ar_justify, 'Babel.ar_justify')
+  }% 
+  % It must be done for each font, and stored separately.
+  % Locale must be taken into account too. Brute force.
+  % No rules at all, yet. The ideal: look at jalt table.
+  % And perhaps other tables (falt?, cswh?). What about kaf?
+  \begingroup
+    \bbl at foreach{%   
+        0628,0629,062A,062B,062C,062D,062E,062F,0630,0631,0632,0633,%
+        0634,0635,0636,0637,0638,0639,063A,063B,063C,063D,063E,063F,%
+        0640,0641,0642,0643,0644,0645,0646,0647,0649}{%
+      \setbox\z@\hbox{%  Only final, for the moment
+        ^^^^200d\char"##1=%
+        \addfontfeature{RawFeature=+jalt}%
+        ^^^^200d\char"##1}%
+      \directlua{
+        local chars = {}
+        for item in node.traverse(tex.box[0].head) do
+          if item.id == node.id'glyph' and item.char > 128 and
+              not (item.char == 0x200D) then
+            table.insert(chars, item.char)
+          end
+        end
+        if not (chars[1] == chars[2]) then
+          Babel.ar_tolong[chars[1]] = chars[2]
+        end
+      }}%
+  \endgroup}
+  
+\fi
+
 \endinput
\ No newline at end of file
diff --git a/locale/cs/babel-cs.ini b/locale/cs/babel-cs.ini
index 33df206..aa94882 100644
--- a/locale/cs/babel-cs.ini
+++ b/locale/cs/babel-cs.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-04-24
 name.local = čeština
 name.english = Czech
 name.babel = czech
diff --git a/locale/es/babel-es.ini b/locale/es/babel-es.ini
index 0f6aab5..a15ab44 100644
--- a/locale/es/babel-es.ini
+++ b/locale/es/babel-es.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-04-24
 name.local = español
 name.english = Spanish
 name.babel = spanish
diff --git a/locale/hi/babel-hi.ini b/locale/hi/babel-hi.ini
index 640e3d5..bc5e67e 100644
--- a/locale/hi/babel-hi.ini
+++ b/locale/hi/babel-hi.ini
@@ -12,8 +12,8 @@
 
 [identification]
 charset = utf8
-version = 1.9
-date = 2021-04-05
+version = 1.10
+date = 2021-04-24
 name.local = हिन्दी
 name.english = Hindi
 name.babel = hindi
diff --git a/locale/ml/babel-ml.ini b/locale/ml/babel-ml.ini
index 3cffb6c..a18096a 100644
--- a/locale/ml/babel-ml.ini
+++ b/locale/ml/babel-ml.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.6
-date = 2020-06-30
+version = 1.7
+date = 2021-04-24
 name.local = മലയാളം
 name.english = Malayalam
 name.babel = malayalam
diff --git a/locale/nb/babel-nb.ini b/locale/nb/babel-nb.ini
index dbd7601..9e2f41b 100644
--- a/locale/nb/babel-nb.ini
+++ b/locale/nb/babel-nb.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-10-11
+version = 1.4
+date = 2021-04-24
 name.local = norsk bokmål
 name.english = Norwegian Bokmål
 name.babel = norsk norwegianbokmal
diff --git a/locale/pl/babel-pl.ini b/locale/pl/babel-pl.ini
index 67608f2..c36cba8 100644
--- a/locale/pl/babel-pl.ini
+++ b/locale/pl/babel-pl.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-04-24
 name.local = polski
 name.english = Polish
 name.babel = polish
diff --git a/locale/pt/babel-pt-BR.ini b/locale/pt/babel-pt-BR.ini
index eaf7e6c..5db4a1e 100644
--- a/locale/pt/babel-pt-BR.ini
+++ b/locale/pt/babel-pt-BR.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2020-06-30
+version = 1.5
+date = 2021-04-24
 name.local = português
 name.english = Portuguese
 name.babel = brazilian portuguese-brazil portuguese-br
diff --git a/locale/pt/babel-pt-PT.ini b/locale/pt/babel-pt-PT.ini
index 848d0a4..e771e83 100644
--- a/locale/pt/babel-pt-PT.ini
+++ b/locale/pt/babel-pt-PT.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2020-06-30
+version = 1.5
+date = 2021-04-24
 name.local = português
 name.english = Portuguese
 name.babel = portuguese portuguese-portugal portuguese-pt
diff --git a/locale/pt/babel-pt.ini b/locale/pt/babel-pt.ini
index c04cb67..a1be285 100644
--- a/locale/pt/babel-pt.ini
+++ b/locale/pt/babel-pt.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.4
-date = 2020-06-30
+version = 1.5
+date = 2021-04-24
 name.local = português
 name.english = Portuguese
 name.babel = portuguese
diff --git a/locale/sa/babel-sa-Deva.ini b/locale/sa/babel-sa-Deva.ini
index 71579d1..6305b96 100644
--- a/locale/sa/babel-sa-Deva.ini
+++ b/locale/sa/babel-sa-Deva.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 0.10
-date = 2020-06-30
+version = 0.11
+date = 2021-04-24
 name.local = संस्कृत
 name.english = Sanskrit
 name.babel = sanskrit
@@ -110,3 +110,53 @@ plusSign = +
 superscriptingExponent = ×
 
 [counters]
+
+[transforms.prehyphenation]
+punctuation.space.1.0 = { {a}()|[:;!{?}]() }
+punctuation.space.1.1 = { insert, penalty = 10000 }
+punctuation.space.1.2 = { spacefactor= .8 .3 .8, data = 2 }
+punctuation.space.1.3 = {}
+punctuation.space.2.0 = { {a}()[:;!{?}]() }
+punctuation.space.2.1 = { insert, penalty = 10000 }
+punctuation.space.2.2 = { insert, spacefactor= .8 .3 .8, data = 1 }
+punctuation.space.2.3 = {}
+; == Harvard-Kyoto ==
+; Multiletter
+transliteration.hk.1.0  = { lRR } 
+transliteration.hk.1.1  =   { string = ॡ }
+transliteration.hk.1.2  =   { remove }
+transliteration.hk.1.3  =   { remove }
+transliteration.hk.2.0  = { OM } 
+transliteration.hk.2.1  =   { string = ॐ }
+transliteration.hk.2.2  =   { remove }
+transliteration.hk.3.0  = { {007C}{007C} } 
+transliteration.hk.3.1  =   { string = ॥ }
+transliteration.hk.3.2  =   { remove }
+transliteration.hk.4.0  = { ([lR])R }
+transliteration.hk.4.1  =   { string = {1|lR|ऌॠ} }
+transliteration.hk.4.2  =   { remove }
+transliteration.hk.5.0  = { a([iu]) }
+transliteration.hk.5.1  =   { remove }
+transliteration.hk.5.2  =   { string = {1|iu|ऐऔ} }
+; Xh
+transliteration.hk.6.0  = { ([kgcjTDtdpb])h }
+transliteration.hk.6.1  =   { string = {1|kgcjTDtdpb|खघछझठढथधफभ} }
+transliteration.hk.6.2  =   { remove }
+; Single letter
+transliteration.hk.7.0  = { ([MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}']) }
+transliteration.hk.7.1  =   { string = {1|MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}'|ंःअआइईउऊऋएओकगङचजञटडणतदनपबमयरलवशषसहळ।ऽ} }
+; Post-process vowels
+transliteration.hk.8.0  = { [{0915}-{0939}]([आइईउऊऋॠऌॡएऐओऔऎऒ]) }
+transliteration.hk.8.1  =   {}
+transliteration.hk.8.2  =   { string = {1|आइईउऊऋॠऌॡएऐओऔऎऒ|ािीुूृॄॢॣेैोौॆॊ} }
+transliteration.hk.9.0  = { [{0915}-{0939}]([{0915}-{0939}]) }
+transliteration.hk.9.1  =   {}
+transliteration.hk.9.2  =   { string = ^^^^094d{1} }
+; Duplicated (a trick)
+transliteration.hk.10.0 = { [{0915}-{0939}]([{0915}-{0939}]) }
+transliteration.hk.10.1 =   {}
+transliteration.hk.10.2 =   { string = ^^^^094d{1} }
+; Inherent a
+transliteration.hk.11.0 = { [{0915}-{0939}]{0905} }
+transliteration.hk.11.1 =   {}
+transliteration.hk.11.2 =   { remove }
\ No newline at end of file
diff --git a/locale/sa/babel-sa.ini b/locale/sa/babel-sa.ini
index 3ff8d4d..681cb49 100644
--- a/locale/sa/babel-sa.ini
+++ b/locale/sa/babel-sa.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 0.10
-date = 2020-06-30
+version = 0.11
+date = 2021-04-2430
 name.english = Sanskrit
 name.babel = sanskrit
 name.polyglossia = sanskrit
@@ -95,3 +95,53 @@ hyphenate.other.script = "0CF1 "0CF2
 delimiters.quotes.0 = 
 
 [counters]
+
+[transforms.prehyphenation]
+punctuation.space.1.0 = { {a}()|[:;!{?}]() }
+punctuation.space.1.1 = { insert, penalty = 10000 }
+punctuation.space.1.2 = { spacefactor= .8 .3 .8, data = 2 }
+punctuation.space.1.3 = {}
+punctuation.space.2.0 = { {a}()[:;!{?}]() }
+punctuation.space.2.1 = { insert, penalty = 10000 }
+punctuation.space.2.2 = { insert, spacefactor= .8 .3 .8, data = 1 }
+punctuation.space.2.3 = {}
+; == Harvard-Kyoto ==
+; Multiletter
+transliteration.hk.1.0  = { lRR } 
+transliteration.hk.1.1  =   { string = ॡ }
+transliteration.hk.1.2  =   { remove }
+transliteration.hk.1.3  =   { remove }
+transliteration.hk.2.0  = { OM } 
+transliteration.hk.2.1  =   { string = ॐ }
+transliteration.hk.2.2  =   { remove }
+transliteration.hk.3.0  = { {007C}{007C} } 
+transliteration.hk.3.1  =   { string = ॥ }
+transliteration.hk.3.2  =   { remove }
+transliteration.hk.4.0  = { ([lR])R }
+transliteration.hk.4.1  =   { string = {1|lR|ऌॠ} }
+transliteration.hk.4.2  =   { remove }
+transliteration.hk.5.0  = { a([iu]) }
+transliteration.hk.5.1  =   { remove }
+transliteration.hk.5.2  =   { string = {1|iu|ऐऔ} }
+; Xh
+transliteration.hk.6.0  = { ([kgcjTDtdpb])h }
+transliteration.hk.6.1  =   { string = {1|kgcjTDtdpb|खघछझठढथधफभ} }
+transliteration.hk.6.2  =   { remove }
+; Single letter
+transliteration.hk.7.0  = { ([MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}']) }
+transliteration.hk.7.1  =   { string = {1|MHaAiIuUReokgGcjJTDNtdnpbmyrlvzSshL{007C}'|ंःअआइईउऊऋएओकगङचजञटडणतदनपबमयरलवशषसहळ।ऽ} }
+; Post-process vowels
+transliteration.hk.8.0  = { [{0915}-{0939}]([आइईउऊऋॠऌॡएऐओऔऎऒ]) }
+transliteration.hk.8.1  =   {}
+transliteration.hk.8.2  =   { string = {1|आइईउऊऋॠऌॡएऐओऔऎऒ|ािीुूृॄॢॣेैोौॆॊ} }
+transliteration.hk.9.0  = { [{0915}-{0939}]([{0915}-{0939}]) }
+transliteration.hk.9.1  =   {}
+transliteration.hk.9.2  =   { string = ^^^^094d{1} }
+; Duplicated (a trick)
+transliteration.hk.10.0 = { [{0915}-{0939}]([{0915}-{0939}]) }
+transliteration.hk.10.1 =   {}
+transliteration.hk.10.2 =   { string = ^^^^094d{1} }
+; Inherent a
+transliteration.hk.11.0 = { [{0915}-{0939}]{0905} }
+transliteration.hk.11.1 =   {}
+transliteration.hk.11.2 =   { remove }
diff --git a/locale/sk/babel-sk.ini b/locale/sk/babel-sk.ini
index 5353a88..9f736f8 100644
--- a/locale/sk/babel-sk.ini
+++ b/locale/sk/babel-sk.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.2
-date = 2020-06-30
+version = 1.3
+date = 2021-04-24
 name.local = slovenčina
 name.english = Slovak
 name.babel = slovak
diff --git a/locale/sr/babel-sr-Cyrl-BA.ini b/locale/sr/babel-sr-Cyrl-BA.ini
index 400dcc6..c2d8e67 100644
--- a/locale/sr/babel-sr-Cyrl-BA.ini
+++ b/locale/sr/babel-sr-Cyrl-BA.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-04-24
 name.local = српски
 name.english = Serbian
 name.babel = serbian-cyrillic-bosniaherzegovina
diff --git a/locale/sr/babel-sr-Cyrl-ME.ini b/locale/sr/babel-sr-Cyrl-ME.ini
index b374003..320778c 100644
--- a/locale/sr/babel-sr-Cyrl-ME.ini
+++ b/locale/sr/babel-sr-Cyrl-ME.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-04-24
 name.local = српски
 name.english = Serbian
 name.babel = serbian-cyrillic-montenegro
diff --git a/locale/sr/babel-sr-Cyrl-XK.ini b/locale/sr/babel-sr-Cyrl-XK.ini
index e15d0d3..dfddfc4 100644
--- a/locale/sr/babel-sr-Cyrl-XK.ini
+++ b/locale/sr/babel-sr-Cyrl-XK.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-04-24
 name.local = српски
 name.english = Serbian
 name.babel = serbian-cyrillic-kosovo
diff --git a/locale/sr/babel-sr-Cyrl.ini b/locale/sr/babel-sr-Cyrl.ini
index 1ff068f..212f8a3 100644
--- a/locale/sr/babel-sr-Cyrl.ini
+++ b/locale/sr/babel-sr-Cyrl.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-04-24
 name.local = српски
 name.english = Serbian
 name.babel = serbian-cyrillic
diff --git a/locale/sr/babel-sr.ini b/locale/sr/babel-sr.ini
index 3adfc05..c0e4f1d 100644
--- a/locale/sr/babel-sr.ini
+++ b/locale/sr/babel-sr.ini
@@ -11,8 +11,8 @@
 
 [identification]
 charset = utf8
-version = 1.3
-date = 2020-06-30
+version = 1.4
+date = 2021-04-24
 name.local = српски
 name.english = Serbian
 name.babel = serbian
diff --git a/locale/ug/babel-uyghur.tex b/locale/ug/babel-uyghur.tex
index d3ee2ea..dd71435 100644
--- a/locale/ug/babel-uyghur.tex
+++ b/locale/ug/babel-uyghur.tex
@@ -10,6 +10,8 @@
 \BabelBeforeIni{ug}{%
 }
 
+\ifcase\bbl at engine\or
+
 \newattribute\bblug at disc
 \bblug at disc=-1
 
@@ -72,4 +74,6 @@ luatexbase.add_to_callback("hpack_filter",
   ug.hyphenate, "Babel.locale.uyghur.hyphenate")
 }
 
+\fi
+
 \endinput
\ No newline at end of file
diff --git a/news-guides/README.md b/news-guides/README.md
index cac0434..79e5d20 100644
--- a/news-guides/README.md
+++ b/news-guides/README.md
@@ -25,6 +25,7 @@ This is the home page for Babel, a multilingual environment for latex (and somet
 
 | Version | Most relevant changes
 | --- | --- |
+| [3.58](news/whats-new-in-babel-3.58.md) | More transforms for Sanskrit, Polish, Czech, Serbian, etc.
 | [3.57](news/whats-new-in-babel-3.57.md) | Predefined transforms for Arabic, Greek, Hungarian, etc.
 | [3.56](news/whats-new-in-babel-3.56.md) | Transforms (in `ini` files) |
 | [3.55](news/whats-new-in-babel-3.55.md) | Mainly internal changes. Captions in Uyghur. |
diff --git a/news-guides/media/arabic-justification.png b/news-guides/media/arabic-justification.png
new file mode 100644
index 0000000..6f92f22
Binary files /dev/null and b/news-guides/media/arabic-justification.png differ
diff --git a/news-guides/news/whats-new-in-babel-3.58.md b/news-guides/news/whats-new-in-babel-3.58.md
index e3677e5..d62a9d3 100644
--- a/news-guides/news/whats-new-in-babel-3.58.md
+++ b/news-guides/news/whats-new-in-babel-3.58.md
@@ -1,46 +1,85 @@
 # What's new in babel 3.58
 
-(Under development.)
+2021-04-26
+
+## Transforms added to `ini` files
+
+**Czech, Polish, Portuguese, Slovak, Spanish** ▸ `hyphen.repeat` ▸ Explicit hyphens behave like `\babelhyphen{repeat}`.
+
+**Czech, Polish, Slovak** ▸  `oneletter.nobreak` ▸ Converts a space after a non-syllabic preposition or conjunction into a non-breaking space.
+
+**Hindi, Sanskrit** ▸ `punctuation.space` ▸ Inserts a space before the following
+four characters: \textit{!?:;}\,. Added `transliteration.hk` for
+Sanskrit, too.
+
+**Norsk** ▸ `doubleletter.hyphen` ▸ Hyphenates the doble-letter groups `bb`, `dd`, `ff`, `gg`, `ll`, `mm`, `nn`, `pp`, `rr`, `ss`, `tt` as `bb-b`, `dd-d`, etc.
+
+**Serbian** ▸ `transliteration.gajica` ▸ (Note `serbian` with `ini` files refers to the Cyrillic script, which is here the target.) The standard system devised by Ljudevit Gaj. 
+
+## Verbatim and `\babelprehyphenation`
+
+⚠ Now `prehyphenation` transforms are deactivated if the current
+hyphenation patterns are `nohyphenation`, so that they aren't applied
+in verbatim mode.
+
+This behavior can be switched with:
+```
+\babeladjust{ prehyphenation.disable = nohyphenation }
+\babeladjust{ prehyphenation.disable = off }
+```
 
 ## New line breaking mode
 
-So far, `babel/lua` provided three linebreaking modes in the `ini`
+So far, `babel/lua` provided three line breaking modes in the `ini`
 settings, for ‘hyphenated’ (the default), ‘CJK’ and ‘Southeast Asian’. A
 new mode has been added for ‘unhyphenated’ languages, like Arabic or
 Malayalam. It adjusts the paragraphs parameters to allow large spaces
-between words. Although for European standards the result may look odd,
-in some scripts this has been the customary practice. It works with
-`xetex`, too.
+between words.
 
-So, currently there are two modes for scripts that separate words with
-spaces, and two modes for scripts with no word separator.
+Although for European standards the result may look odd, in some
+scripts this has been the customary (although not always the desired)
+practice. Because of that, no locale sets currently this mode by
+default (Amharic is an exception). It works with `xetex`, too.
 
-## Transforms added to `ini` files
+It can be activated in the following way:
+```tex
+\babelprovide[hyphenrules = unhyphenated]{<language>}
+```
+because the patterns so called set the line breaking mode to
+‘unhyphenated’ (it also works the other way – setting the mode in the
+`ini` file sets the hyphenrules).
 
-**Czech, Polish, Portuguese, Slovak, Spanish** `hyphen.repeat` Explicit hyphens behave like `\babelhyphen{repeat}`.
+So, currently there are two modes for scripts that separate words with
+spaces, and two modes for scripts with no word separator. Further modes
+could be added in the future, and there is work in progress for
+‘Justification alternates’ and tatwell in Arabic (see below).
 
-**Czech, Slovak** `oneletter.nobreak` Converts a space after a non-syllabic preposition into a non-breaking space.
+See also [here](whats-new-in-babel-3.57.md) for Uyghur hyphenation.
 
-**Hindi** `punctuation.space` With `;:?!`.
+## Arabic justification (experimental)
 
+There is some experimental code for Arabic justification, for
+demonstration purposes (not really usable in real documents). The basic
+code is based on the wonderful package `chickenize`, by Arno L.
+Trautmann. Just the main font, no rules, brute force, direct 1-to-1
+glyph replacements. All this will be sorted out later, as well as
+support for kashida. Feel free to contribute and make suggestions.
 
-**Norsk** `doubleletter.hyphen` Hyphenates the doble-letter groups `bb`, `dd`, `ff`, `gg`, `ll`, `mm`, `nn`, `pp`, `rr`, `ss`, `tt` as `bb-b`, `dd-d`, etc.
+![Arabic-justify](../media/arabic-justification.png)
 
-**Serbian** `transliteration.gajica` (Note `serbian` with `ini` files refers to the Cyrillic script, which is here the target.) The standard system devised by Ljudevit Gaj. 
+The preamble used in the previous example is:
+```tex
+\documentclass{article}
 
-## Verbatim and `\babelprehyphenation`
+\usepackage[arabic, provide=*, bidi=basic]{babel}
 
-⚠ Now `prehyphenation` transforms are deactivated if the current
-hyphenation patterns are `nohyphenation`, so that they aren't applied in verbatim mode.
+% A Windows font with jalt table. Also Arabic Typesetting.
+\babelfont{rm}{Sakkal Majalla}% Windows font with jalt table.
 
-This behavior can be switched with:
-```
-\babeladjust{ prehyphenation.disable = nohyphenation }
-\babeladjust{ prehyphenation.disable = off }
+\ArabicSetupJust
 ```
+The last macro is temporary. It will be removed.
 
 ## Fixes
 
 ## Other changes
-
-





More information about the latex3-commits mailing list.