[latex3-commits] [git/LaTeX3-latex3-latex2e] gh881: ensure arguments are always grabbed and braced (50d648f4)

David Carlisle d.p.carlisle at gmail.com
Fri Jul 1 10:45:54 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh881
Link       : https://github.com/latex3/latex2e/commit/50d648f4c72abcd85422219669a0ea4e2f99107d

>---------------------------------------------------------------

commit 50d648f4c72abcd85422219669a0ea4e2f99107d
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Fri Jul 1 09:45:54 2022 +0100

    ensure arguments are always grabbed and braced


>---------------------------------------------------------------

50d648f4c72abcd85422219669a0ea4e2f99107d
 base/ltfinal.dtx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 105833ea..9859b279 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -1093,8 +1093,8 @@
 %    then the uppercasing is only done to the first letter of the
 %    contents name, since the mark expands out to:
 %\begin{verbatim}
-%    \mark{\protect\MakeUppercase Table of Contents}
-%         {\protect\MakeUppercase Table of Contents}
+%    \mark{\MakeUppercase Table of Contents}
+%         {\MakeUppercase Table of Contents}
 %\end{verbatim}
 %    In order to get round this, we redefine |\MakeUppercase| and
 % |\MakeLowercase| to grab their argument and brace it. 
@@ -1105,8 +1105,10 @@
 % functions.
 %    \begin{macrocode}
 \ExplSyntaxOn
-\protected\def\MakeUppercase#1{\text_uppercase:n{#1}}
-\protected\def\MakeLowercase#1{\text_lowercase:n{#1}}
+\cs_new_protected_nopar:cpn{MakeUppercase~}{\text_uppercase:n}
+\cs_set_nopar:Npx\MakeUppercase#1{\use:c{MakeUppercase~}{#1}}
+\cs_new_protected_nopar:cpn{MakeLowercase~}{\text_lowercase:n}
+\cs_set_nopar:Npx\MakeLowercase#1{\use:c{MakeLowercase~}{#1}}
 %    \end{macrocode}
 %
 % \changes{v2.2u}{2022/06/02}{Add \cs{NoCaseChange}}





More information about the latex3-commits mailing list.