[latex3-commits] [git/LaTeX3-latex3-babel] main: Cleaning up. (6b80a6e)
Javier
email at dante.de
Fri Sep 30 18:40:06 CEST 2022
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/6b80a6efa45cadc06153ef47a3c0048796defb7b
>---------------------------------------------------------------
commit 6b80a6efa45cadc06153ef47a3c0048796defb7b
Author: Javier <email at localhost>
Date: Fri Sep 30 18:40:06 2022 +0200
Cleaning up.
>---------------------------------------------------------------
6b80a6efa45cadc06153ef47a3c0048796defb7b
README.md | 5 ++-
babel.dtx | 89 +++++++++++++-------------------------------
babel.ins | 2 +-
babel.pdf | Bin 886222 -> 883707 bytes
bbcompat.dtx | 2 +-
locale/bo/babel-tibetan.tex | 13 +++++--
6 files changed, 39 insertions(+), 72 deletions(-)
diff --git a/README.md b/README.md
index d2916b2..b6e1116 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.80.2871
+## Babel 3.80.2876
**Development**
@@ -49,7 +49,8 @@ respective authors.
### Summary of latest changes
```
3.81 dev
- * Tibetan line breaking and justification.
+ * Tibetan line breaking and justification (lines padded with
+ trailing tshegs).
* No 'fontspec' warnings about inexistent languages and
scripts.
diff --git a/babel.dtx b/babel.dtx
index 4cba342..907442a 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2022/09/25 v3.80.2871 The Babel package]
+\ProvidesFile{babel.dtx}[2022/09/30 v3.80.2876 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -943,11 +943,9 @@ list of characters as their arguments.
The command |\shorthandoff| sets the |\catcode| for each of the
characters in its argument to other (12); the command |\shorthandon|
sets the |\catcode| to active (13). Both commands only work on `known'
-shorthand characters.
-
-% TODO - Is the following true ????
-% If a character is not known to be a shorthand character its category
-% code will be left unchanged.
+shorthand characters, and an error will be raised otherwise. You can
+check if a character is a shorthand with |\ifbabelshorthand| (see
+below).
\New{3.9a} However, |\shorthandoff| does not behave as
you would expect with characters like |~| or |^|, because they
@@ -2310,18 +2308,6 @@ to select fonts in addition to the three basic families.
\babel{} and should be set with |fontspec| if necessary.
\end{warning}
-\begin{troubleshooting}
- \trouble{Package fontspec Warning: 'Language 'LANG' not available for
- font 'FONT' with script 'SCRIPT' 'Default' language used instead'}
- \textit{Package fontspec Warning: 'Language 'LANG' not available for
- font 'FONT' with script 'SCRIPT' 'Default' language used instead'}.
-
- \textbf{This is \textit{not} an error.} This warning is shown by
- \textsf{fontspec}, not by \babel. It can be irrelevant for English,
- but not for many other languages, including Urdu and Turkish. This is
- a useful and harmless warning, and if everything is fine with your
- document the best thing you can do is just to ignore it altogether.
-\end{troubleshooting}
\begin{troubleshooting}
\trouble{Package babel Info: The following fonts are not babel
@@ -5176,8 +5162,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.80.2871>>
-%<<date=2022/09/25>>
+%<<version=3.80.2876>>
+%<<date=2022/09/30>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -5304,7 +5290,8 @@ help from Bernd Raichle, for which I am grateful.
% To check if a macro is defined, we create a new macro, which does
% the same as |\@ifundefined|. However, in an $\epsilon$-tex engine,
% it is based on |\ifcsname|, which is more efficient, and does not
-% waste memory.
+% waste memory. Defined inside a group, to avoid \cs{ifcsname} being
+% implicitly set to |\relax| by the |\csname| test.
%
% \begin{macrocode}
\begingroup
@@ -5314,7 +5301,7 @@ help from Bernd Raichle, for which I am grateful.
\else
\expandafter\@secondoftwo
\fi}
- \bbl at ifunset{ifcsname}% TODO. A better test?
+ \bbl at ifunset{ifcsname}%
{}%
{\gdef\bbl at ifunset#1{%
\ifcsname#1\endcsname
@@ -6135,7 +6122,6 @@ help from Bernd Raichle, for which I am grateful.
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}}}%
@@ -6427,19 +6413,8 @@ help from Bernd Raichle, for which I am grateful.
% TODO. name at map must be here?
\bbl at provide@locale
\bbl at iflanguage\languagename{%
- \expandafter\ifx\csname date\languagename\endcsname\relax
- \bbl at error
- {Unknown language '\languagename'. Either you have\\%
- misspelled its name, it has not been installed,\\%
- or you requested it in a previous run. Fix its name,\\%
- install it or just rerun the file, respectively. In\\%
- some cases, you may need to remove the aux file}%
- {You may proceed, but expect wrong results}%
- \else
- % set type
- \let\bbl at select@type\z@
- \expandafter\bbl at switch\expandafter{\languagename}%
- \fi}}
+ \let\bbl at select@type\z@
+ \expandafter\bbl at switch\expandafter{\languagename}}}
\def\babel at aux#1#2{%
\select at language{#1}%
\bbl at foreach\BabelContentsFiles{% \relax -> don't assume vertical mode
@@ -6709,17 +6684,6 @@ help from Bernd Raichle, for which I am grateful.
% TODO. name at map here?
\bbl at provide@locale
\bbl at iflanguage\languagename{%
- \expandafter\ifx\csname date\languagename\endcsname\relax
- \bbl at warning % TODO - why a warning, not an error?
- {Unknown language '#1'. Either you have\\%
- misspelled its name, it has not been installed,\\%
- or you requested it in a previous run. Fix its name,\\%
- install it or just rerun the file, respectively. In\\%
- some cases, you may need to remove the aux file.\\%
- I'll proceed, but expect wrong results.\\%
- Reported}%
- \fi
- % set type
\let\bbl at select@type\@ne
\expandafter\bbl at switch\expandafter{\languagename}}}
% \end{macrocode}
@@ -6944,7 +6908,7 @@ help from Bernd Raichle, for which I am grateful.
\@nameuse{#2}%
\edef\bbl at tempa{#1}%
\bbl at sreplace\bbl at tempa{name}{}%
- \bbl at warning{% TODO.
+ \bbl at warning{%
\@backslashchar#1 not set for '\languagename'. Please,\\%
define it after the language has been loaded\\%
(typically in the preamble) with:\\%
@@ -7039,8 +7003,7 @@ help from Bernd Raichle, for which I am grateful.
% The macro |\initiate at active@char| below takes all the necessary
% actions to make its argument a shorthand character. The real work
% is performed once for each character. But first we define a little
-% tool. TODO. Always used with additional expansions. Move them here?
-% Move the macro to basic?
+% tool.
%
% \begin{macrocode}
\def\bbl at withactive#1#2{%
@@ -7175,7 +7138,7 @@ help from Bernd Raichle, for which I am grateful.
%
% \begin{macrocode}
\bbl at trace{Defining babelensure}
-\newcommand\babelensure[2][]{% TODO - revise test files
+\newcommand\babelensure[2][]{%
\AddBabelHook{babel-ensure}{afterextras}{%
\ifcase\bbl at select@type
\bbl at cl{e}%
@@ -8695,21 +8658,12 @@ help from Bernd Raichle, for which I am grateful.
%
% \paragraph{Tools}
%
-% But first, a couple of tools. The first one makes global a local
-% variable. This is not the best solution, but it works.
+% But first, a tool. It makes global a local variable. This is not the
+% best solution, but it works.
%
% \begin{macrocode}
\bbl at trace{Multiencoding strings}
\def\bbl at toglobal#1{\global\let#1#1}
-\def\bbl at recatcode#1{% TODO. Used only once?
- \@tempcnta="7F
- \def\bbl at tempa{%
- \ifnum\@tempcnta>"FF\else
- \catcode\@tempcnta=#1\relax
- \advance\@tempcnta\@ne
- \expandafter\bbl at tempa
- \fi}%
- \bbl at tempa}
% \end{macrocode}
%
% The second one. We need to patch |\@uclclist|, but it is done once
@@ -8789,7 +8743,14 @@ help from Bernd Raichle, for which I am grateful.
\@onlypreamble\StartBabelCommands
\def\StartBabelCommands{%
\begingroup
- \bbl at recatcode{11}%
+ \@tempcnta="7F
+ \def\bbl at tempa{%
+ \ifnum\@tempcnta>"FF\else
+ \catcode\@tempcnta=11
+ \advance\@tempcnta\@ne
+ \expandafter\bbl at tempa
+ \fi}%
+ \bbl at tempa
<@Macros local to BabelCommands@>
\def\bbl at provstring##1##2{%
\providecommand##1{##2}%
@@ -9119,7 +9080,7 @@ help from Bernd Raichle, for which I am grateful.
% separates these two steps.
%
% \begin{macrocode}
-\newcommand\setlocalecaption{% TODO. Catch typos. What about ensure?
+\newcommand\setlocalecaption{% TODO. Catch typos.
\@ifstar\bbl at setcaption@s\bbl at setcaption@x}
\def\bbl at setcaption@x#1#2#3{% language caption-name string
\bbl at trim@def\bbl at tempa{#2}%
diff --git a/babel.ins b/babel.ins
index 2ab5a2f..2612989 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{2022/09/25}
+\def\filedate{2022/09/30}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 5d0a375..fde44e7 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index beb8cea..c97eb79 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/09/25 v3.80.2871]
+\ProvidesFile{bbcompat.dtx}[2022/09/30 v3.80.2876]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/locale/bo/babel-tibetan.tex b/locale/bo/babel-tibetan.tex
index 6c6841f..c4663ba 100644
--- a/locale/bo/babel-tibetan.tex
+++ b/locale/bo/babel-tibetan.tex
@@ -13,17 +13,22 @@
\ifcase\bbl at engine\or
\newcommand\EnableTibetanHJ[1][1 .1 0]{%
- \babelprehyphenation{tibetan}{ [{a}{p}] | }%
+ \bbl at warning{%
+ Tibetan line breaking and justification are tentative.\\%
+ They might not work as expected and their behavior\\%
+ could change in the future. Feel free to contribute.\\%
+ Reported}%
+ \babelprehyphenation{tibetan}{[{a}{p}]|}%
{ {}, {space=#1, data=1 } }%
- \babelprehyphenation{tibetan}{ ^^^^0f0d | ^^^^0f0d }%
+ \babelprehyphenation{tibetan}{[^^^^0f0d^^^^0f0e]|[^^^^0f0d^^^^0f0e]}%
{ {}, {insert, penalty=10000}, {}, {} }%
- \babelprehyphenation{tibetan}{ ^^^^0f0b () ([^ ^^^^0f0d]) () }%
+ \babelprehyphenation{tibetan}{^^^^0f0b()([^ ^^^^0f0d^^^^0f0e])()}%
{ {insert, space=0 .0001 0, data=1}, {string = {1}} }%
\directlua{
Babel.tibetan = Babel.tibetan or {}
%
Babel.tibetan.justify_enabled = true
- Babel.tibetan.justify_factor = 1 % 0.98
+ Babel.tibetan.justify_factor = 1
%
function Babel.tibetan.justify(head)
if not Babel.tibetan.justify_enabled then return head end
More information about the latex3-commits
mailing list.