Skip to content

Commit

Permalink
doc2 option for ltxdoc and minor doc.sty cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed May 27, 2022
1 parent 77a0208 commit b2d1efb
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 7 deletions.
5 changes: 2 additions & 3 deletions base/doc.dtx
Expand Up @@ -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
%
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -2020,7 +2019,7 @@
% \subsection{Processing the package keys}
%
% \begin{macrocode}
\ProcessKeysOptions {doc}
\ProcessKeyOptions
% \end{macrocode}
%
%
Expand Down
25 changes: 21 additions & 4 deletions base/ltxdoc.dtx
Expand Up @@ -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}
Expand All @@ -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.}
Expand Down Expand Up @@ -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|
Expand Down Expand Up @@ -175,6 +180,13 @@
\DeclareOption{nocfg}{\ltxdoc@load@cfg@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@doc@version\@empty % use current version by default
\DeclareOption{doc2}{\def\ltxdoc@doc@version{=v2}}
% \end{macrocode}
%
% \begin{macrocode}
\DeclareOption*{%
\PassOptionsToClass {\CurrentOption}{article}}
Expand Down Expand Up @@ -209,8 +221,13 @@
\LoadClass{article}
% \end{macrocode}
%
% By default, loadthe current \pkg{doc} version
% (\cs{ltxdoc@doc@version} is empty). If option
% \texttt{doc2} is given version 2 is loaded
% (\cs{ltxdoc@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@doc@version]
% \end{macrocode}
%
% Make \verb+|+ be a `short verb' character, but not in the document
Expand Down
8 changes: 8 additions & 0 deletions base/testfiles/github-0822.lvt
@@ -0,0 +1,8 @@
\input{test2e}

\START

\documentclass[doc2]{ltxdoc}


\END
115 changes: 115 additions & 0 deletions base/testfiles/github-0822.tlg
@@ -0,0 +1,115 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
(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@part=\count...
\c@section=\count...
\c@subsection=\count...
\c@subsubsection=\count...
\c@paragraph=\count...
\c@subparagraph=\count...
\c@figure=\count...
\c@table=\count...
\abovecaptionskip=\skip...
\belowcaptionskip=\skip...
\bibindent=\dimen...
) (doc.sty
Rollback for package 'doc' requested -> version 'v2'.
This corresponds to the release introduced on ....-..-...
(doc-....-..-...sty
Package: doc ....-..-.. v... Standard LaTeX documentation package (FMi)
\c@StandardModuleDepth=\count...
\guard@level=\count...
\MacrocodeTopsep=\skip...
\MacroIndent=\dimen...
\macro@cnt=\count...
\MacroTopsep=\skip...
\index@excludelist=\toks...
(multicol.sty
Package: multicol ....-..-.. v... multicolumn formatting (FMi)
\c@tracingmulticols=\count...
\mult@box=\box...
\multicol@leftmargin=\dimen...
\c@unbalance=\count...
\c@collectmore=\count...
\doublecol@number=\count...
\multicoltolerance=\count...
\multicolpretolerance=\count...
\full@width=\dimen...
\page@free=\dimen...
\premulticols=\dimen...
\postmulticols=\dimen...
\multicolsep=\skip...
\multicolbaselineskip=\skip...
\partial@page=\box...
\last@line=\box...
\maxbalancingoverflow=\dimen...
\mult@rightbox=\box...
\mult@grightbox=\box...
\mult@firstbox=\box...
\mult@gfirstbox=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\@tempa=\box...
\c@minrows=\count...
\c@columnbadness=\count...
\c@finalcolumnbadness=\count...
\last@try=\dimen...
\multicolovershoot=\dimen...
\multicolundershoot=\dimen...
\mult@nat@firstbox=\box...
\colbreak@box=\box...
\mc@col@check@num=\count...
)
\IndexMin=\dimen...
\c@IndexColumns=\count...
\GlossaryMin=\dimen...
\c@GlossaryColumns=\count...
\check@sum=\count...
\bslash@cnt=\count...
\wrong@table=\toks...
\c@CodelineNo=\count...
)))
5 changes: 5 additions & 0 deletions base/testfiles/tlb-extraprimitives-001.luatex.tlg
Expand Up @@ -179,6 +179,7 @@ currentiflevel
currentiftype
detokenize
dimexpr
discretionaryligaturemode
displaywidowpenalties
draftmode
dviextension
Expand Down Expand Up @@ -269,10 +270,12 @@ luatexbanner
luatexrevision
luatexversion
marks
mathdefaultsmode
mathdelimitersmode
mathdir
mathdirection
mathdisplayskipmode
matheqdirmode
matheqnogapstep
mathflattenmode
mathitalicsmode
Expand Down Expand Up @@ -313,6 +316,8 @@ pardirection
parshapedimen
parshapeindent
parshapelength
partokencontext
partokenname
pdfextension
pdffeedback
pdfvariable
Expand Down

0 comments on commit b2d1efb

Please sign in to comment.