[latex3-commits] [git/LaTeX3-latex3-babel] master: Bump to 3.56. Transforms. (c3c3557)

Javier email at dante.de
Wed Mar 24 17:23:34 CET 2021


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

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

commit c3c3557ed7e79095f007e0ad9a9671afd209d166
Author: Javier <email at localhost>
Date:   Wed Mar 24 17:23:34 2021 +0100

    Bump to 3.56. Transforms.


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

c3c3557ed7e79095f007e0ad9a9671afd209d166
 README.md                                   |  22 +++++++-----------
 babel.dtx                                   |  28 +++++++++++++++--------
 babel.ins                                   |   2 +-
 babel.pdf                                   | Bin 823323 -> 824234 bytes
 bbcompat.dtx                                |   2 +-
 news-guides/README.md                       |   3 ++-
 news-guides/news/whats-new-in-babel-3.56.md |  34 ++++++++++++++++++----------
 7 files changed, 52 insertions(+), 39 deletions(-)

diff --git a/README.md b/README.md
index c327e4b..723cf41 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.55.2320
+## Babel 3.56
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -46,22 +46,16 @@ respective authors.
 
 ### Summary of Latest changes
 ```
-3.56   2021-03-23??
-       * Two new keys in \babelprehyphenation.
-         - 'space', in em units.
-         - 'spacefactor', based on the current word separation.
-       * Multiple 'insert's allowed.
+3.56   2021-03-24
+       * Transforms (\babelprehyphenation, \babelposthyphenation)
+         - Key 'space', in em units.
+         - Key 'spacefactor', based on the current word separation.
+         - Multiple 'insert's allowed.
+         - Definable in 'ini' files.
+         - Arbitrary characters in pattern.
        * Fixes:
          - 'insert' and 'data' didn't always set/get the expected node.
          - Hyphen was not shown in Marathi (#123)
-         
-3.55   2021-03-03??
-       * Captions for Uyghur.
-       * Fixes:
-         - Wrong caption in Romanian for Index (#117).
-         - Missing lines in ngermanb.sty (#118).
-       * There is also some tentative code to improve pgfpicture with
-         RTL texts.
 ```
 
 ### Previous changes
