[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/babel/gh189: Set \oe/\OE equal during case changing (156bae1d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Nov 30 14:33:21 CET 2022
Repository : https://github.com/latex3/latex2e
On branch : hotfix/babel/gh189
Link : https://github.com/latex3/latex2e/commit/156bae1d7f18bb93710f9aa7676100896b52acf1
>---------------------------------------------------------------
commit 156bae1d7f18bb93710f9aa7676100896b52acf1
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Nov 30 13:01:46 2022 +0000
Set \oe/\OE equal during case changing
This is currently needed by babel to support \today.
>---------------------------------------------------------------
156bae1d7f18bb93710f9aa7676100896b52acf1
base/changes.txt | 6 ++++++
base/ltfinal.dtx | 28 ++++++++++++++++++++++++----
base/testfiles/github-0881a.tlg | 3 ++-
3 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 0ae9b55c..2084141c 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,6 +10,12 @@ are not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================
+2022-11-30 Joseph Wright <Joseph.Wright at latex-project.org>
+
+ * ltfinal.dtx:
+ Set \oe and \OE equal in case changing to allow detection
+ by babel
+
#########################
# 2022-11-01 Release
#########################
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 7f4bef3b..3338d3ea 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2022/10/26 v2.2x LaTeX Kernel (Final Settings)]
+ [2022/11/30 v2.2y LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1144,6 +1144,7 @@
}
\exp_args_generate:n { cnx }
% \end{macrocode}
+% \changes{v2.2y}{2022/11/30}{Set \cs{oe}/\cs{OE} equal to act as a marker for \pkg{babel}}
% The odd use of \emph{three} spaces here is needed as \pkg{ltcmd} uses the
% name with one and two spaces to give a `friendly' error message for a runaway
% argument: that means we can't use it here.
@@ -1151,9 +1152,7 @@
\cs_set_protected:Npn \reserved at a #1
{
\cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
- \cs_new_protected:cpx { Make#1case \c_space_tl \c_space_tl \c_space_tl } [##1] ##2
- { \exp_not:N \@@text at case@aux { \str_lowercase:n {#1} } {##1} {##2} }
- \ExpandArgs { cnx } \NewExpandableDocumentCommand
+ \ExpandArgs { cnx } \NewExpandableDocumentCommand
{ Make#1case }
{ O{} +m }
{ \exp_not:c { Make#1case \c_space_tl \c_space_tl \c_space_tl } [####1] {####2} }
@@ -1161,6 +1160,27 @@
\reserved at a { Upper }
\reserved at a { Lower }
\reserved at a { Title }
+\cs_new_protected:cpn { MakeLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel at saved@OE \OE
+ \let \OE \oe
+ \@@text at case@aux { lower } {#1} {#2}
+ \let \OE \kernel at saved@OE
+ }
+\cs_new_protected:cpn { MakeUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel at saved@oe \oe
+ \let \oe \OE
+ \@@text at case@aux { upper } {#1} {#2}
+ \let \oe \kernel at saved@oe
+ }
+\cs_new_protected:cpn { MakeTitlecase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {
+ \let \kernel at saved@oe \oe
+ \let \oe \OE
+ \@@text at case@aux { title } {#1} {#2}
+ \let \oe \kernel at saved@oe
+ }
% \end{macrocode}
%
% \changes{v2.2u}{2022/06/02}{Add \cs{NoCaseChange}}
diff --git a/base/testfiles/github-0881a.tlg b/base/testfiles/github-0881a.tlg
index 5b15bc7f..4f027ce6 100644
--- a/base/testfiles/github-0881a.tlg
+++ b/base/testfiles/github-0881a.tlg
@@ -5,7 +5,7 @@ LaTeX Font Info: External font `cmex10' loaded for size
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
> \box...=
-\hbox(7.5+2.5)x96.0279
+\hbox(7.5+2.5)x99.36122
.\OT1/cmr/m/n/10 X
.\OT1/cmr/m/n/10 Y
.\OT1/cmr/m/n/10 Z
@@ -25,6 +25,7 @@ LaTeX Font Info: External font `cmex10' loaded for size
.\write1{\newlabel{lower}{{1}{\thepage }}}
.\penalty 10000
.\glue 0.0
+.\glue 3.33333 plus 1.66666 minus 1.11111
.\OT1/cmr/m/n/10 s
.\OT1/cmr/m/n/10 e
.\OT1/cmr/m/n/10 e
More information about the latex3-commits
mailing list.