[latex3-commits] [git/LaTeX3-latex3-latex2e] gh822: doc2 option for ltxdoc and minor doc.sty cleanup (b2d1efb2)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri May 27 15:05:26 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh822
Link       : https://github.com/latex3/latex2e/commit/b2d1efb2fb25a31e2220102612851ed715dc9bb9

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

commit b2d1efb2fb25a31e2220102612851ed715dc9bb9
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri May 27 15:05:26 2022 +0200

    doc2 option for ltxdoc and minor doc.sty cleanup


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

b2d1efb2fb25a31e2220102612851ed715dc9bb9
 base/doc.dtx                                       |  5 +-
 base/ltxdoc.dtx                                    | 25 +++++++--
 base/testfiles/github-0822.lvt                     |  8 +++
 .../testfiles/github-0822.tlg                      | 61 ++++++++++++++++------
 base/testfiles/tlb-extraprimitives-001.luatex.tlg  |  5 ++
 5 files changed, 82 insertions(+), 22 deletions(-)

diff --git a/base/doc.dtx b/base/doc.dtx
index 7c602327..f86573a9 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.0h
+%<+package|shortvrb>  [2022/06/01 v3.0i
 %<+package|shortvrb>   Standard LaTeX documentation package V3 (FMi)]
 %\catcode`\<=12
 %
@@ -1909,7 +1909,6 @@
 %    \fmi{cleanup replacement of kvoptions}
 %
 %    \begin{macrocode}
-\RequirePackage{l3keys2e}
 \ExplSyntaxOn
 %    \end{macrocode}
 % Some keys are available as options for use in \cs{usepackage} some are
@@ -2020,7 +2019,7 @@
 % \subsection{Processing the package keys}
 %
 %    \begin{macrocode}
-\ProcessKeysOptions {doc}
+\ProcessKeyOptions
 %    \end{macrocode}
 %
 %
diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index 10ddd448..8e5fcf3e 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -30,7 +30,7 @@
 %
 %<class>\NeedsTeXFormat{LaTeX2e}
 %<class>\ProvidesClass{ltxdoc}
-%<class>         [2021/12/07 v2.1d Standard LaTeX documentation class]
+%<class>         [2022/05/27 v2.1e Standard LaTeX documentation class]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -51,6 +51,8 @@
 %
 % \fi
 %
+% \providecommand\pkg[1]{\texttt{#1}}
+%
 %
 % \changes{v2.0i}{1994/04/29}{Update the documentation.}
 % \changes{v2.0s}{1998/08/17}{(RmS) Documentation fixes.}
@@ -115,10 +117,13 @@
 % \AtBeginDocument{\OnlyDescription}
 %\end{verbatim}
 %
+% If your document relies on using the old \pkg{doc} version, you can
+% request that the class loads \pkg{doc} version~2 by passing the
+% option \texttt{doc2}.
 %
 % If the full source listing |sources2e.tex| is processed, then an index
-% and change history are produced by default, however indices are not
-% normally produced for individual files.
+% and change history are produced by default, however indexes are normally
+% not produced for individual files.
 %
 % As an example, consider |ltclass.dtx|, which contains the sources for
 % the new class and package interface commands.  With no |cfg|
@@ -175,6 +180,13 @@
 \DeclareOption{nocfg}{\ltxdoc at load@cfg at false}
 %    \end{macrocode}
 %
+%    Support rolling back \pkg{doc} to version 2:
+% \changes{v2.1e}{2022/05/27}{Support rolling  back doc to version 2}
+%    \begin{macrocode}
+\let\ltxdoc at doc@version\@empty  % use current version by default
+\DeclareOption{doc2}{\def\ltxdoc at doc@version{=v2}}
+%    \end{macrocode}
+% 
 %    \begin{macrocode}
 \DeclareOption*{%
     \PassOptionsToClass  {\CurrentOption}{article}}
@@ -209,8 +221,13 @@
 \LoadClass{article}
 %    \end{macrocode}
 %
+%     By default, loadthe current \pkg{doc} version
+%    (\cs{ltxdoc at doc@version} is empty). If option
+%    \texttt{doc2} is given version 2 is loaded
+%    (\cs{ltxdoc at doc@version} contains \texttt{=v2}).
+% \changes{v2.1e}{2022/05/27}{Support rolling  back doc to version 2}
 %    \begin{macrocode}
-\RequirePackage{doc}
+\RequirePackage{doc}[\ltxdoc at doc@version]
 %    \end{macrocode}
 %
 % Make \verb+|+ be a `short verb' character, but not in the document
