[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/ltxdoc: fix for #874 (2bae2d95)
Frank Mittelbach
frank.mittelbach at latex-project.org
Thu Jun 23 19:00:55 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : hotfix/ltxdoc
Link : https://github.com/latex3/latex2e/commit/2bae2d95b92510918658eac24ae08e169e80cd92
>---------------------------------------------------------------
commit 2bae2d95b92510918658eac24ae08e169e80cd92
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Thu Jun 23 19:00:55 2022 +0200
fix for #874
>---------------------------------------------------------------
2bae2d95b92510918658eac24ae08e169e80cd92
base/changes.txt | 5 +++++
base/ltxdoc.dtx | 8 +++++---
base/testfiles/github-0874.lvt | 14 ++++++++++++++
base/testfiles/github-0874.tlg | 39 +++++++++++++++++++++++++++++++++++++++
4 files changed, 63 insertions(+), 3 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 061d7282..9cfc2333 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,6 +10,11 @@ are not part of the distribution.
All changes above are only part of the development branch for the next release.
================================================================================
+2022-06-23 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltxdoc.dtx (section{Useful abbreviations}):
+ Update \cmd definition to work with new \cs (gh/874)
+
#########################
# 2022-06-01 PL2 Release
#########################
diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index f68c45ee..46c324c5 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2022/06/14 v2.1g Standard LaTeX documentation class]
+%<class> [2022/06/22 v2.1h Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -294,10 +294,12 @@
% \changes{v2.0k}{1994/05/21}{New definition, so \cmd\{ works.}
% \begin{macro}{\cs}
% \changes{v2.0d}{1994/03/17}{Add \cs{cs}}
+% \changes{v2.1h}{2022/06/22}{Update \cs{cmd} definition to work with new \cs{cs}}
% \begin{macrocode}
-\def\cmd#1{\cs{\expandafter\cmd at to@cs\string#1}}
+%\DeclareRobustCommand\cs[1]... % defined later
+%\def\cmd#1{\cs{\expandafter\cmd at to@cs\string#1}} % can't use with new \cs
+\def\cmd#1{\texttt{\char`\\\expandafter\cmd at to@cs\string#1}}
\def\cmd at to@cs#1#2{\char\number`#2\relax}
-%\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} % already part of doc.sty
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/base/testfiles/github-0874.lvt b/base/testfiles/github-0874.lvt
new file mode 100644
index 00000000..667d4046
--- /dev/null
+++ b/base/testfiles/github-0874.lvt
@@ -0,0 +1,14 @@
+\documentclass[nohyperref]{ltxdoc}
+
+\input{regression-test}
+
+\showoutput
+
+\begin{document}
+
+\START
+
+\cmd{\blub}
+
+\end{document}
+
diff --git a/base/testfiles/github-0874.tlg b/base/testfiles/github-0874.tlg
new file mode 100644
index 00000000..bf7432a2
--- /dev/null
+++ b/base/testfiles/github-0874.tlg
@@ -0,0 +1,39 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(682.0+0.0)x428.0
+.\hbox(0.0+0.0)x0.0
+.\glue 17.0
+.\vbox(665.0+0.0)x355.0, shifted 73.0
+..\vbox(12.0+0.0)x355.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x355.0
+....\hbox(0.0+0.0)x355.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x355.0, glue set 587.9372fil
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.8333)x355.0, glue set 313.75023fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 b
+....\OT1/cmtt/m/n/10 l
+....\OT1/cmtt/m/n/10 u
+....\OT1/cmtt/m/n/10 b
+....\kern 0.0
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue -0.8333
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x355.0
+...\hbox(6.44444+0.0)x355.0, glue set 175.0fil
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+.\kern 0.0
+(github-0874.aux)
More information about the latex3-commits
mailing list.