[latex3-commits] [git/LaTeX3-latex3-babel] master: {xxxx} allowed in string=, too. Transforms for Croatian, Greek. (e56b082)

Javier email at dante.de
Sat Mar 27 13:35:32 CET 2021


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

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

commit e56b08283e4a834fa8c767906992d1b85d46ea8f
Author: Javier <email at localhost>
Date:   Sat Mar 27 13:35:32 2021 +0100

    {xxxx} allowed in string=, too. Transforms for Croatian, Greek.


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

e56b08283e4a834fa8c767906992d1b85d46ea8f
 README.md                      |  14 ++++++--
 babel.dtx                      |  77 ++++++++++++++++++++++++++++++++---------
 babel.ins                      |   2 +-
 babel.pdf                      | Bin 824234 -> 824519 bytes
 bbcompat.dtx                   |   2 +-
 locale/ar/babel-ar.ini         |  10 +++---
 locale/el/babel-el-polyton.ini |   5 ++-
 locale/el/babel-el.ini         |   5 +++
 locale/grc/babel-grc.ini       |   5 +++
 locale/hr/babel-hr.ini         |  14 ++++++++
 10 files changed, 106 insertions(+), 28 deletions(-)

diff --git a/README.md b/README.md
index 723cf41..4d190c2 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.56
+## Babel 3.56.2324
 
 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.56 are described in:
+Changes in version 3.57 are described in:
 
