[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh962-et-al: hotfix for #962 (60cd3c2b)

Frank Mittelbach frank.mittelbach at latex-project.org
Mon Nov 28 19:01:07 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh962-et-al
Link       : https://github.com/latex3/latex2e/commit/60cd3c2bdc8a8151e655c3dc7f8e134875a9b327

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

commit 60cd3c2bdc8a8151e655c3dc7f8e134875a9b327
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Mon Nov 28 19:01:07 2022 +0100

    hotfix for #962


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

60cd3c2bdc8a8151e655c3dc7f8e134875a9b327
 base/changes.txt                       |   7 ++
 base/ltxdoc.dtx                        |  11 +-
 base/testfiles/github-0962b.luatex.tlg | 211 +++++++++++++++++++++++++++++++++
 base/testfiles/github-0962b.lvt        |  38 ++++++
 base/testfiles/github-0962b.tlg        | 189 +++++++++++++++++++++++++++++
 5 files changed, 452 insertions(+), 4 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 0ae9b55c..685f2129 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,6 +10,13 @@ are not part of the distribution.
 All changes above are only part of the development branch for the next release.
 ================================================================================
 
+2022-11-28  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltxdoc.dtx:
+	Revert using \detokenize in \cs (gh/962)
+	Eventually we will need to sync with the code in l3doc but for now
+	we stay with the simpler definition from doc.sty.
+
 #########################
 # 2022-11-01 Release
 #########################
diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index 46c324c5..6863349b 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
 %
 %<class>\NeedsTeXFormat{LaTeX2e}
 %<class>\ProvidesClass{ltxdoc}
-%<class>         [2022/06/22 v2.1h Standard LaTeX documentation class]
+%<class>         [2022/06/22 v2.1i Standard LaTeX documentation class]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -633,12 +633,15 @@ 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}
+% \changes{v2.1i}{2022/11/28}{Revert 2.1f and not use \cs{detokenize} for now (gh/962)}
+%    Eventually,  \cs{cs} should get the definition from \pkg{l3doc} but for now we
+%    revert to the simple one from \pkg{doc}.
 %    \begin{macrocode}
-\DeclareRobustCommand\cs[1]{\texttt{\bslash\detokenize{#1}}}%
+%\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}%            -- def in doc.sty
 \AtBeginDocument{%
-  \renewcommand\PrintMacroName[1]{\MacroFont\detokenize{#1}}%
+%  \renewcommand\PrintMacroName[1]{\MacroFont\string #1\ }%   -- def in doc.sty
 %    \end{macrocode}
 %    We provide those delated in case somebody has loaded \texttt{csquotes}
 %    or makes some definitions in the preamble.
diff --git a/base/testfiles/github-0962b.luatex.tlg b/base/testfiles/github-0962b.luatex.tlg
new file mode 100644
index 00000000..3d50d3f4
--- /dev/null
+++ b/base/testfiles/github-0962b.luatex.tlg
@@ -0,0 +1,211 @@
+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 {\|}\providecommand \LuaTeX {Lua\TeX } \providecommand \cls {\textsf } \providecommand \pkg {\textsf } \providecommand \enquote [1]{``##1''} \providecommand \url {\texttt } 
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     doc, ltxdoc.
+<recently read> }
+l. ...\ShowHook{begindocument}
+> \PrintMacroName=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, direction TLT
+.\glue 17.0
+.\vbox(665.0+0.0)x355.0, shifted 73.0, direction TLT
+..\vbox(12.0+0.0)x355.0, glue set 12.0fil, direction TLT
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x355.0, direction TLT
+....\hbox(0.0+0.0)x355.0, direction TLT
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x355.0, glue set 530.9433fil, direction TLT
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.8333)x355.0, glue set 315.66687fil, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 \
+....\kern0.0 (italic)
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 \
+....\kern0.0 (italic)
+....\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, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\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
+....\OT1/cmtt/m/it/10 e
+....\OT1/cmtt/m/it/10 n
+....\OT1/cmtt/m/it/10 v
+....\kern1.73611 (italic)
+....\mathon
+....\OMS/cmsy/m/n/10 i
+....\mathoff
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 e
+....\OT1/cmtt/m/n/10 n
+....\OT1/cmtt/m/n/10 d
+....\kern0.0 (italic)
+....\mathon
+....\OMS/cmsy/m/n/10 h
+....\mathoff
+....\OT1/cmr/m/it/10 e
+....\OT1/cmr/m/it/10 n
+....\OT1/cmr/m/it/10 v
+....\kern1.07637 (italic)
+....\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, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 @
+....\OT1/cmtt/m/n/10 @
+....\kern0.62996
+....\vbox(0.4+0.0)x3.15, direction TLT
+.....\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
+....\kern0.62996
+....\vbox(0.4+0.0)x3.15, direction TLT
+.....\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 :
+....\kern0.0 (italic)
+....\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, direction TLT
+....\glue(\leftskip) 10.66672
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x0.0, direction TLT
+....\hbox(4.51111+0.0)x0.0, glue set - 6.68059fil, direction TLT
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+.....\OT1/cmr/m/n/7 1
+.....\glue(\spaceskip) 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, direction TLT
+.....\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, direction TLT
+....\localpar
+.....\localinterlinepenalty=0
+.....\localbrokenpenalty=0
+.....\localleftbox=null
+.....\localrightbox=null
+....\hbox(0.0+0.0)x15.0, direction TLT
+....\OT1/cmtt/m/n/10 \
+....\OT1/cmtt/m/n/10 @
+....\OT1/cmtt/m/n/10 @
+....\kern0.62996
+....\vbox(0.4+0.0)x3.15, direction TLT
+.....\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
+....\kern0.62996
+....\vbox(0.4+0.0)x3.15, direction TLT
+.....\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 :
+....\kern0.0 (italic)
+....\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, direction TLT
+...\hbox(6.44444+0.0)x355.0, glue set 175.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+(github-0962b.aux)
diff --git a/base/testfiles/github-0962b.lvt b/base/testfiles/github-0962b.lvt
new file mode 100644
index 00000000..6d02d0c1
--- /dev/null
+++ b/base/testfiles/github-0962b.lvt
@@ -0,0 +1,38 @@
+
+
+
+\PassOptionsToPackage{nohyperref,nomulticol}{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..261b9fa8
--- /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 {\|}\providecommand \LuaTeX {Lua\TeX } \providecommand \cls {\textsf } \providecommand \pkg {\textsf } \providecommand \enquote [1]{``##1''} \providecommand \url {\texttt } 
+> Document-level (top-level) code (executed last):
+>     ---
+> Extra code for next invocation:
+>     ---
+> Rules:
+>     ---
+> Execution order:
+>     doc, ltxdoc.
+<recently read> }
+l. ...\ShowHook{begindocument}
+> \PrintMacroName=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)





More information about the latex3-commits mailing list.