[latex3-commits] [git/LaTeX3-latex3-latex2e] gh962: tmp fix for #962 (7389e1c6)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Nov 26 11:12:25 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh962
Link       : https://github.com/latex3/latex2e/commit/7389e1c614f996dd021ee8c23595fdff6b934aba

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

commit 7389e1c614f996dd021ee8c23595fdff6b934aba
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Nov 26 11:12:25 2022 +0100

    tmp fix for #962


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

7389e1c614f996dd021ee8c23595fdff6b934aba
 base/ltxdoc.dtx                                    |   2 +-
 base/testfiles-lthooks/ltcmdhooks-001.tlg          |   1 +
 base/testfiles-lthooks/lthooks-000.tlg             |   1 +
 base/testfiles-lthooks/lthooks-001.tlg             |   3 +
 base/testfiles-lthooks/lthooks-002.tlg             |   3 +
 base/testfiles-lthooks/lthooks-003.tlg             |   2 +
 base/testfiles-lthooks/lthooks-004.tlg             |   2 +
 base/testfiles-lthooks/lthooks-005.tlg             |   2 +
 base/testfiles-lthooks/lthooks-006.tlg             |   2 +
 base/testfiles-lthooks/lthooks-007.tlg             |   3 +
 base/testfiles-lthooks/lthooks-008.tlg             |   2 +
 base/testfiles-lthooks/lthooks-009.tlg             |   1 +
 base/testfiles-lthooks/lthooks-011.tlg             |   4 +
 base/testfiles-lthooks/lthooks-013.tlg             |   1 +
 base/testfiles-lthooks/lthooks-021.tlg             |   1 +
 base/testfiles-lthooks/lthooks-legacy.tlg          |   1 +
 base/testfiles-lthooks2/lthooks2-002.tlg           |   1 +
 base/testfiles-lthooks2/lthooks2-005.tlg           |   2 +
 base/testfiles/github-0962b.lvt                    |  38 +++++
 base/testfiles/github-0962b.tlg                    | 189 +++++++++++++++++++++
 required/firstaid/changes.txt                      |   5 +
 .../latex2e-first-aid-for-external-files.dtx       |  26 ++-
 22 files changed, 287 insertions(+), 5 deletions(-)

diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index 46c324c5..4c3aa739 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -633,7 +633,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
 %
 % \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