-https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.56.md
+https://github.com/latex3/babel/blob/master/news-guides/news/whats-new-in-babel-3.57.md
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -46,6 +46,14 @@ respective authors.
 
 ### Summary of Latest changes
 ```
+3.57   2021-04-15??
+       * Transforms:
+         - Arabic:    transliteration.dad
+         - Croatian:  digraphs.ligatures
+         - Greek:     diaeresis.hyphen
+         - Hungarian: digraphs.hyphen
+         - Spanish:   percent.space
+         
 3.56   2021-03-24
        * Transforms (\babelprehyphenation, \babelposthyphenation)
          - Key 'space', in em units.
diff --git a/babel.dtx b/babel.dtx
index 9c8ff77..ff5b2d1 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/03/24 v3.56 The Babel package]
+\ProvidesFile{babel.dtx}[2021/03/27 v3.56.2324 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -3099,6 +3099,40 @@ This feature is activated with the first |\babelposthyphenation| or
 \end{verbatim}
 \end{example}
 
+\begingroup
+\def\trans#1#2#3{%
+  \vspace{1mm}%
+  \parbox[t]{2.5cm}{\strut#1}%
+  \parbox[t]{4cm}{\strut\ttfamily#2}%
+  \parbox[t]{6cm}{\strut#3}\par}
+\bigskip\hrule\nobreak\medskip
+\strut Transforms 
+\medskip\hrule\nobreak
+
+\trans{Arabic}{transliteration.dad}{Applies the transliteration system
+devised by Yannis Haralambous for \textsf{dad}. Not yet complete, but
+sufficient for many texts.}
+
+\trans{Croatian}{digraphs.ligatures}{Ligatures \textit{DŽ}, \textit{Dž},
+\textit{dž}, \textit{LJ}, \textit{Lj}, \textit{lj}, \textit{NJ},
+\textit{Nj}, \textit{nj}. It assumes they exist. This is not the
+recommended way to make these transformations (the best way is with
+OTF features), but it can get you out of a hurry.}
+
+\trans{Greek}{diaeresis.hyphen}{Removes the diaeresis above iota and
+upsilon if hyphenated just before. It works with the
+three variants.}
+
+\trans{Hungarian}{digraphs.hyphen}{Hyphenates the the groups
+\textit{ccs}, \textit{ddz}, \textit{ggy}, \textit{lly}, \textit{nny},
+\textit{ssz}, \textit{tty} and \textit{zzs} as \textit{cs-cs},
+\textit{dz-dz}, etc.}
+
+\trans{Spanish}{percent.space}{Inserts a small space before \%}
+
+\vspace{1mm}\hrule\nobreak
+\endgroup
+
 \subsection{Selection based on BCP 47 tags}
 \label{bcp47}
 
@@ -4862,8 +4896,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.56>>
-%<<date=2021/03/24>>
+%<<version=3.56.2324>>
+%<<date=2021/03/27>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10962,6 +10996,8 @@ help from Bernd Raichle, for which I am grateful.
          \let\atcatcode\relax
        \fi}%
   \fi
+  % == Release saved transforms ==
+  \bbl at release@transforms\relax % \relax closes the last item.
   % == main ==
   \ifx\bbl at KVP@main\@nil  % Restore only if not 'main'
     \let\languagename\bbl at savelangname
@@ -11223,6 +11259,7 @@ help from Bernd Raichle, for which I am grateful.
     \let\bbl at savestrings\@empty
     \let\bbl at savetoday\@empty
     \let\bbl at savedate\@empty
+    \let\bbl at release@transforms\@empty
     \def\bbl at elt##1##2##3{%
       \def\bbl at section{##1}%
       \in@{=date.}{=##1}% Find a better place
@@ -11339,8 +11376,6 @@ help from Bernd Raichle, for which I am grateful.
   \ifbbl at bcptoname
     \bbl at csarg\xdef{bcp at map@\bbl at cl{tbcp}}{\languagename}%
   \fi
-  % Finish here transforms, too
-  \bbl at release@transforms\relax  % \relax closes the last item.
   % Conditional
   \ifnum#1>\z@         % 0 = only info, 1, 2 = basic, (re)new
     \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
@@ -11721,10 +11756,10 @@ help from Bernd Raichle, for which I am grateful.
       \ifin@
         \in@{.0$}{#2$}&%
         \ifin@
-            \bbl at add\bbl at release@transforms{&%
+           \g at addto@macro\bbl at release@transforms{&%
               \relax\bbl at transforms@aux#1{\languagename}{#3}}&%
-          \else
-            \bbl at add\bbl at release@transforms{, {#3}}&%
+        \else
+           \g at addto@macro\bbl at release@transforms{, {#3}}&%
         \fi
       \fi
     \fi}
@@ -13841,17 +13876,15 @@ end
         local locale = node.get_attribute(item, Babel.attr_locale)
 
         if lang == locale or lang == nil then
-          if (item.char ~= 124) then &% ie, not | = space
-            lang = lang or locale
-            word_string = word_string .. unicode.utf8.char(item.char)
-            word_nodes[#word_nodes+1] = item
-          end
+          lang = lang or locale
+          word_string = word_string .. unicode.utf8.char(item.char)
+          word_nodes[#word_nodes+1] = item
         else
           break
         end
 
       elseif item.id == 12 and item.subtype == 13 then
-        word_string = word_string .. '|'
+        word_string = word_string .. ' '
         word_nodes[#word_nodes+1] = item
 
       &% Ignore leading unrecognized nodes, too.
@@ -13865,7 +13898,7 @@ end
 
     &% Here and above we remove some trailing chars but not the
     &% corresponding nodes. But they aren't accessed. 
-    if word_string:sub(-1) == '|' then
+    if word_string:sub(-1) == ' ' then
       word_string = word_string:sub(1,-2)
     end
     word_string = unicode.utf8.gsub(word_string, Babel.us_char .. '+$', '')
@@ -14141,7 +14174,7 @@ end
                               crep.space[2] * quad,
                               crep.space[3] * quad)
               if mode == 0 then
-                placeholder = '|'
+                placeholder = ' '
               end
               head, new = node.insert_before(head, item, d)
 
@@ -14153,7 +14186,7 @@ end
                 crep.spacefactor[2] * base_font.parameters['space_stretch'],
                 crep.spacefactor[3] * base_font.parameters['space_shrink'])
               if mode == 0 then
-                placeholder = '|'
+                placeholder = ' '
               end
               head, new = node.insert_before(head, item, d)
 
@@ -14215,6 +14248,15 @@ end
 
   &% Handle the {n|abc|ABC} syntax in captures
   function Babel.capture_func_map(capno, from, to)
+    local u = unicode.utf8
+    from = u.gsub(from, '{(%x%x%x%x+)}', 
+         function (n)
+           return u.char(tonumber(n, 16))
+         end)
+    to = u.gsub(to, '{(%x%x%x%x+)}', 
+         function (n)
+           return u.char(tonumber(n, 16))
+         end)
     local froms = {}
     for s in string.utfcharacters(from) do
       table.insert(froms, s)
@@ -14319,6 +14361,7 @@ end
       local id = \the\csname bbl at id@@#1\endcsname
       &% Convert pattern:
       local patt = string.gsub([==[#2]==], '%s', '')
+      local patt = string.gsub(patt, '|', ' ')
       if not u.find(patt, '()', nil, true) then
         patt = '()' .. patt .. '()'
       end     
diff --git a/babel.ins b/babel.ins
index bb67524..4710132 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/03/24}
+\def\filedate{2021/03/27}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 588c656..91e174a 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index efd3eb7..925235d 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/03/24 v3.56]
+\ProvidesFile{bbcompat.dtx}[2021/03/27 v3.56.2324]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/locale/ar/babel-ar.ini b/locale/ar/babel-ar.ini
index 7dfd9b7..899ddf8 100644
--- a/locale/ar/babel-ar.ini
+++ b/locale/ar/babel-ar.ini
@@ -177,10 +177,10 @@ abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن س ع ف ص ق ر ش ت ث
 maghrebi.abjad = ا ب ج د ه‍ و ز ح ط ي ك ل م ن ص ع ف ض ق ر س ت ث خ ذ ظ غ ش
 
 [transforms.prehyphenation]
-; Yannis Haralambous' system in his 'dad'. Unfinished and with
-; a little change for technical reasons (| -> "), to be fixed.
+; Yannis Haralambous' system in his 'dad'. Unfinished, but the
+; basic rules are here.
 transliteration.dad.1.0 = { ([aui])N }
-transliteration.dad.1.1 = { string = {1|aNuNiN|ًٌٍ} }
+transliteration.dad.1.1 = { string = {1|aui|ًٌٍ} }
 transliteration.dad.1.2 = { remove }
 transliteration.dad.2.0 = { ([tAa]){*} }
 transliteration.dad.2.1 = { string = {1|tAa|ةٱٰ} }
@@ -191,7 +191,7 @@ transliteration.dad.3.2 = { remove }
 transliteration.dad.4.0 = { '([AauiI]) }
 transliteration.dad.4.1 = { remove }
 transliteration.dad.4.2 = { string = {1|AauiI|آأؤإئ} }
-transliteration.dad.5.0 = { (["AbtjHxdrzsSDTZ`RfqklmnhUIYaiu+opCvg]) }
-transliteration.dad.5.1 = { string = {1|"AbtjHxdrzsSDTZ`RfqklmnhUIYaiu+opCvg|ءابتجحخدرزسصضطظعغفقكلمنهوىيَُِّْپچڤگ} }
+transliteration.dad.5.0 = { ([{007C}AbtjHxdrzsSDTZ`RfqklmnhUIYaiu+opCvg]) }
+transliteration.dad.5.1 = { string = {1|{007C}AbtjHxdrzsSDTZ`RfqklmnhUIYaiu+opCvg|ءابتجحخدرزسصضطظعغفقكلمنهوىيَُِّْپچڤگ} }
 
 
diff --git a/locale/el/babel-el-polyton.ini b/locale/el/babel-el-polyton.ini
index 9d97ac5..8d2ddc7 100644
--- a/locale/el/babel-el-polyton.ini
+++ b/locale/el/babel-el-polyton.ini
@@ -204,4 +204,7 @@ upper.ancient.3 = Ρ Σ Τ Υ Φ Χ Ψ Ω Ϡ
 upper.ancient.4 = ͵Α ͵Β ͵Γ ͵Δ ͵Ε ͵Ϛ ͵Ζ ͵Η ͵Θ
 upper.ancient.S.321 = ʹ
 
-
+[transforms.posthyphenation]
+diaeresis.hyphen.1.0 = { |([ϊΐῒῗϋΰῢῧ]) }
+diaeresis.hyphen.1.1 = { remove }
+diaeresis.hyphen.1.2 = { no = {1}, pre = -, post = {1|ϊΐῒῗϋΰῢῧ|ιίὶῖυύὺῦ} }
diff --git a/locale/el/babel-el.ini b/locale/el/babel-el.ini
index 30d1e44..62d4fe5 100644
--- a/locale/el/babel-el.ini
+++ b/locale/el/babel-el.ini
@@ -210,3 +210,8 @@ upper.ancient.3 = Ρ Σ Τ Υ Φ Χ Ψ Ω Ϡ
 upper.ancient.4 = ͵Α ͵Β ͵Γ ͵Δ ͵Ε ͵Ϛ ͵Ζ ͵Η ͵Θ
 upper.ancient.S.321 = ʹ
 
+[transforms.posthyphenation]
+diaeresis.hyphen.1.0 = { |([ϊΐϋΰ]) }
+diaeresis.hyphen.1.1 = { remove }
+diaeresis.hyphen.1.2 = { no = {1}, pre = -, post = {1|ϊΐϋΰ|ιίυύ} }
+
diff --git a/locale/grc/babel-grc.ini b/locale/grc/babel-grc.ini
index 03a525d..6014c35 100644
--- a/locale/grc/babel-grc.ini
+++ b/locale/grc/babel-grc.ini
@@ -186,3 +186,8 @@ upper.ancient.2 = Ι Κ Λ Μ Ν Ξ Ο Π Ϟ
 upper.ancient.3 = Ρ Σ Τ Υ Φ Χ Ψ Ω Ϡ
 upper.ancient.4 = ͵Α ͵Β ͵Γ ͵Δ ͵Ε ͵Ϛ ͵Ζ ͵Η ͵Θ
 upper.ancient.S.321 = ʹ
+
+[transforms.posthyphenation]
+diaeresis.hyphen.1.0 = { |([ϊΐῒῗϋΰῢῧ]) }
+diaeresis.hyphen.1.1 = { remove }
+diaeresis.hyphen.1.2 = { no = {1}, pre = -, post = {1|ϊΐῒῗϋΰῢῧ|ιίὶῖυύὺῦ} }
\ No newline at end of file
diff --git a/locale/hr/babel-hr.ini b/locale/hr/babel-hr.ini
index 7692bbb..e514e59 100644
--- a/locale/hr/babel-hr.ini
+++ b/locale/hr/babel-hr.ini
@@ -183,3 +183,17 @@ plusSign = +
 superscriptingExponent = ×
 
 [counters]
+
+[transforms.prehyphenation]
+digraphs.ligatures.1.0 = { D([Žž]) }
+digraphs.ligatures.1.1 = { remove }
+digraphs.ligatures.1.2 = { string = {1|Žž|DŽDž} }
+digraphs.ligatures.2.0 = { dž }
+digraphs.ligatures.2.1 = { string = dž }
+digraphs.ligatures.2.2 = { remove }
+digraphs.ligatures.3.0 = { ([LN])J }
+digraphs.ligatures.3.1 = { string = {1|LN|LJNJ} }
+digraphs.ligatures.3.2 = { remove }
+digraphs.ligatures.4.0 = { ([LlNn])j }
+digraphs.ligatures.4.1 = { string = {1|LlNn|LjljNjnj} }
+digraphs.ligatures.4.2 = { remove }
\ No newline at end of file





More information about the latex3-commits mailing list.