[latex3-commits] [git/LaTeX3-latex3-latex2e] gh665: guard # in text font commands (2ce674e4)
David Carlisle
d.p.carlisle at gmail.com
Sun Sep 12 18:15:36 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : gh665
Link : https://github.com/latex3/latex2e/commit/2ce674e42cbafbbdbaa9fb4bb112a7ed4bea1599
>---------------------------------------------------------------
commit 2ce674e42cbafbbdbaa9fb4bb112a7ed4bea1599
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Sun Sep 12 17:15:36 2021 +0100
guard # in text font commands
>---------------------------------------------------------------
2ce674e42cbafbbdbaa9fb4bb112a7ed4bea1599
base/changes.txt | 4 ++++
base/ltfntcmd.dtx | 5 +++--
base/testfiles/github-0665.lvt | 14 ++++++++++++++
base/testfiles/{github-0060.luatex.tlg => github-0665.tlg} | 0
4 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 25196800..ac013b6a 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,10 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-09-12 David Carlisle <David.Carlisle at latex-project.org>
+
+ * ltfntcmd.dtx: guard definition in \text at command with \unexpanded \gh/665
+
2021-09-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltfssini.dtx:
diff --git a/base/ltfntcmd.dtx b/base/ltfntcmd.dtx
index 5f70053a..6c4ec4b3 100644
--- a/base/ltfntcmd.dtx
+++ b/base/ltfntcmd.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfntcmd.dtx}
- [2020/12/05 v3.4c LaTeX Kernel (Font commands)]
+ [2021/09/12 v3.5a LaTeX Kernel (Font commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfntcmd.dtx}
@@ -466,9 +466,10 @@
% Is this the correct action in the `empty' case? It is efficient but
% typographically it is, strictly, incorrect!
% \changes{v3.3l}{1994/06/18}{Added check for empty text}
+% \changes{v3.5a}{2021/09/12}{use \cs{unexpanded} to make \# safe}
% \begin{macrocode}
\def \text at command #1{%
- \def \reserved at a {#1}%
+ \edef \reserved at a {\unexpanded{#1}}%
\ifx \reserved at a \@empty
\let \check at icl \@empty
\let \check at icr \@empty
diff --git a/base/testfiles/github-0665.lvt b/base/testfiles/github-0665.lvt
new file mode 100644
index 00000000..05df9ad6
--- /dev/null
+++ b/base/testfiles/github-0665.lvt
@@ -0,0 +1,14 @@
+
+\documentclass{article}
+
+\input{test2e}
+
+\begin{document}
+
+\START
+\ExplSyntaxOn
+\int_step_inline:nn { 1 } {#1} % works fine
+\textbf { \int_step_inline:nn { 1 } {#1} } % should not error
+\ExplSyntaxOff
+
+\END
\ No newline at end of file
diff --git a/base/testfiles/github-0060.luatex.tlg b/base/testfiles/github-0665.tlg
similarity index 100%
copy from base/testfiles/github-0060.luatex.tlg
copy to base/testfiles/github-0665.tlg
More information about the latex3-commits
mailing list.