[latex3-commits] [git/LaTeX3-latex3-babel] master: Fixes for autoloading: wrong hyphenmins, error with counters in pdftex (9009f05)
Javier
email at dante.de
Sun Apr 26 09:11:39 CEST 2020
Repository : https://github.com/latex3/babel
On branch : master
Link : https://github.com/latex3/babel/commit/9009f058b5d69e73536a932d00babb0821823cb3
>---------------------------------------------------------------
commit 9009f058b5d69e73536a932d00babb0821823cb3
Author: Javier <email at localhost>
Date: Sun Apr 26 09:11:39 2020 +0200
Fixes for autoloading: wrong hyphenmins, error with counters in pdftex
>---------------------------------------------------------------
9009f058b5d69e73536a932d00babb0821823cb3
README.md | 14 ++++--
babel.dtx | 136 ++++++++++++++++++++++++++++++++++++++++++++---------------
babel.ins | 2 +-
babel.pdf | Bin 767444 -> 771499 bytes
bbcompat.dtx | 2 +-
5 files changed, 113 insertions(+), 41 deletions(-)
diff --git a/README.md b/README.md
index 778cc33..cdda811 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.42.1986
+## Babel 3.42.1989
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -46,10 +46,16 @@ respective authors.
```
3.43 2020-04-??
- Autoloading based on the BCP47 codes, with basic lookup.
- - Only a few essential commands are loaded with the format.
- - Improvements in Assamese, Luxembourgish, and Finnish.
- - Fix - Babel reset the \sfcode of » to 1000. It should be 0.
+ - Now only a few essential commands are loaded with the format.
+ - Improvements in Assamese, Luxembourgish, Marathi, Armenian,
+ Bengali, and Finnish.
- First steps in the removal of switch.def and plain.def.
+ - Fixes:
+ - Babel reset the \sfcode of » to 1000. It should be 0.
+ - With autoloading the hyphenmins were set to the default
+ values.
+ - With autoloading and counters an error could be raised in
+ pdftex.
3.42 2020-03-22
- \getlocaleproperty, to get the value of a field from the loaded
diff --git a/babel.dtx b/babel.dtx
index b21ecf6..6d1320c 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2020/04/23 v3.42.1986 The Babel package]
+\ProvidesFile{babel.dtx}[2020/04/26 v3.42.1989 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -4466,8 +4466,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.42.1986>>
-%<<date=2020/04/23>>
+%<<version=3.42.1989>>
+%<<date=2020/04/26>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6554,7 +6554,7 @@ help from Bernd Raichle, for which I am grateful.
\fi}
\def\bbl at bcplookup#1-#2-#3-#4\@@{%
\let\bbl at bcp\relax
- \lowercase{\def\bbl at tempa{#1}}
+ \lowercase{\def\bbl at tempa{#1}}%
\ifx\@empty#2%
\IfFileExists{babel-\bbl at tempa.ini}{\let\bbl at bcp\bbl at tempa}{}%
\else\ifx\@empty#3%
@@ -6586,26 +6586,39 @@ help from Bernd Raichle, for which I am grateful.
\fi
\fi\fi}
\let\bbl at autoload@options\@empty
+\let\bbl at initoload\relax
\def\bbl at provide@locale{%
-% TODO. Option to search if loaded with \LocaleForEach
+ \ifx\babelprovide\@undefined
+ \bbl at error{For a language to be defined on the fly 'base'\\%
+ is not enough, and the whole package must be\\%
+ loaded. Either delete the 'base' option or\\%
+ request the languages explicitly}%
+ {See the manual for further details.}%
+ \fi
+% TODO. Option to search if loaded, with \LocaleForEach
\let\bbl at auxname\languagename % Still necessary. TODO
\bbl at ifunset{bbl at bcp@map@\languagename}{}% Move uplevel??
{\edef\languagename{\@nameuse{bbl at bcp@map@\languagename}}}%
+ \ifbbl at bcpallowed
+ \expandafter\ifx\csname date\languagename\endcsname\relax
+ \expandafter
+ \bbl at bcplookup\languagename-\@empty-\@empty-\@empty\@@
+ \ifx\bbl at bcp\relax\else % Returned by \bbl at bcplookup
+ \edef\languagename{\bbl at bcp@prefix\bbl at bcp}%
+ \edef\localename{\bbl at bcp@prefix\bbl at bcp}%
+ \expandafter\ifx\csname date\languagename\endcsname\relax
+ \let\bbl at initoload\bbl at bcp
+ \bbl at exp{\\\babelprovide[\bbl at autoload@bcpoptions]{\languagename}}%
+ \let\bbl at initoload\relax
+ \fi
+ \bbl at csarg\xdef{bcp at map@\bbl at bcp}{\localename}%
+ \fi
+ \fi
+ \fi
\expandafter\ifx\csname date\languagename\endcsname\relax
\IfFileExists{babel-\languagename.tex}%
{\bbl at exp{\\\babelprovide[\bbl at autoload@options]{\languagename}}}%
- {\ifbbl at bcpallowed
- \expandafter
- \bbl at bcplookup\languagename-\@empty-\@empty-\@empty\@@
- \ifx\bbl at bcp\relax\else % Returned by \bbl at bcplookup
- \edef\languagename{\bbl at bcp@prefix\bbl at bcp}%
- \edef\localename{\bbl at bcp@prefix\bbl at bcp}%
- \expandafter\ifx\csname date\languagename\endcsname\relax
- \bbl at exp{\\\babelprovide[import=\bbl at tempa]{\languagename}}%
- \fi
- \bbl at csarg\xdef{bcp at map@\bbl at bcp}{\localename}%
- \fi
- \fi}%
+ {}%
\fi}
% \end{macrocode}
%
@@ -6815,9 +6828,11 @@ help from Bernd Raichle, for which I am grateful.
\bbl at info{Using '\string\language' instead of 'language' is\\%
not recommended. If what you want is to use\\%
a macro containing the actual locale, make\\%
- sure it does not not match any language. I'll\\%
- try to fix '\string\localename', but I cannot promise\\%
- anything. Reported}%
+ sure it does not not match any language.\\%
+ Reported}%
+% I'll\\%
+% try to fix '\string\localename', but I cannot promise\\%
+% anything. Reported}%
\ifx\scantokens\@undefined
\def\localename{??}%
\else
@@ -9984,10 +9999,14 @@ help from Bernd Raichle, for which I am grateful.
% == import, captions ==
\ifx\bbl at KVP@import\@nil\else
\bbl at exp{\\\bbl at ifblank{\bbl at KVP@import}}%
- {\begingroup
- \def\BabelBeforeIni##1##2{\gdef\bbl at KVP@import{##1}\endinput}%
- \InputIfFileExists{babel-#2.tex}{}{}%
- \endgroup}%
+ {\ifx\bbl at initoload\relax
+ \begingroup
+ \def\BabelBeforeIni##1##2{\gdef\bbl at KVP@import{##1}\endinput}%
+ \InputIfFileExists{babel-#2.tex}{}{}%
+ \endgroup
+ \else
+ \xdef\bbl at KVP@import{\bbl at initoload}%
+ \fi}%
{}%
\fi
\ifx\bbl at KVP@captions\@nil
@@ -10013,12 +10032,12 @@ help from Bernd Raichle, for which I am grateful.
{}%
\bbl at exp{%
\\\bbl at toglobal\<bbl at ensure@\languagename>%
- \\\bbl at toglobal\<bbl at ensure@\languagename\space>}
+ \\\bbl at toglobal\<bbl at ensure@\languagename\space>}%
% At this point all parameters are defined if 'import'. Now we
% execute some code depending on them. But what about if nothing was
% imported? We just load the very basic parameters: ids and a few
% more.
- \bbl at ifunset{bbl at lname@#2}%
+ \bbl at ifunset{bbl at lname@#2}% TODO. Duplicated
{\def\BabelBeforeIni##1##2{%
\begingroup
\catcode`\[=12 \catcode`\]=12 \catcode`\==12 \catcode`\;=12 %
@@ -10029,14 +10048,21 @@ help from Bernd Raichle, for which I am grateful.
\bbl at exportkey{dgnat}{numbers.digits.native}{}%
\bbl at exportkey{prehc}{typography.prehyphenchar}{}%
\bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
+ \bbl at exportkey{lfthm}{typography.lefthyphenmin}{2}%
+ \bbl at exportkey{rgthm}{typography.righthyphenmin}{3}%
\bbl at exportkey{hyphr}{typography.hyphenrules}{}%
\bbl at exportkey{hyoth}{typography.hyphenate.other}{}%
\bbl at exportkey{intsp}{typography.intraspace}{}%
- \endinput
- \endgroup}% boxed, to avoid extra spaces:
- {\setbox\z@\hbox{\InputIfFileExists{babel-#2.tex}{}{}}}}%
+ \ifx\bbl at initoload\relax\endinput\fi
+ \endgroup}%
+ \begingroup % boxed, to avoid extra spaces:
+ \ifx\bbl at initoload\relax
+ \setbox\z@\hbox{\InputIfFileExists{babel-#2.tex}{}{}}%
+ \else
+ \setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
+ \fi
+ \endgroup}%
{}%
- % -
% == script, language ==
% Override the values from ini or defines them
\ifx\bbl at KVP@script\@nil\else
@@ -10299,7 +10325,11 @@ help from Bernd Raichle, for which I am grateful.
\fi}%
\expandafter\bbl at tempb\bbl at captionslist\@empty
\else
- \bbl at read@ini{\bbl at KVP@captions}{data}% Here all letters cat = 11
+ \ifx\bbl at initoload\relax
+ \bbl at read@ini{\bbl at KVP@captions}{data}% Here letters cat = 11
+ \else
+ \bbl at read@ini{\bbl at initoload}{data}% Here all letters cat = 11
+ \fi
\bbl at after@ini
\bbl at savestrings
\fi
@@ -10312,8 +10342,34 @@ help from Bernd Raichle, for which I am grateful.
\bbl at savedate
\fi
\bbl at endcommands
+ \bbl at ifunset{bbl at lname@#1}% TODO. Duplicated
+ {\def\BabelBeforeIni##1##2{%
+ \begingroup
+ \catcode`\[=12 \catcode`\]=12 \catcode`\==12 \catcode`\;=12 %
+ \let\bbl at ini@captions at aux\@gobbletwo
+ \def\bbl at inidate ####1.####2.####3.####4\relax ####5####6{}%
+ \bbl at read@ini{##1}{basic data}%
+ \bbl at exportkey{prehc}{typography.prehyphenchar}{}%
+ \bbl at exportkey{lnbrk}{typography.linebreaking}{h}%
+ \bbl at exportkey{lfthm}{typography.lefthyphenmin}{2}%
+ \bbl at exportkey{rgthm}{typography.righthyphenmin}{3}%
+ \bbl at exportkey{hyphr}{typography.hyphenrules}{}%
+ \bbl at exportkey{hyoth}{typography.hyphenate.other}{}%
+ \bbl at exportkey{intsp}{typography.intraspace}{}%
+ \bbl at exportkey{chrng}{characters.ranges}{}%
+ \bbl at exportkey{dgnat}{numbers.digits.native}{}%
+ \ifx\bbl at initoload\relax\endinput\fi
+ \endgroup}%
+ \begingroup % boxed, to avoid extra spaces:
+ \ifx\bbl at initoload\relax
+ \setbox\z@\hbox{\InputIfFileExists{babel-#1.tex}{}{}}%
+ \else
+ \setbox\z@\hbox{\BabelBeforeIni{\bbl at initoload}{}}%
+ \fi
+ \endgroup}%
+ {}%
\bbl at exp{%
- \def\<#1hyphenmins>{%
+ \gdef\<#1hyphenmins>{%
{\bbl at ifunset{bbl at lfthm@#1}{2}{\bbl at cs{lfthm@#1}}}%
{\bbl at ifunset{bbl at rgthm@#1}{3}{\bbl at cs{rgthm@#1}}}}}%
\bbl at provide@hyphens{#1}%
@@ -10356,7 +10412,14 @@ help from Bernd Raichle, for which I am grateful.
\fi}%
\fi
\ifx\bbl at tempa\relax % if no opt or no language in opt found
- \ifx\bbl at KVP@import\@nil\else % if importing
+ \ifx\bbl at KVP@import\@nil
+ \ifx\bbl at initoload\relax\else
+ \bbl at exp{% and hyphenrules is not empty
+ \\\bbl at ifblank{\bbl at cs{hyphr@#1}}%
+ {}%
+ {\let\\\bbl at tempa\<l@\bbl at cl{hyphr}>}}%
+ \fi
+ \else % if importing
\bbl at exp{% and hyphenrules is not empty
\\\bbl at ifblank{\bbl at cs{hyphr@#1}}%
{}%
@@ -10535,13 +10598,13 @@ help from Bernd Raichle, for which I am grateful.
\in@{.1$}{#1$}%
\ifin@
\bbl at replace\bbl at tempc{.1}{}%
- \bbl at csarg\xdef{cntr@\bbl at tempc @\languagename}{%
+ \bbl at csarg\protected at xdef{cntr@\bbl at tempc @\languagename}{%
\noexpand\bbl at alphnumeral{\bbl at tempc}}%
\fi
\in@{.F.}{#1}%
\ifin@\else\in@{.S.}{#1}\fi
\ifin@
- \bbl at csarg\xdef{cntr@#1@\languagename}{\bbl at tempb*}%
+ \bbl at csarg\protected at xdef{cntr@#1@\languagename}{\bbl at tempb*}%
\else
\toks@{}% Required by \bbl at buildifcase, which returns \bbl at tempa
\expandafter\bbl at buildifcase\bbl at tempb* \\ % Space after \\
@@ -10910,6 +10973,9 @@ help from Bernd Raichle, for which I am grateful.
\def\bbl at bcp@prefix{bcp47-}
\@namedef{bbl at ADJ@autoload.options}#1{%
\def\bbl at autoload@options{#1}}
+\let\bbl at autoload@bcpoptions\@empty
+\@namedef{bbl at ADJ@autoload.bcp47.options}#1{%
+ \def\bbl at autoload@bcpoptions{#1}}
% TODO: use babel name, override
%
% As the final task, load the code for lua.
diff --git a/babel.ins b/babel.ins
index dee9678..412b2ed 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/04/23}
+\def\filedate{2020/04/26}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 01fe1d5..bd7189b 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 66a5c58..064ca18 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/04/23 v3.42.1986]
+\ProvidesFile{bbcompat.dtx}[2020/04/26 v3.42.1989]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.