diff --git a/base/testfiles/github-0822.lvt b/base/testfiles/github-0822.lvt
new file mode 100644
index 00000000..c1fa9d72
--- /dev/null
+++ b/base/testfiles/github-0822.lvt
@@ -0,0 +1,8 @@
+\input{test2e}
+
+\START 
+
+\documentclass[doc2]{ltxdoc}
+
+
+\END
diff --git a/required/tools/testfiles/tlb-multicol-006.tlg b/base/testfiles/github-0822.tlg
similarity index 56%
copy from required/tools/testfiles/tlb-multicol-006.tlg
copy to base/testfiles/github-0822.tlg
index f62a19af..4fd42690 100644
--- a/required/tools/testfiles/tlb-multicol-006.tlg
+++ b/base/testfiles/github-0822.tlg
@@ -1,9 +1,41 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-(multicol.sty
-Rollback for package 'multicol' requested -> version 'v1.8'.
+(ltxdoc.cls
+Document Class: ltxdoc ....-..-.. v... Standard LaTeX documentation class
+*************************************
+* Local config file ltxdoc.cfg used
+*************************************
+(ltxdoc.cfg
+File: ltxdoc.cfg ....-..-.. v... ltxdoc.cls configuration (LaTeX Project)
+) (article.cls
+Document Class: article ....-..-.. v... Standard LaTeX document class
+(size10.clo
+File: size10.clo ....-..-.. v... Standard LaTeX file (size option)
+)
+\c at part=\count...
+\c at section=\count...
+\c at subsection=\count...
+\c at subsubsection=\count...
+\c at paragraph=\count...
+\c at subparagraph=\count...
+\c at figure=\count...
+\c at table=\count...
+\abovecaptionskip=\skip...
+\belowcaptionskip=\skip...
+\bibindent=\dimen...
+) (doc.sty
+Rollback for package 'doc' requested -> version 'v2'.
          This corresponds to the release introduced on ....-..-...
-(multicol-....-..-...sty
+(doc-....-..-...sty
+Package: doc ....-..-.. v... Standard LaTeX documentation package (FMi)
+\c at StandardModuleDepth=\count...
+\guard at level=\count...
+\MacrocodeTopsep=\skip...
+\MacroIndent=\dimen...
+\macro at cnt=\count...
+\MacroTopsep=\skip...
+\index at excludelist=\toks...
+(multicol.sty
 Package: multicol ....-..-.. v... multicolumn formatting (FMi)
 \c at tracingmulticols=\count...
 \mult at box=\box...
@@ -24,9 +56,8 @@ Package: multicol ....-..-.. v... multicolumn formatting (FMi)
 \maxbalancingoverflow=\dimen...
 \mult at rightbox=\box...
 \mult at grightbox=\box...
-\mult at gfirstbox=\box...
 \mult at firstbox=\box...
-\@tempa=\box...
+\mult at gfirstbox=\box...
 \@tempa=\box...
 \@tempa=\box...
 \@tempa=\box...
@@ -72,13 +103,13 @@ Package: multicol ....-..-.. v... multicolumn formatting (FMi)
 \mult at nat@firstbox=\box...
 \colbreak at box=\box...
 \mc at col@check at num=\count...
-))
-> \columnbreak=macro:
-->\ifnum \col at number <\tw@ \PackageError {multicol}{\noexpand \columnbreak outside multicols}{This command can only be used within a multicols or multicols* environment.}\else \ifvmode \penalty -\@Mv \relax \else \@bsphack \vadjust {\penalty -\@Mv \relax }\@esphack \fi \fi .
-<argument> \columnbreak 
-l. ...\ShowCommand\columnbreak
-                                   % old definition
-> \newcolumn=undefined.
-<argument> \newcolumn 
-l. ...\ShowCommand\newcolumn
-                                   % undefined
+)
+\IndexMin=\dimen...
+\c at IndexColumns=\count...
+\GlossaryMin=\dimen...
+\c at GlossaryColumns=\count...
+\check at sum=\count...
+\bslash at cnt=\count...
+\wrong at table=\toks...
+\c at CodelineNo=\count...
+)))
diff --git a/base/testfiles/tlb-extraprimitives-001.luatex.tlg b/base/testfiles/tlb-extraprimitives-001.luatex.tlg
index 97bb331a..26283f62 100644
--- a/base/testfiles/tlb-extraprimitives-001.luatex.tlg
+++ b/base/testfiles/tlb-extraprimitives-001.luatex.tlg
@@ -179,6 +179,7 @@ currentiflevel
 currentiftype
 detokenize
 dimexpr
+discretionaryligaturemode
 displaywidowpenalties
 draftmode
 dviextension
@@ -269,10 +270,12 @@ luatexbanner
 luatexrevision
 luatexversion
 marks
+mathdefaultsmode
 mathdelimitersmode
 mathdir
 mathdirection
 mathdisplayskipmode
+matheqdirmode
 matheqnogapstep
 mathflattenmode
 mathitalicsmode
@@ -313,6 +316,8 @@ pardirection
 parshapedimen
 parshapeindent
 parshapelength
+partokencontext
+partokenname
 pdfextension
 pdffeedback
 pdfvariable





More information about the latex3-commits mailing list.