[latex3-commits] [git/LaTeX3-latex3-babel] main: Fix #138 (and use \@fontenc at load@list). (4969492)
Javier
email at dante.de
Wed Jul 7 17:41:49 CEST 2021
Repository : https://github.com/latex3/babel
On branch : main
Link : https://github.com/latex3/babel/commit/4969492b424c57371cce33e10b2b941b40af405b
>---------------------------------------------------------------
commit 4969492b424c57371cce33e10b2b941b40af405b
Author: Javier <email at localhost>
Date: Wed Jul 7 17:41:49 2021 +0200
Fix #138 (and use \@fontenc at load@list).
>---------------------------------------------------------------
4969492b424c57371cce33e10b2b941b40af405b
README.md | 3 ++-
babel.dtx | 82 ++++++++++++++++++++++++++---------------------------------
babel.ins | 2 +-
babel.pdf | Bin 849943 -> 848361 bytes
bbcompat.dtx | 2 +-
5 files changed, 40 insertions(+), 49 deletions(-)
diff --git a/README.md b/README.md
index ce834c6..54a889d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Babel 3.61.2424
+## Babel 3.61.2426
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -50,6 +50,7 @@ respective authors.
* No more errors with unknown languages in aux file.
* Fixes:
- Locale dependent quotes with CJK (#131).
+ - Babel and hyperref prevent changes to the \LaTeX logo (#138).
3.61 2021-06-28
* Improved justification=kashida/elongated: hboxes (lua).
diff --git a/babel.dtx b/babel.dtx
index 589881b..a277fa9 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2021/07/05 v3.61.2424 The Babel package]
+\ProvidesFile{babel.dtx}[2021/07/07 v3.61.2426 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.2424>>
-%<<date=2021/07/05>>
+%<<version=3.61.2426>>
+%<<date=2021/07/07>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -6342,52 +6342,46 @@ help from Bernd Raichle, for which I am grateful.
%
% Because documents may use non-ASCII font encodings, we make sure
% that the logos of \TeX\ and \LaTeX\ always come out in the right
-% encoding. There is a list of non-ASCII encodings. Unfortunately,
-% \textsf{fontenc} deletes its package options, so we must guess which
-% encodings has been loaded by traversing |\@filelist| to search for
-% \m{enc}|enc.def|. If a non-ASCII has been loaded, we define versions
-% of |\TeX| and |\LaTeX| for them using |\ensureascii|. The default
-% ASCII encoding is set, too (in reverse order): the ``main'' encoding
-% (when the document begins), the last loaded, or |OT1|.
+% encoding. There is a list of non-ASCII encodings. Requested
+% encodings are currently stored in |\@fontenc at load@list|. If a
+% non-ASCII has been loaded, we define versions of |\TeX| and |\LaTeX|
+% for them using |\ensureascii|. The default ASCII encoding is set,
+% too (in reverse order): the ``main'' encoding (when the document
+% begins), the last loaded, or |OT1|.
%
% \begin{macro}{\ensureascii}
%
% \begin{macrocode}
\bbl at trace{Encoding and fonts}
-\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU,PU,PD1}
+\newcommand\BabelNonASCII{LGR,X2,OT2,OT3,OT6,LHE,LWN,LMA,LMC,LMS,LMU}
\newcommand\BabelNonText{TS1,T3,TS3}
\let\org at TeX\TeX
\let\org at LaTeX\LaTeX
\let\ensureascii\@firstofone
\AtBeginDocument{%
- \in at false
- \bbl at foreach\BabelNonASCII{% is there a text non-ascii enc?
- \ifin@\else
- \lowercase{\bbl at xin@{,#1enc.def,}{,\@filelist,}}%
+ \def\@elt#1{,#1,}%
+ \edef\bbl at tempa{\expandafter\@gobbletwo\@fontenc at load@list}%
+ \let\@elt\relax
+ \let\bbl at tempb\@empty
+ \def\bbl at tempc{OT1}%
+ \bbl at foreach\bbl at tempa{%
+ \bbl at xin@{#1}{\BabelNonASCII}%
+ \ifin@
+ \def\bbl at tempb{#1}% Store last non-ascii
+ \else\bbl at xin@{#1}{\BabelNonText}% Pass
+ \ifin@\else
+ \def\bbl at tempc{#1}% Store last ascii
+ \fi
\fi}%
- \ifin@ % if a text non-ascii has been loaded
- \def\ensureascii#1{{\fontencoding{OT1}\selectfont#1}}%
- \DeclareTextCommandDefault{\TeX}{\org at TeX}%
- \DeclareTextCommandDefault{\LaTeX}{\org at LaTeX}%
- \def\bbl at tempb#1\@@{\uppercase{\bbl at tempc#1}ENC.DEF\@empty\@@}%
- \def\bbl at tempc#1ENC.DEF#2\@@{%
- \ifx\@empty#2\else
- \bbl at ifunset{T@#1}%
- {}%
- {\bbl at xin@{,#1,}{,\BabelNonASCII,\BabelNonText,}%
- \ifin@
- \DeclareTextCommand{\TeX}{#1}{\ensureascii{\org at TeX}}%
- \DeclareTextCommand{\LaTeX}{#1}{\ensureascii{\org at LaTeX}}%
- \else
- \def\ensureascii##1{{\fontencoding{#1}\selectfont##1}}%
- \fi}%
- \fi}%
- \bbl at foreach\@filelist{\bbl at tempb#1\@@}% TODO - \@@ de mas??
+ \ifx\bbl at tempb\@empty\else
\bbl at xin@{,\cf at encoding,}{,\BabelNonASCII,\BabelNonText,}%
\ifin@\else
- \edef\ensureascii#1{{%
- \noexpand\fontencoding{\cf at encoding}\noexpand\selectfont#1}}%
+ \edef\bbl at tempc{\cf at encoding}% The default if ascii wins
\fi
+ \edef\ensureascii#1{%
+ {\noexpand\fontencoding{\bbl at tempc}\noexpand\selectfont#1}}%
+ \DeclareTextCommandDefault{\TeX}{\ensureascii{\org at TeX}}%
+ \DeclareTextCommandDefault{\LaTeX}{\ensureascii{\org at LaTeX}}%
\fi}
% \end{macrocode}
%
@@ -6429,16 +6423,12 @@ help from Bernd Raichle, for which I am grateful.
\ifx\cf at encoding\bbl at t@one
\xdef\latinencoding{\bbl at t@one}%
\else
- \ifx\@fontenc at load@list\@undefined
- \@ifl at aded{def}{t1enc}{\xdef\latinencoding{\bbl at t@one}}{}%
- \else
- \def\@elt#1{,#1,}%
- \edef\bbl at tempa{\expandafter\@gobbletwo\@fontenc at load@list}%
- \let\@elt\relax
- \bbl at xin@{,T1,}\bbl at tempa
- \ifin@
- \xdef\latinencoding{\bbl at t@one}%
- \fi
+ \def\@elt#1{,#1,}%
+ \edef\bbl at tempa{\expandafter\@gobbletwo\@fontenc at load@list}%
+ \let\@elt\relax
+ \bbl at xin@{,T1,}\bbl at tempa
+ \ifin@
+ \xdef\latinencoding{\bbl at t@one}%
\fi
\fi}}
% \end{macrocode}
@@ -12794,7 +12784,7 @@ help from Bernd Raichle, for which I am grateful.
\ExplSyntaxOn
\catcode`\ =10
\def\bbl at loadfontspec{%
- \usepackage{fontspec}%
+ \usepackage{fontspec}% TODO. Apply patch always
\expandafter
\def\csname msg~text~>~fontspec/language-not-exist\endcsname##1##2##3##4{%
Font '\l_fontspec_fontname_tl' is using the\\%
diff --git a/babel.ins b/babel.ins
index a4ffc04..89aa72b 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/05}
+\def\filedate{2021/07/07}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/babel.pdf b/babel.pdf
index 29b6321..8c08825 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 52e006c..4140f98 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2021/07/05 v3.61.2424]
+\ProvidesFile{bbcompat.dtx}[2021/07/07 v3.61.2426]
%</dtx>
%
%% File 'bbcompat.dtx'
More information about the latex3-commits
mailing list.