[latex3-commits] [git/LaTeX3-latex3-latex2e] gh838: NoCaseChange (c3832778)
David Carlisle
d.p.carlisle at gmail.com
Thu Jun 2 15:17:24 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : gh838
Link : https://github.com/latex3/latex2e/commit/c383277817355dacfddd61e1bf45a28568730dca
>---------------------------------------------------------------
commit c383277817355dacfddd61e1bf45a28568730dca
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Thu Jun 2 14:17:24 2022 +0100
NoCaseChange
>---------------------------------------------------------------
c383277817355dacfddd61e1bf45a28568730dca
base/changes.txt | 5 +++++
base/doc/ltnews35.tex | 2 +-
base/ltfinal.dtx | 19 ++++++++++++++-----
base/testfiles/github-0838.lvt | 12 ++++++++++++
base/testfiles/github-0838.tlg | 16 ++++++++++++++++
5 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 59966cb8..e267d0f7 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2022-06-02 David Carlisle <David.Carlisle at latex-project.org>
+
+ * ltfinal.dtx: add \NoCaseChange (previously available in the
+ textcase package)
+
2022-05-27 David Carlisle <David.Carlisle at latex-project.org>
* ltfiles.dtx, ltoutenc.dtx:
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index cdefa8e2..0e0cda79 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -519,7 +519,7 @@ layer \texttt{e} and \texttt{x} arguments.
Related to this change \cs{MakeUppercase} and \cs{MakeLowercase} have
been updated to use the Unicode-aware case changing functions
\cs{text\string_lowercase:n} in place of the \TeX\ primitive \cs{lowercase}.
-A similar change will be made in the \pkg{textcase} package.
+The \cs{NoCaseChange} command from the \pkg{textcase} package has also been added.
Note: for technical reasons these low-level character handling changes
will not be rolled back if the format version is rolled back using the
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 5857e6cf..b1b8ff95 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2022/04/21 v2.2t LaTeX Kernel (Final Settings)]
+ [2022/06/02 v2.2u LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -273,9 +273,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{trace_stack_levels}
+% \begin{macro}{trace\string_stack\string_levels}
% Now define the Lua function to emulate \cs{tracingstacklevels} and
-% install it in the \texttt{input_level_string} callback.
+% install it in the |input_level_string| callback.
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
@@ -1064,6 +1064,7 @@
%
% \begin{macro}{\MakeUppercase}
% \begin{macro}{\MakeUppercase}
+% \begin{macro}{\NoCaseChange}
% \begin{macro}{\@uclclist}
% \begin{macro}{\@expl at text@lowercase@@n}
% \begin{macro}{\@expl at text@uppercase@@n}
@@ -1091,10 +1092,17 @@
\ExplSyntaxOn
\protected\def\@expl at text@lowercase@@n{\text_lowercase:n}
\protected\def\@expl at text@uppercase@@n{\text_uppercase:n}
+% \end{macrocode}
+%
+% \changes{v2.2u}{2022/06/02}{Add \cs{NoCaseChange}}
+% |\NoCaseChange| protects its argument from the case change functions.
+% \begin{macrocode}
+\tl_put_right:Nn \l_text_case_exclude_arg_tl { \NoCaseChange }
+\cs_new_protected:Npn \NoCaseChange #1 {#1}
\ExplSyntaxOff
% \end{macrocode}
-
-%% \begin{macrocode}
+%
+% \begin{macrocode}
\DeclareRobustCommand{\MakeUppercase}[1]{{%
\def\i{I}\def\j{J}%
\def\reserved at a##1##2{\let##1##2\reserved at a}%
@@ -1151,6 +1159,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \changes{v1.0h}{1994/05/13}{Added output enc stuff}
% \changes{v1.0i}{1994/05/16}{moved output enc stuff to lfonts}
diff --git a/base/testfiles/github-0838.lvt b/base/testfiles/github-0838.lvt
new file mode 100644
index 00000000..3caa80a3
--- /dev/null
+++ b/base/testfiles/github-0838.lvt
@@ -0,0 +1,12 @@
+\documentclass{article}
+
+\input{test2e}
+% adding \NoCaseChange
+
+\begin{document}
+
+\sbox0{\MakeUppercase{abc \NoCaseChange{lll}xyz}}
+
+\START
+\showbox0
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0838.tlg b/base/testfiles/github-0838.tlg
new file mode 100644
index 00000000..26f2717d
--- /dev/null
+++ b/base/testfiles/github-0838.tlg
@@ -0,0 +1,16 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+> \box...=
+\hbox(6.94444+0.0)x54.58344
+.\OT1/cmr/m/n/10 A
+.\OT1/cmr/m/n/10 B
+.\OT1/cmr/m/n/10 C
+.\glue 3.33333 plus 1.66498 minus 1.11221
+.\OT1/cmr/m/n/10 l
+.\OT1/cmr/m/n/10 l
+.\OT1/cmr/m/n/10 l
+.\OT1/cmr/m/n/10 X
+.\OT1/cmr/m/n/10 Y
+.\OT1/cmr/m/n/10 Z
+! OK.
+l. ...\showbox0
More information about the latex3-commits
mailing list.