[latex3-commits] [git/LaTeX3-latex3-babel] master: Syntax .template in \setlocalecaption. (6a2f7e1)

Javier email at dante.de
Mon Dec 21 17:07:58 CET 2020


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

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

commit 6a2f7e14e4871ff8f4f86e847441a89327921210
Author: Javier <email at localhost>
Date:   Mon Dec 21 17:07:58 2020 +0100

    Syntax .template in \setlocalecaption.


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

6a2f7e14e4871ff8f4f86e847441a89327921210
 README.md    |  11 ++--
 babel.dtx    | 166 ++++++++++++++++++++++++++++++++---------------------------
 babel.ins    |   2 +-
 babel.pdf    | Bin 819029 -> 820345 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 99 insertions(+), 82 deletions(-)

diff --git a/README.md b/README.md
index 30352f2..934a87f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.52
+## Babel 3.52.2228
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages.  Many
@@ -7,9 +7,9 @@ lualatex out of the box.  A few even work with plain formats.
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.52 are described in:
+Changes in version 3.53 are described in:
 
-https://github.com/latex3/babel/wiki/What's-new-in-babel-3.52
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.53
 
 Included is a set of ini files for about 250 languages. 
 
@@ -43,6 +43,10 @@ respective authors.
 
 ### Latest changes
 ```
+3.53   2021-01-??
+       * Extended \setlocalecaption to allow .template (related to
+         #111).
+
 3.52   2020-12-16
        * WARNING. If you need the style for Afrikaans you must update
          babel-dutch.
@@ -56,6 +60,7 @@ respective authors.
          - Save size overflow with many \selectlanguage's (#109).
          - Albanian: fix a typo in contents name (#104)
          - Missing ‘Unused global option(s)’ warning (#110)
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.52
 
 3.51   2020-10-27
        * Common interface to (re)define captions (with
diff --git a/babel.dtx b/babel.dtx
index ee0f127..24ac3e5 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2020/12/16 v3.52 The Babel package]
+\ProvidesFile{babel.dtx}[2020/12/21 v3.52.2228 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -4837,8 +4837,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.52>>
-%<<date=2020/12/16>>
+%<<version=3.52.2228>>
+%<<date=2020/12/21>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -8236,7 +8236,7 @@ help from Bernd Raichle, for which I am grateful.
 %
 %    \begin{macrocode}
 \bbl at trace{Macros for setting language files up}
-\def\bbl at ldfinit{% TODO. Merge into the next macro? Unused elsewhere
+\def\bbl at ldfinit{%
   \let\bbl at screset\@empty
   \let\BabelStrings\bbl at opt@string
   \let\BabelOptions\@empty
@@ -10027,53 +10027,58 @@ help from Bernd Raichle, for which I am grateful.
 \newcommand\setlocalecaption{%  TODO. Catch typos. What about ensure?
   \@ifstar\bbl at setcaption@s\bbl at setcaption@x}
 \def\bbl at setcaption@x#1#2#3{%  language caption-name string
-  \edef\bbl at tempa{#1}%
-  \edef\bbl at tempd{%
-    \expandafter\expandafter\expandafter
-    \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
-  \bbl at xin@
-    {\expandafter\string\csname #2name\endcsname}%
-    {\bbl at tempd}%
-  \ifin@ % Renew caption
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% 
-    \ifin@
-      \bbl at exp{%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else % Old way converts to new way
-      \bbl at ifunset{#1#2name}%
-        {\bbl at exp{%
+  \bbl at trim@def\bbl at tempa{#2}%
+  \bbl at xin@{.template}{\bbl at tempa}%
+  \ifin@
+    \bbl at ini@captions at template{#3}{#1}%
+  \else
+    \edef\bbl at tempd{%
+      \expandafter\expandafter\expandafter
+      \strip at prefix\expandafter\meaning\csname captions#1\endcsname}%
+    \bbl at xin@
+      {\expandafter\string\csname #2name\endcsname}%
+      {\bbl at tempd}%
+    \ifin@ % Renew caption
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% 
+      \ifin@
+        \bbl at exp{%
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else % Old way converts to new way
+        \bbl at ifunset{#1#2name}%
+          {\bbl at exp{%
+            \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%
+            \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+              {\def\<#2name>{\<#1#2name>}}%
+              {}}}%
+          {}%
+      \fi
+    \else
+      \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
+      \ifin@ % New way
+        \bbl at exp{%
+          \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
+          \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
+            {\\\bbl at scset\<#2name>\<#1#2name>}%
+            {}}%
+      \else  % Old way, but defined in the new way
+        \bbl at exp{%
           \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%      
           \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
             {\def\<#2name>{\<#1#2name>}}%
-            {}}}%
-        {}%
+            {}}%
+      \fi%
+    \fi
+    \@namedef{#1#2name}{#3}%
+    \toks@\expandafter{\bbl at captionslist}%
+    \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
+    \ifin@\else
+      \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
+      \bbl at toglobal\bbl at captionslist
     \fi
-  \else
-    \bbl at xin@{\string\bbl at scset}{\bbl at tempd}% New
-    \ifin@ % New way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\\\bbl at scset\<#2name>\<#1#2name>}%
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\\\bbl at scset\<#2name>\<#1#2name>}%
-          {}}%
-    \else  % Old way, but defined in the new way
-      \bbl at exp{%
-        \\\bbl at add\<captions#1>{\def\<#2name>{\<#1#2name>}}%      
-        \\\bbl at ifsamestring{\bbl at tempa}{\languagename}%
-          {\def\<#2name>{\<#1#2name>}}%
-          {}}%
-    \fi%
-  \fi
-  \@namedef{#1#2name}{#3}%
-  \toks@\expandafter{\bbl at captionslist}%
-  \bbl at exp{\\\in@{\<#2name>}{\the\toks@}}%
-  \ifin@\else
-    \bbl at exp{\\\bbl at add\\\bbl at captionslist{\<#2name>}}%
-    \bbl at toglobal\bbl at captionslist
   \fi}
-% \def\bbl at setcaption@s#1#2#3{}  % Not yet implemented
+% \def\bbl at setcaption@s#1#2#3{}  % TODO. Not yet implemented
 %    \end{macrocode}
 %
 % \subsection{Macros common to a number of languages}
@@ -10637,6 +10642,10 @@ help from Bernd Raichle, for which I am grateful.
     \else
       \bbl at csarg\def{KVP@##1}{##2}%
     \fi}%
+  % == init ==
+  \ifx\bbl at screset\@undefined
+    \bbl at ldfinit
+  \fi
   % == import, captions ==
   \ifx\bbl at KVP@import\@nil\else
     \bbl at exp{\\\bbl at ifblank{\bbl at KVP@import}}%
@@ -11338,37 +11347,39 @@ help from Bernd Raichle, for which I am grateful.
 % The auxiliary macro for captions define |\<caption>name|.
 %
 %    \begin{macrocode}
+\def\bbl at ini@captions at template#1#2{% string language tempa=capt-name
+  \bbl at replace\bbl at tempa{.template}{}%
+  \def\bbl at toreplace{#1{}}%
+  \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
+  \bbl at replace\bbl at toreplace{[[}{\csname}%
+  \bbl at replace\bbl at toreplace{[}{\csname the}% 
+  \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
+  \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
+  \bbl at xin@{,\bbl at tempa,}{,chapter,}% TODO. copypaste pattern
+  \ifin@
+    \bbl at patchchapter
+    \global\bbl at csarg\let{chapfmt@#2}\bbl at toreplace
+  \fi 
+  \bbl at xin@{,\bbl at tempa,}{,appendix,}%
+  \ifin@
+    \bbl at patchchapter
+    \global\bbl at csarg\let{appxfmt@#2}\bbl at toreplace
+  \fi 
+  \bbl at xin@{,\bbl at tempa,}{,part,}%
+  \ifin@
+    \bbl at patchpart
+    \global\bbl at csarg\let{partfmt@#2}\bbl at toreplace
+  \fi 
+  \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
+  \ifin@
+    \toks@\expandafter{\bbl at toreplace}%
+    \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
+  \fi}
 \def\bbl at ini@captions at aux#1#2{%
   \bbl at trim@def\bbl at tempa{#1}%
   \bbl at xin@{.template}{\bbl at tempa}%
   \ifin@
-    \bbl at replace\bbl at tempa{.template}{}%
-    \def\bbl at toreplace{#2}%
-    \bbl at replace\bbl at toreplace{[ ]}{\nobreakspace{}}%
-    \bbl at replace\bbl at toreplace{[[}{\csname}%
-    \bbl at replace\bbl at toreplace{[}{\csname the}% 
-    \bbl at replace\bbl at toreplace{]]}{name\endcsname{}}%
-    \bbl at replace\bbl at toreplace{]}{\endcsname{}}% 
-    \bbl at xin@{,\bbl at tempa,}{,chapter,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{chapfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,appendix,}%
-    \ifin@
-      \bbl at patchchapter
-      \global\bbl at csarg\let{appxfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,part,}%
-    \ifin@
-      \bbl at patchpart
-      \global\bbl at csarg\let{partfmt@\languagename}\bbl at toreplace
-    \fi 
-    \bbl at xin@{,\bbl at tempa,}{,figure,table,}%
-    \ifin@
-      \toks@\expandafter{\bbl at toreplace}%
-      \bbl at exp{\gdef\<fnum@\bbl at tempa>{\the\toks@}}%
-    \fi
+    \bbl at ini@captions at template{#2}\languagename
   \else
     \bbl at ifblank{#2}%
       {\bbl at exp{%
@@ -13230,10 +13241,10 @@ help from Bernd Raichle, for which I am grateful.
 % First, some general code for line breaking, used by
 % |\babelposthyphenation|.
 %
-% \textit{In progress.} Replace regular (ie, implicit) discretionaries
-% by spaceskips, based on the previous glyph (which I think makes
-% sense, because the hyphen and the previous char go always together).
-% Other discretionaries are not touched. See Unicode UAX 14.
+% Replace regular (ie, implicit) discretionaries by spaceskips, based
+% on the previous glyph (which I think makes sense, because the hyphen
+% and the previous char go always together). Other discretionaries are
+% not touched. See Unicode UAX 14.
 %
 %    \begin{macrocode}
 % TODO - to a lua file
@@ -13486,6 +13497,7 @@ help from Bernd Raichle, for which I am grateful.
 % TODO - to a lua file
 \directlua{
 Babel.script_blocks = {
+  ['dflt'] = {},
   ['Arab'] = {{0x0600, 0x06FF}, {0x08A0, 0x08FF}, {0x0750, 0x077F},
               {0xFE70, 0xFEFF}, {0xFB50, 0xFDFF}, {0x1EE00, 0x1EEFF}},
   ['Armn'] = {{0x0530, 0x058F}},
diff --git a/babel.ins b/babel.ins
index b362ca9..292cb58 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{2020/12/16}
+\def\filedate{2020/12/21}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index a946234..35589e2 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index fb1977f..6b5ed9e 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/12/16 v3.52]
+\ProvidesFile{bbcompat.dtx}[2020/12/21 v3.52.2228]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.