[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: adjust ltxdoc to process existing dtx files (#842) (842eb92c)
GitHub
noreply at github.com
Sat Jun 4 21:59:20 CEST 2022
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/842eb92c8fd7015c9b8396cd00455ebd3a52a3fe
>---------------------------------------------------------------
commit 842eb92c8fd7015c9b8396cd00455ebd3a52a3fe
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Sat Jun 4 20:59:20 2022 +0100
adjust ltxdoc to process existing dtx files (#842)
* adjust ltxdoc to process existing dtx files
* change log
* providecommand
>---------------------------------------------------------------
842eb92c8fd7015c9b8396cd00455ebd3a52a3fe
base/changes.txt | 5 +++++
base/doc.dtx | 13 +++++++------
base/ltxdoc.dtx | 18 +++++++++++++++++-
3 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 6a4a6735..eddcfb1d 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.
================================================================================
+2022-06-03 David Carlisle <David.Carlisle at latex-project.org>
+
+ * doc.dtx: adjust ltxdoc.cls and doc.dtx to process existing
+ use of L3 names and \pkg in base dtx files
+
2022-06-02 David Carlisle <David.Carlisle at latex-project.org>
* ltfinal.dtx: add \NoCaseChange (previously available in the
diff --git a/base/doc.dtx b/base/doc.dtx
index f86573a9..dbd1424e 100644
--- a/base/doc.dtx
+++ b/base/doc.dtx
@@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2022/06/01 v3.0i
+%<+package|shortvrb> [2022/06/02 v3.0j
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -146,11 +146,12 @@
%
% \newcommand{\DOC}{\texttt{doc}\xspace}
%
-% \newcommand\env{\texttt}
-% \newcommand\opt{\texttt}
-% \newcommand\cls{\texttt}
-% \newcommand\pkg{\texttt}
-% \newcommand\prg{\textsf}
+% \changes{v3.0j}{2022/06/02}{Use \cs{providecommand} to define \cs{pkg}}
+% \providecommand\env{\texttt}
+% \providecommand\opt{\texttt}
+% \providecommand\cls{\texttt}
+% \providecommand\pkg{\texttt}
+% \providecommand\prg{\textsf}
%
% \newcommand\DOX{\env{DoX}\xspace}
% \newcommand\api{\textsc{api}\xspace}
diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index 8e5fcf3e..4d854728 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
-%<class> [2022/05/27 v2.1e Standard LaTeX documentation class]
+%<class> [2022/06/03 v2.1f Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
@@ -631,6 +631,22 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% \begin{macrocode}
\def\task#1#2{}
+% \end{macrocode}
+% \changes{v2.1f}{2022/06/03}{define \cs{pkg} and other commands}
+% \changes{v2.1f}{2022/06/03}{allow \_ in macro names}
+% Some feaures from l3doc.cls
+% \begin{macrocode}
+\providecommand\LuaTeX{Lua\TeX}
+\providecommand\cls{\textsf}
+\providecommand\pkg{\textsf}
+\providecommand\enquote[1]{``#1''}
+\DeclareRobustCommand\cs[1]{\texttt{\bslash\detokenize{#1}}}%
+\AtBeginDocument{%
+ \renewcommand\PrintMacroName[1]{\MacroFont\detokenize{#1}}%
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
%</class>
% \end{macrocode}
%
More information about the latex3-commits
mailing list.