diff --git a/babel.dtx b/babel.dtx
index 7d36329..9c8ff77 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/03/23 v3.55.2320 The Babel package]
+\ProvidesFile{babel.dtx}[2021/03/24 v3.56 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -3010,9 +3010,15 @@ of the previous char in \luatex, and the font size set by the last
 
 \subsection{Transforms}
 
-There are a couple of macros to define
-\textit{transforms}.\footnote{Similar in concept, but not the same, as
-those in Unicode.} 
+Transforms (only \luatex) provide a way to process the text on the
+typesetting level in several language-dependent ways, like non-standard
+hyphenation, special line breaking rules, script to script conversion,
+spacing conventions and so on.\footnote{They are similar in concept,
+but not the same, as those in Unicode.}
+
+It currently embraces |\babelprehyphenation| and
+|\babelposthyphenation|, which have been available for several months.
+\New{3.56} In this version they can be defined in |ini| files, too.
 
 \Describe{\babelposthyphenation}{\marg{hyphenrules-name}%
           \marg{lua-pattern}\marg{replacement}}
@@ -4856,8 +4862,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.55.2320>>
-%<<date=2021/03/23>>
+%<<version=3.56>>
+%<<date=2021/03/24>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -11701,7 +11707,7 @@ help from Bernd Raichle, for which I am grateful.
 \@namedef{bbl at inikv@transforms.posthyphenation}{%
   \bbl at transforms\babelposthyphenation}
 \def\bbl at transforms@aux#1#2#3,#4\relax{#1{#2}{#3}{#4}}
-\begingroup % TODO - to a lua file
+\begingroup
   \catcode`\%=12
   \catcode`\&=14
   \gdef\bbl at transforms#1#2#3{&%
@@ -14060,7 +14066,7 @@ end
               last_match = save_last    &% Optimization
               goto next
 
-            elseif crep == nil then &% = remove
+            elseif crep == nil or crep.remove then
               node.remove(head, item)
               table.remove(w_nodes, sc)
               w = u.sub(w, 1, sc-1) .. u.sub(w, sc+1)
@@ -14253,7 +14259,8 @@ end
       \bbl at ifsamestring{##1}{remove}&%
         {\bbl at add@list\babeltempb{nil}}&%
         {\directlua{
-           local rep = [[##1]]     
+           local rep = [=[##1]=]             
+           rep = rep:gsub('^%s*(remove)%s*$', 'remove = true')
            rep = rep:gsub('^%s*(insert)%s*,', 'insert = true, ')
            rep = rep:gsub(    '(no)%s*=%s*([^%s,]*)', Babel.capture_func)
            rep = rep:gsub(   '(pre)%s*=%s*([^%s,]*)', Babel.capture_func)
@@ -14296,7 +14303,8 @@ end
       \bbl at ifsamestring{##1}{remove}&%
         {\bbl at add@list\babeltempb{nil}}&%
         {\directlua{
-           local rep = [[##1]]
+           local rep = [=[##1]=]
+           rep = rep:gsub('^%s*(remove)%s*$', 'remove = true')
            rep = rep:gsub('^%s*(insert)%s*,', 'insert = true, ')
            rep = rep:gsub('(string)%s*=%s*([^%s,]*)', Babel.capture_func)
            rep = rep:gsub( '(space)%s*=%s*([%d%.]+)%s+([%d%.]+)%s+([%d%.]+)',
diff --git a/babel.ins b/babel.ins
index e20a3ca..bb67524 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/23}
+\def\filedate{2021/03/24}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index fa17f8d..588c656 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 55dae16..efd3eb7 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/03/23 v3.55.2320]
+\ProvidesFile{bbcompat.dtx}[2021/03/24 v3.56]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/news-guides/README.md b/news-guides/README.md
index 9cbcb04..cb942a9 100644
--- a/news-guides/README.md
+++ b/news-guides/README.md
@@ -25,9 +25,10 @@ This is the home page for Babel, a multilingual environment for latex (and somet
 
 | Version | Most relevant changes
 | --- | --- |
+| [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. |
 | [3.54](news/whats-new-in-babel-3.54.md) | Improved `picture`. |
-| [3.53](news/whats-new-in-babel-3.53.md) | Templates in \setlocalecaption. Captions in Sinhala. |
+| [3.53](news/whats-new-in-babel-3.53.md) | Templates in `\setlocalecaption`. Captions in Sinhala. |
 | [3.52](news/whats-new-in-babel-3.52.md) | Improvements in `\babelprehyphenation` and `\babelposthyphenation`. |
 | [3.51](news/whats-new-in-babel-3.51.md) | `\setlocalecaption`, to (re)define captions at the document level. |
 | [3.50](news/whats-new-in-babel-3.50.md) | A bug fix release for 3.49. |
diff --git a/news-guides/news/whats-new-in-babel-3.56.md b/news-guides/news/whats-new-in-babel-3.56.md
index 1f94074..41b1838 100644
--- a/news-guides/news/whats-new-in-babel-3.56.md
+++ b/news-guides/news/whats-new-in-babel-3.56.md
@@ -1,6 +1,17 @@
 # What's new in babel 3.56
 
-(Under development.)
+2012-03-24
+
+The concept of ‘transform’ (requires `luatex`) is introduced, which
+embraces `\babelprehyphenation` and `\babelposthyphenation` and it's
+meant as a way to process the text at the typesetting level in several
+language-dependent ways, like non-standard hyphenation, special line
+breaking rules, script to script conversion, spacing conventions and so
+on. They are conceptually similar to those in Unicode, but not the
+same, because in `babel` they are focused on the typographical level.
+
+Transforms have been available for more than a year, but in this
+version they can be defined in `ini`files, too.
 
 ## Inserting spaces (with `luatex`)
 
@@ -50,15 +61,12 @@ As you can see, now multiple insertions are allowed, which is often
 necessary when a space is added.
 
 In addition, the code has been refactored, to improve both stability
-with overlapping patterns and speed. (There are still some issues,
-however.)
+with overlapping patterns and speed. There are still some issues to be
+sorted out, like the behavior in verbatim mode.
 
 ## Transforms in `ini` files
 
-Based on the two macros above, there is a tentative and somewhat
-experimental code enabling the definition of ‘transforms’. They are
-conceptually similar to those in Unicode, but not the same, because in
-`babel` they are focused on the typographical level. 
+Based on the two macros above, `ini` files can define ‘transforms’.
 ```ini
 [transforms.prehyphenation]
 space.punctuation.1.0 = { «{a} }
@@ -79,10 +87,11 @@ A single transform (with a single name) may consist in a collection of
 rules (a typical case would be a transliteration scheme). Every rule in
 the collection is numbered (the first `.1.` in the example). There can be even
 rules in the two sections for transforms (`transforms.prehyphenation`
-and `transforms.posthyphenation`; in such a case, restart with `1` in
-the second section).
+and `transforms.posthyphenation`); in such a case, restart with `1` in
+the second section.
 
-(*To be expanded.*)
+In future releases, several `ini` files will be expanded to take advantage
+of this new feature.
 
 ## Arbitrary characters in patterns
 
@@ -91,8 +100,8 @@ example, `%`). Just write the hex code with at least 4 ‘hex digits’.
 For example, `{d}{0025}` matches a digit followed by a `%`.
 
 Remember you can still enter characters with the old good `^^` syntax,
-which they are converted at the TeX level; this `{}` extension is
-handled by lua directly, so catcodes are not taken into account.
+which is converted at the TeX level; this extension is handled by lua
+directly, so catcodes are not relevant.
 
 ## Fixes
 
@@ -100,5 +109,6 @@ handled by lua directly, so catcodes are not taken into account.
   inserting items were detected, either with a multi-letter `string` or
   with `insert`. In these cases, `data` was somewhat unpredictable,
   too.
+* Hyphen was not shown in Marathi (#123).
 
  
\ No newline at end of file





More information about the latex3-commits mailing list.