+% Some features from l3doc.cls
 % \changes{v2.1g}{2022/06/14}{define \cs{pkg} but delay until begin document}
 %    \begin{macrocode}
 \DeclareRobustCommand\cs[1]{\texttt{\bslash\detokenize{#1}}}%
diff --git a/base/testfiles-lthooks/ltcmdhooks-001.tlg b/base/testfiles-lthooks/ltcmdhooks-001.tlg
index f69eef81..f06ed0ab 100644
--- a/base/testfiles-lthooks/ltcmdhooks-001.tlg
+++ b/base/testfiles-lthooks/ltcmdhooks-001.tlg
@@ -182,6 +182,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-000.tlg b/base/testfiles-lthooks/lthooks-000.tlg
index cd010532..a6ee34fe 100644
--- a/base/testfiles-lthooks/lthooks-000.tlg
+++ b/base/testfiles-lthooks/lthooks-000.tlg
@@ -122,6 +122,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-001.tlg b/base/testfiles-lthooks/lthooks-001.tlg
index 13090a78..a5d91291 100644
--- a/base/testfiles-lthooks/lthooks-001.tlg
+++ b/base/testfiles-lthooks/lthooks-001.tlg
@@ -128,6 +128,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -217,6 +218,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 Update code for hook 'para/before' on input line ...:
@@ -341,6 +343,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-002.tlg b/base/testfiles-lthooks/lthooks-002.tlg
index 8d87e1e1..078e8481 100644
--- a/base/testfiles-lthooks/lthooks-002.tlg
+++ b/base/testfiles-lthooks/lthooks-002.tlg
@@ -128,6 +128,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -219,6 +220,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 Update code for hook 'para/before' on input line ...:
@@ -343,6 +345,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-003.tlg b/base/testfiles-lthooks/lthooks-003.tlg
index ce888b43..3ee7234b 100644
--- a/base/testfiles-lthooks/lthooks-003.tlg
+++ b/base/testfiles-lthooks/lthooks-003.tlg
@@ -73,6 +73,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 The hook xxx contains the rules:
@@ -208,6 +209,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-004.tlg b/base/testfiles-lthooks/lthooks-004.tlg
index 0f01787d..76a9e436 100644
--- a/base/testfiles-lthooks/lthooks-004.tlg
+++ b/base/testfiles-lthooks/lthooks-004.tlg
@@ -63,6 +63,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 The hook xxx contains the rules:
@@ -192,6 +193,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-005.tlg b/base/testfiles-lthooks/lthooks-005.tlg
index 9a186d92..504b20ed 100644
--- a/base/testfiles-lthooks/lthooks-005.tlg
+++ b/base/testfiles-lthooks/lthooks-005.tlg
@@ -80,6 +80,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 The hook xxx contains the rules:
@@ -215,6 +216,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-006.tlg b/base/testfiles-lthooks/lthooks-006.tlg
index 8cc27db4..2bda2c55 100644
--- a/base/testfiles-lthooks/lthooks-006.tlg
+++ b/base/testfiles-lthooks/lthooks-006.tlg
@@ -61,6 +61,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 The hook xxx contains the rules:
@@ -188,6 +189,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-007.tlg b/base/testfiles-lthooks/lthooks-007.tlg
index 4c06114e..846a566e 100644
--- a/base/testfiles-lthooks/lthooks-007.tlg
+++ b/base/testfiles-lthooks/lthooks-007.tlg
@@ -61,6 +61,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}
 >  {xxx}.
 The hook xxx contains the rules:
@@ -189,6 +190,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -346,6 +348,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-008.tlg b/base/testfiles-lthooks/lthooks-008.tlg
index bd1fe551..128d3424 100644
--- a/base/testfiles-lthooks/lthooks-008.tlg
+++ b/base/testfiles-lthooks/lthooks-008.tlg
@@ -63,6 +63,7 @@ The sequence \g__hook_all_seq contains the items (without outer braces):
 >  {file/ngerman.sty/after}
 >  {file/memoir.cls/before}
 >  {file/memoir.cls/after}
+>  {class/ltxdoc/after}
 >  {file/l3graphics.sty/after}.
 The hook enddocument contains the rules:
 Update code for hook 'para/before' on input line ...:
@@ -196,6 +197,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-009.tlg b/base/testfiles-lthooks/lthooks-009.tlg
index b0b0d668..66ff45a5 100644
--- a/base/testfiles-lthooks/lthooks-009.tlg
+++ b/base/testfiles-lthooks/lthooks-009.tlg
@@ -128,6 +128,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-011.tlg b/base/testfiles-lthooks/lthooks-011.tlg
index 13186602..434df543 100644
--- a/base/testfiles-lthooks/lthooks-011.tlg
+++ b/base/testfiles-lthooks/lthooks-011.tlg
@@ -123,6 +123,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -278,6 +279,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -435,6 +437,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -594,6 +597,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-013.tlg b/base/testfiles-lthooks/lthooks-013.tlg
index cf1b5cb4..f014e36a 100644
--- a/base/testfiles-lthooks/lthooks-013.tlg
+++ b/base/testfiles-lthooks/lthooks-013.tlg
@@ -178,6 +178,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-021.tlg b/base/testfiles-lthooks/lthooks-021.tlg
index dcb39abe..2b015e55 100644
--- a/base/testfiles-lthooks/lthooks-021.tlg
+++ b/base/testfiles-lthooks/lthooks-021.tlg
@@ -122,6 +122,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks/lthooks-legacy.tlg b/base/testfiles-lthooks/lthooks-legacy.tlg
index 332f5aca..2e1d47bd 100644
--- a/base/testfiles-lthooks/lthooks-legacy.tlg
+++ b/base/testfiles-lthooks/lthooks-legacy.tlg
@@ -147,6 +147,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks2/lthooks2-002.tlg b/base/testfiles-lthooks2/lthooks2-002.tlg
index 1beec6b2..5798246e 100644
--- a/base/testfiles-lthooks2/lthooks2-002.tlg
+++ b/base/testfiles-lthooks2/lthooks2-002.tlg
@@ -136,6 +136,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles-lthooks2/lthooks2-005.tlg b/base/testfiles-lthooks2/lthooks2-005.tlg
index 3a7fd5d7..fec7b7df 100644
--- a/base/testfiles-lthooks2/lthooks2-005.tlg
+++ b/base/testfiles-lthooks2/lthooks2-005.tlg
@@ -123,6 +123,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
@@ -266,6 +267,7 @@ Code labels for sorting:
 Data structure for label rules:
  firstaid = 0 -> 
 Handled code for firstaid
+Update code for hook 'class/ltxdoc/after' on input line ...:
 Update code for hook 'file/l3graphics.sty/after' on input line ...:
 Code labels for sorting:
  backend
diff --git a/base/testfiles/github-0962b.lvt b/base/testfiles/github-0962b.lvt
new file mode 100644
index 00000000..5d810674
--- /dev/null
+++ b/base/testfiles/github-0962b.lvt
@@ -0,0 +1,38 @@
+
+
+
+\PassOptionsToPackage{nohyperref}{doc}
+
+\documentclass{ltxdoc}
+
+\input{test2e}
+
+\showoutput
+
+\START
+
+\ShowHook{begindocument}
+
+\OMIT
+\begin{document}
+\TIMO
+
+\ShowCommand\PrintMacroName
+
+\cs{\bslash}  \cmd\\
+
+\cs{end\meta{env}}  \cmd\end\meta{env}
+
+% but those do not work and need \_ instead of _ ...
+
+\cs{@@\_foo\_bar:}
+
+\MakePercentIgnore
+
+%    \begin{macrocode}
+%<@@=MODULE>
+%    \end{macrocode}
+
+\cs{@@\_foo\_bar:}
+
+\end{document}
diff --git a/base/testfiles/github-0962b.tlg b/base/testfiles/github-0962b.tlg
new file mode 100644
index 00000000..5c3cfda3
--- /dev/null
+++ b/base/testfiles/github-0962b.tlg
@@ -0,0 +1,189 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+-> The hook 'begindocument':
+> Code chunks:
+>     doc -> \catcode `\^^A=14\relax \catcode `\^^X=14\relax \let \macro at font \MacroFont 
+>     ltxdoc -> \MakeShortVerb {\|}\renewcommand \PrintMacroName [1]{\MacroFont \detokenize {##1}}\providecommand \LuaTeX {Lua\TeX } \providecommand \cls {\textsf } \providecommand \pkg {\textsf } \providecommand \enquote [1]{``##1''} \providecommand \url {\texttt } \renewcommand \PrintMacroName [1]{\MacroFont \string ##1\ }
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     doc, ltxdoc.
+<recently read> }
+l. ...\ShowHook{begindocument}
+> \PrintMacroName=\long macro:
+#1->\MacroFont \string #1\ .
+<argument> \PrintMacroName 
+l. ...\ShowCommand\PrintMacroName
+LaTeX Font Info:    External font `cmex10' loaded for size
+(Font)              <7> on input line ....
+LaTeX Font Info:    External font `cmex10' loaded for size
+(Font)              <5> on input line ....
+LaTeX Font Info:    External font `cmex10' loaded for size
+(Font)              <9> on input line ....
+LaTeX Font Info:    External font `cmex10' loaded for size
+(Font)              <6> on input line ....
+Completed box being shipped out [1]
+\vbox(682.0+0.0)x428.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 530.94328fil
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.8333)x355.0, glue set 315.66685fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 \
+....\kern 0.0
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 \
+....\kern 0.0
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.6667
+...\hbox(7.5+2.5)x355.0, glue set 245.72697fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 e
+....\OT1/cmtt/m/n/10 n
+....\OT1/cmtt/m/n/10 d
+....\mathon
+....\OMS/cmsy/m/n/10 h
+....\mathoff
+....\setlanguage1 (hyphenmin 2,3)
+....\OT1/cmtt/m/it/10 e
+....\OT1/cmtt/m/it/10 n
+....\OT1/cmtt/m/it/10 v
+....\kern 1.73611
+....\mathon
+....\OMS/cmsy/m/n/10 i
+....\mathoff
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\setlanguage0 (hyphenmin 2,3)
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 e
+....\OT1/cmtt/m/n/10 n
+....\OT1/cmtt/m/n/10 d
+....\kern 0.0
+....\mathon
+....\OMS/cmsy/m/n/10 h
+....\mathoff
+....\setlanguage1 (hyphenmin 2,3)
+....\OT1/cmr/m/it/10 e
+....\OT1/cmr/m/it/10 n
+....\OT1/cmr/m/it/10 v
+....\kern 1.07637
+....\mathon
+....\OMS/cmsy/m/n/10 i
+....\mathoff
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 2.55556
+...\hbox(6.94444+0.8333)x355.0, glue set 279.94055fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 @
+....\OT1/cmtt/m/n/10 @
+....\kern 0.62996
+....\vbox(0.4+0.0)x3.15
+.....\rule(0.4+0.0)x3.15
+....\OT1/cmtt/m/n/10 f
+....\OT1/cmtt/m/n/10 o
+....\OT1/cmtt/m/n/10 o
+....\kern 0.62996
+....\vbox(0.4+0.0)x3.15
+.....\rule(0.4+0.0)x3.15
+....\OT1/cmtt/m/n/10 b
+....\OT1/cmtt/m/n/10 a
+....\OT1/cmtt/m/n/10 r
+....\OT1/cmtt/m/n/10 :
+....\kern 0.0
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\penalty 10000
+...\glue 5.0 plus 3.2 minus 2.0
+...\penalty 0
+...\glue(\parskip) 0.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 3.4167
+...\hbox(6.75+2.25)x355.0, glue set 279.04904fil
+....\glue(\leftskip) 10.66672
+....\hbox(0.0+0.0)x0.0
+....\hbox(4.51111+0.0)x0.0, glue set - 6.68059fil
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+.....\OT1/cmr/m/n/7 1
+.....\glue 2.69446 plus 1.29167 minus 0.86111
+.....\glue 0.0
+....\mathon
+....\OMS/cmsy/m/n/9 h
+....\hbox(6.25+0.0)x58.08984
+.....\OT1/cmss/m/n/9 @
+.....\OT1/cmss/m/n/9 @
+.....\OT1/cmss/m/n/9 =
+.....\OT1/cmss/m/n/9 M
+.....\OT1/cmss/m/n/9 O
+.....\OT1/cmss/m/n/9 D
+.....\OT1/cmss/m/n/9 U
+.....\OT1/cmss/m/n/9 L
+.....\OT1/cmss/m/n/9 E
+....\OMS/cmsy/m/n/9 i
+....\mathoff
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\penalty 0
+...\penalty -51
+...\glue 5.0 plus 2.2 minus 2.0
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 2.80556
+...\hbox(6.94444+0.8333)x355.0, glue set 279.94055fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 @
+....\OT1/cmtt/m/n/10 @
+....\kern 0.62996
+....\vbox(0.4+0.0)x3.15
+.....\rule(0.4+0.0)x3.15
+....\OT1/cmtt/m/n/10 f
+....\OT1/cmtt/m/n/10 o
+....\OT1/cmtt/m/n/10 o
+....\kern 0.62996
+....\vbox(0.4+0.0)x3.15
+.....\rule(0.4+0.0)x3.15
+....\OT1/cmtt/m/n/10 b
+....\OT1/cmtt/m/n/10 a
+....\OT1/cmtt/m/n/10 r
+....\OT1/cmtt/m/n/10 :
+....\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
+(github-0962b.aux)
diff --git a/required/firstaid/changes.txt b/required/firstaid/changes.txt
index 6376a30b..3e15dfbc 100644
--- a/required/firstaid/changes.txt
+++ b/required/firstaid/changes.txt
@@ -1,3 +1,8 @@
+2022-11-26  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* latex2e-first-aid-for-external-files.dtx (subsection{First aid for \class{ltxdoc}}):
+	A first aid for \cs in ltxdoc so that the argument is not printed verbatim but evaluated (gh/962)
+
 2022-11-04  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* latex2e-first-aid-for-external-files.dtx (subsection{The unicode-math package first aid}):
diff --git a/required/firstaid/latex2e-first-aid-for-external-files.dtx b/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 310e5da9..f9038b83 100644
--- a/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -28,9 +28,10 @@
 %
 % \fi
 %
-%
+% \providecommand\class[1]{\texttt{#1}}
 % \providecommand\pkg[1]{\texttt{#1}}
 %
+%
 % \title{First aid for external files and packages that need updating}
 % \author{Frank Mittelbach, \LaTeX{} Project}
 %
@@ -111,8 +112,8 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\def\LaTeXFirstAidDate{2022/11/04}
-\def\LaTeXFirstAidVersion{v1.0v}
+\def\LaTeXFirstAidDate{2022/11/26}
+\def\LaTeXFirstAidVersion{v1.0w}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -604,7 +605,7 @@
 %    \end{macrocode}
 %
 %
-% \subsection{First aid for \pkg{memoir}}
+% \subsection{First aid for \class{memoir}}
 %
 %  The introduction of \cs{stockheight} and \cs{stockwidth} into the
 %  kernel requires some first aid. This has to go in \emph{before}
@@ -685,6 +686,23 @@
 %    \end{macrocode}
 %
 %
+% \subsection{First aid for \class{ltxdoc}}
+%
+%  The new definition for \cs{cs} was unfortunately faulty as it prevents
+%  things like \verb=\cs{end\meta{env}}= or \verb=\cs{\bslash}= from
+%  working. For now we revert to the simpler code in \pkg{doc} but
+%  long term we may want to change to the code used by \class{l3doc}
+%  so that L3 programming layer documentation is also properly
+%  supported with \class{ltxdoc} and not only with \class{l3doc}.
+%    \begin{macrocode}
+\AddToHook{class/ltxdoc/after}{%
+  \DeclareRobustCommand\cs[1]{\texttt{\bslash#1}}%
+  \AddToHook{begindocument}{%
+      \renewcommand\PrintMacroName[1]{\MacroFont\string#1\ }%
+    }%
+}
+%    \end{macrocode}
+%
 %    \begin{macrocode}
 %</kernel>
 %    \end{macrocode}





More information about the latex3-commits mailing list.