[latex3-commits] [git/LaTeX3-latex3-babel] main: Minor updates in fonts. Recognize hooks babel/../language. (2afa253)

Javier email at dante.de
Sat Jul 17 13:30:39 CEST 2021


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/2afa253f0e68728c0ddc523b9a17645aff0b62e7

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

commit 2afa253f0e68728c0ddc523b9a17645aff0b62e7
Author: Javier <email at localhost>
Date:   Sat Jul 17 13:30:39 2021 +0200

    Minor updates in fonts. Recognize hooks babel/../language.


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

2afa253f0e68728c0ddc523b9a17645aff0b62e7
 README.md               |   4 +++-
 babel.dtx               |  61 +++++++++++++++++++++++++-----------------------
 babel.ins               |   2 +-
 babel.pdf               | Bin 850817 -> 850869 bytes
 bbcompat.dtx            |   2 +-
 testfiles/tlbamsart.tlg |   1 +
 6 files changed, 38 insertions(+), 32 deletions(-)

diff --git a/README.md b/README.md
index d925088..f2cb9a8 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.61.2435
+## Babel 3.61.2436
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -48,6 +48,8 @@ respective authors.
 ```
 3.62   2021-??-??
        * No more errors with unknown languages in aux file.
+       * Tentative support for \AddToHook.
+       * 
        * Fixes:
          - Locale dependent quotes with CJK (#131).
          - Babel and hyperref prevent changes to the \LaTeX logo (#138).
diff --git a/babel.dtx b/babel.dtx
index 55fe976..9a08cba 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2021/07/16 v3.61.2435 The Babel package]
+\ProvidesFile{babel.dtx}[2021/07/17 v3.61.2436 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -4990,8 +4990,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.61.2435>>
-%<<date=2021/07/16>>
+%<<version=3.61.2436>>
+%<<date=2021/07/17>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5312,6 +5312,16 @@ help from Bernd Raichle, for which I am grateful.
   \fi}
 %    \end{macrocode}
 %
+% An alternative to |\IfFormatAtLeastTF| for old versions. Temporary.
+%
+%    \begin{macrocode}  
+\ifx\IfFormatAtLeastTF\@undefined
+  \def\bbl at ifformatlater{\@ifl at t@r\fmtversion}
+\else
+  \let\bbl at ifformatlater\IfFormatAtLeastTF
+\fi
+%    \end{macrocode}
+%
 % The following adds some code to |\extras...| both before and after,
 % while avoiding doing it twice. It's somewhat convoluted, to deal with
 % |#|'s.
@@ -6310,10 +6320,10 @@ help from Bernd Raichle, for which I am grateful.
 %
 % \begin{macro}{\substitutefontfamily}
 %
+% This command is deprecated. Use the tools provides by \LaTeX.
 % The command |\substitutefontfamily| creates an
 % \file{.fd} file on the fly. The first argument is an encoding
 % mnemonic, the second and third arguments are font family names.
-% This command is deprecated. Use the tools provides by \LaTeX.
 %
 %    \begin{macrocode}
 \def\substitutefontfamily#1#2#3{%
@@ -6464,24 +6474,17 @@ help from Bernd Raichle, for which I am grateful.
 \fi
 %    \end{macrocode}
 %
-% For several functionalities, we need to execute some code with
-% |\selectfont|. Currently, there is a hook for this purpose, but for
-% older versions the \LaTeX{} command is patched (the latter solution
-% will be eventually removed).
+% For several functions, we need to execute some code with
+% |\selectfont|. With \LaTeX\ 2021-06-01, there is a hook for this
+% purpose, but in older versions the \LaTeX{} command is patched (the
+% latter solution will be eventually removed).
 %
 %    \begin{macrocode}
-\begingroup
-  \catcode`\_=11
-  \catcode`\.=10
-  \catcode`\ =11\relax%   Spaces as letters!
-..\ifx\__hook selectfont\@undefined%
-....\gdef\bbl at patchfont#1{%
-......\expandafter\bbl at add\csname.selectfont.\endcsname{#1}%
-......\expandafter\bbl at toglobal\csname.selectfont.\endcsname}%
-..\else%
-....\gdef\bbl at patchfont#1{\AddToHook{selectfont}{#1}}%
-..\fi%
-\endgroup
+\bbl at ifformatlater{2021-06-01}%
+  {\def\bbl at patchfont#1{\AddToHook{selectfont}{#1}}}
+  {\def\bbl at patchfont#1{%
+     \expandafter\bbl at add\csname selectfont \endcsname{#1}%
+     \expandafter\bbl at toglobal\csname selectfont \endcsname}}
 %    \end{macrocode}
 %
 % \end{macro}
@@ -7133,7 +7136,7 @@ help from Bernd Raichle, for which I am grateful.
 %    exists. Otherwise raises and error.
 %
 %    The argument of |\bbl at fixname| has to be a macro name, as it may get
-%    ``fixed'' if casing (lc/uc) is wrong. It's intented to fix a
+%    ``fixed'' if casing (lc/uc) is wrong. It's an attempt to fix a
 %    long-standing bug when |\foreignlanguage| and the like appear in
 %    a |\MakeXXXcase|. However, a lowercase form is not imposed to
 %    improve backward compatibility (perhaps you defined a language
@@ -8219,13 +8222,12 @@ help from Bernd Raichle, for which I am grateful.
 \newcommand\EnableBabelHook[1]{\bbl at csarg\let{hk@#1}\@firstofone}
 \newcommand\DisableBabelHook[1]{\bbl at csarg\let{hk@#1}\@gobble}
 \def\bbl at usehooks#1#2{%
-  \ifx\UseHook\@undefined\else
-    \UseHook{babel/#1}%
-  \fi
+  \ifx\UseHook\@undefined\else\UseHook{babel/#1}\fi
   \def\bbl at elth##1{%
     \bbl at cs{hk@##1}{\bbl at cs{ev@##1@#1@}#2}}%
   \bbl at cs{ev@#1@}%
   \ifx\languagename\@undefined\else % Test required for Plain (?)
+    \ifx\UseHook\@undefined\else\UseHook{babel/#1/\languagename}\fi
     \def\bbl at elth##1{%
       \bbl at cs{hk@##1}{\bbl at cl{ev@##1@#1}#2}}%
     \bbl at cl{ev@#1}%
@@ -12737,9 +12739,7 @@ help from Bernd Raichle, for which I am grateful.
 \newcommand\bbl at bblfont[2][]{% 1=features 2=fontname, @font=rm|sf|tt
   \bbl at ifunset{\bbl at tempb family}%
     {\bbl at providefam{\bbl at tempb}}%
-    {\bbl at exp{%
-      \\\bbl at sreplace\<\bbl at tempb family >%
-        {\@nameuse{\bbl at tempb default}}{\<\bbl at tempb default>}}}%
+    {}%
   % For the default font, just in case:
   \bbl at ifunset{bbl at lsys@\languagename}{\bbl at provide@lsys{\languagename}}{}%
   \expandafter\bbl at ifblank\expandafter{\bbl at tempa}%
@@ -12762,12 +12762,15 @@ help from Bernd Raichle, for which I am grateful.
     \\\bbl at add@list\\\bbl at font@fams{#1}%
     \\\DeclareRobustCommand\<#1family>{%
       \\\not at math@alphabet\<#1family>\relax
-      \\\fontfamily\<#1default>\\\selectfont}%
+      % \\\prepare at family@series at update{#1}\<#1default>% TODO. Fails
+      \\\fontfamily\<#1default>%
+      \<ifx>\\\UseHooks\\\@undefined\<else>\\\UseHook{#1family}\<fi>%
+      \\\selectfont}%
     \\\DeclareTextFontCommand{\<text#1>}{\<#1family>}}}
 %    \end{macrocode}
 %
 % The following macro is activated when the hook |babel-fontspec| is
-% enabled. But before we define a macro for a warning, which sets a
+% enabled. But before, we define a macro for a warning, which sets a
 % flag to avoid duplicate them.
 %
 %    \begin{macrocode}
diff --git a/babel.ins b/babel.ins
index ca4249a..71906c3 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/07/16}
+\def\filedate{2021/07/17}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index ecadd80..9d69e04 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 4428758..b893241 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/07/16 v3.61.2435]
+\ProvidesFile{bbcompat.dtx}[2021/07/17 v3.61.2436]
 %</dtx>
 %
 %% File 'bbcompat.dtx'
diff --git a/testfiles/tlbamsart.tlg b/testfiles/tlbamsart.tlg
index 83f11b8..d2d10f5 100644
--- a/testfiles/tlbamsart.tlg
+++ b/testfiles/tlbamsart.tlg
@@ -69,6 +69,7 @@ Package: babel
 .\glue -2.09999 plus -2.09999
 .\glue 8.39996 plus 12.0
 .\glue(\parskip) 0.0
+.\glue(\parskip) 0.0
 .\glue(\baselineskip) 1.56665
 .\hbox(6.83331+0.0)x360.0, glue set 109.94844fil
 ..\glue(\leftskip) 0.0 plus 1.0fil





More information about the latex3-commits mailing list.