[latex3-commits] [git/LaTeX3-latex3-latex2e] gh981: code and doc for #981 (78547fd5)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Mar 28 15:29:24 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : gh981
Link       : https://github.com/latex3/latex2e/commit/78547fd5208b8ce44708cd14cee1698c8f0ad294

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

commit 78547fd5208b8ce44708cd14cee1698c8f0ad294
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Mar 28 15:29:24 2023 +0200

    code and doc for #981


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

78547fd5208b8ce44708cd14cee1698c8f0ad294
 base/changes.txt               |  5 +++++
 base/doc/ltnews37.tex          | 12 ++++++++++++
 base/ltxdoc.dtx                |  8 ++++++--
 base/testfiles/github-0981.tlg |  8 --------
 4 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index f906df49..5d1991a2 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.
 ================================================================================
 
+2023-03-28  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltxdoc.dtx (section{Options}):
+	Define \cs if doc is rolled back to v2
+
 2023-03-22  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltspace.dtx:
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 2aef7f70..c2816111 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -448,6 +448,18 @@ the previous release, but only now documented in a newletter.
 \githubissue{967}
 
 
+\subsection{Ensure that \cs{cs} is defined in \cls{ltxdoc}}
+
+The class \cls{ltxdoc} defined the command \cs{cs} to typeset a
+command name with a backslash in front. This definition was moved to
+the \pkg{doc} package itself. This meant that it was suddenly missing
+when reverting to the old \pkg{doc} package implementation via the
+class option \texttt{doc2}. This has now been corrected.
+%
+\githubissue{981}
+
+
+
 \subsection{Improve spacing at top of \env{minipages}}
 
 A list and several other document elements add some vertical space in
diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index a4ad8d21..a050b833 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
 %
 %<class>\NeedsTeXFormat{LaTeX2e}
 %<class>\ProvidesClass{ltxdoc}
-%<class>         [2022/06/22 v2.1i Standard LaTeX documentation class]
+%<class>         [2023/03/28 v2.1j Standard LaTeX documentation class]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -182,9 +182,13 @@
 %
 %    Support rolling back \pkg{doc} to version 2:
 % \changes{v2.1e}{2022/05/27}{Support rolling  back doc to version 2}
+% \changes{v2.1j}{2023/03/28}{Define \cs{cs} if doc is rolled back to v2}
 %    \begin{macrocode}
 \let\ltxdoc at doc@version\@empty  % use current version by default
-\DeclareOption{doc2}{\def\ltxdoc at doc@version{=v2}}
+\DeclareOption{doc2}{%
+  \def\ltxdoc at doc@version{=v2}%
+  \DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}%
+}
 %    \end{macrocode}
 % 
 %    \begin{macrocode}
diff --git a/base/testfiles/github-0981.tlg b/base/testfiles/github-0981.tlg
index 441b625c..bfbef442 100644
--- a/base/testfiles/github-0981.tlg
+++ b/base/testfiles/github-0981.tlg
@@ -1,10 +1,2 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-! Undefined control sequence.
-l. ...\cs
-        {abc}
-The control sequence at the end of the top line
-of your error message was never \def'ed. If you have
-misspelled it (e.g., `\hobx'), type `I' and the correct
-spelling (e.g., `I\hbox'). Otherwise just continue,
-and I'll forget about whatever was undefined.





More information about the latex3-commits mailing list.