[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Gh981 (#1025) (8a92c373)

GitHub noreply at github.com
Wed Mar 29 11:22:50 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/8a92c37386ca534085934174473de77c0378be1b

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

commit 8a92c37386ca534085934174473de77c0378be1b
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Mar 29 11:22:50 2023 +0200

    Gh981 (#1025)
    
    * test for #981
    
    * code and doc for #981


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

8a92c37386ca534085934174473de77c0378be1b
 base/changes.txt                                            |  5 +++++
 base/doc/ltnews37.tex                                       | 12 ++++++++++++
 base/ltxdoc.dtx                                             |  8 ++++++--
 base/testfiles/github-0981.lvt                              | 13 +++++++++++++
 .../github-0401.tlg => testfiles/github-0981.tlg}           |  0
 5 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index fd6eec48..f9ad2a92 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 (gh/981)
+
 2023-03-28  David Carlisle  <David.Carlisle at latex-project.org>
 
 	* ltfinal.dtx: Restore groups to \MakeUppercase and
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 2b2eab1b..de478305 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -457,6 +457,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..e147c9d2 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 (gh/981)}
 %    \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.lvt b/base/testfiles/github-0981.lvt
new file mode 100644
index 00000000..638c05cb
--- /dev/null
+++ b/base/testfiles/github-0981.lvt
@@ -0,0 +1,13 @@
+
+\documentclass[doc2]{ltxdoc}
+
+\input{regression-test}
+
+\begin{document}
+
+\START
+
+\cs{abc}
+
+\OMIT
+\end{document}
diff --git a/base/testfiles-lthooks/github-0401.tlg b/base/testfiles/github-0981.tlg
similarity index 100%
copy from base/testfiles-lthooks/github-0401.tlg
copy to base/testfiles/github-0981.tlg





More information about the latex3-commits mailing list.