Skip to content

Commit

Permalink
fix the option clash due to loading hypdoc in the cfg file
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Dec 7, 2021
1 parent 6215f7d commit 1174a44
Show file tree
Hide file tree
Showing 11 changed files with 1,484 additions and 21 deletions.
13 changes: 9 additions & 4 deletions base/doc/ltnews35.tex
Expand Up @@ -146,10 +146,15 @@ \subsection{???}

\section{Code improvements}

\subsection{\class{ltxdoc} gets \option{nocfg} option}

\emph{document it}

\subsection{\class{ltxdoc} gets a \option{nocfg} option}

The \LaTeX{} sources are formatted with the \class{ltxdoc} class,
which supports loading a local config file \file{ltxdoc.cfg}. In the
past the \LaTeX{} sources used such a file but it was not distributed.
As a result reprocessing the \LaTeX{} sources elsewhere showed
formatting changes. We now distribute this file which means that it
is loaded by default. With the option \option{nocfg} this can be
prevented.


\subsection{\pkg{doc} upgraded to version~3}
Expand Down
39 changes: 22 additions & 17 deletions base/ltxdoc.dtx
Expand Up @@ -30,7 +30,7 @@
%
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{ltxdoc}
%<class> [2021/11/18 v2.1d Standard LaTeX documentation class]
%<class> [2021/12/07 v2.1d Standard LaTeX documentation class]
%
%<*driver>
\documentclass{ltxdoc}
Expand Down Expand Up @@ -180,7 +180,13 @@
\PassOptionsToClass {\CurrentOption}{article}}
% \end{macrocode}
%
% \section{Configuration}
% \section{Option Processing}
%
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
%
% \section{Local configuration}
% Input a local configuration file, if it exists.
% \begin{macrocode}
\ifltxdoc@load@cfg@
Expand All @@ -189,16 +195,14 @@
* Local config file ltxdoc.cfg used^^J%
*************************************}}
{}
\else
\typeout{*************************************^^J%
* Local config file ignored^^J%
*************************************}
\fi
% \end{macrocode}
%
%
% \section{Option Processing}
%
% \begin{macrocode}
\ProcessOptions
% \end{macrocode}
%
% \section{Loading article and doc}
%
% \begin{macrocode}
Expand Down Expand Up @@ -617,8 +621,6 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% \section{Configuration file}
%
% We now use a \texttt{.cfg} file to run our own documentation with
% the beta of the new \texttt{doc} package.
%
% \begin{macrocode}
%<*cfg>
Expand All @@ -632,10 +634,14 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%

\ProvidesFile{ltxdoc.cfg}%
[2021/02/07 v2.0b ltxdoc.cls configuration (LaTeX Project)]
[2021/12/07 v2.0c ltxdoc.cls configuration (LaTeX Project)]
\PassOptionsToClass{a4paper}{article}
\AtEndOfClass{%
\RequirePackage{hypdoc}%

% hyperref and hypdoc are now loaded late (or by the user) so we have to wait
% with any adjustments until that has happened

\AddToHook{package/hyperref/after}{%
%% \RequirePackage{hypdoc}% % this is now triggered by doc
\RequirePackage{pdftexcmds}\relax
\ifnum\pdf@strcmp{\jobname}{inputenc}=0 %
\hypersetup{pdfencoding=auto}%
Expand All @@ -652,10 +658,9 @@ Bug reports can be opened (category \texttt{#1}) at\\%
}%
}

% The setting below will replace the current version of the doc
% package with the V3-beta version. This should work well for
% documentation of packages outside the LaTeX kernel, but if not, you
% can prevent the loading with the option "nocfg", i.e.,
% This should work well for documentation of packages outside the
% LaTeX kernel, but if not, you can prevent the loading with the
% option "nocfg", i.e.,
%
% \documentclass[nocfg]{ltxdoc]
%
Expand Down
175 changes: 175 additions & 0 deletions base/testfiles-doc/tlb-dox013.luatex.tlg
@@ -0,0 +1,175 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(../hypdoc.sty
Package: hypdoc ....-..-.. v... Hyper extensions for doc.sty (HO)
(atveryend-ltx.sty
Package: atveryend-ltx ....-..-.. v... Emulation of the original atveryend package
with kernel methods
) (../hyperref.sty
Package: hyperref ....-..-.. v... Hypertext links for LaTeX
(../ltxcmds.sty
Package: ltxcmds ....-..-.. v... LaTeX kernel commands for general use (HO)
) (../iftex.sty
Package: iftex ....-..-.. v... TeX engine tests
) (../pdftexcmds.sty
Package: pdftexcmds ....-..-.. v... Utility functions of pdfTeX for LuaTeX (HO)
(../infwarerr.sty
Package: infwarerr ....-..-.. v... Providing info/warning/error messages (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode is ignored in DVI mode.
\pdftexcmds@toks=\toks...
) (keyval.sty
Package: keyval ....-..-.. v... key=value parser (DPC)
\KV@toks@=\toks...
) (../kvsetkeys.sty
Package: kvsetkeys ....-..-.. v... Key value parser (HO)
) (../kvdefinekeys.sty
Package: kvdefinekeys ....-..-.. v... Define keys (HO)
) (../pdfescape.sty
Package: pdfescape ....-..-.. v... Implements pdfTeX's escape features (HO)
) (../hycolor.sty
Package: hycolor ....-..-.. v... Color options for hyperref/bookmark (HO)
) (../letltxmacro.sty
Package: letltxmacro ....-..-.. v... Let assignment for LaTeX macros (HO)
) (../auxhook.sty
Package: auxhook ....-..-.. v... Hooks for auxiliary files (HO)
) (../kvoptions.sty
Package: kvoptions ....-..-.. v... Key value format for package options (HO)
)
\@linkdim=\dimen...
\Hy@linkcounter=\count...
\Hy@pagecounter=\count...
(../pd1enc.def
File: pd1enc.def ....-..-.. v... Hyperref: PDFDocEncoding definition (HO)
) (../hyperref-langpatches.def
File: hyperref-langpatches.def ....-..-.. v... Hyperref: patches for babel languages
) (../intcalc.sty
Package: intcalc ....-..-.. v... Expandable calculations with integers (HO)
) (../etexcmds.sty
Package: etexcmds ....-..-.. v... Avoid name clashes with e-TeX commands (HO)
)
\Hy@SavedSpaceFactor=\count...
(../puenc.def
File: puenc.def ....-..-.. v... Hyperref: PDF Unicode definition (HO)
)
Package hyperref Info: Option `hyperindex' set `false' on input line ....
Package hyperref Info: Option `pdfusetitle' set `true' on input line ....
Package hyperref Info: Option `colorlinks' set `true' on input line ....
Package hyperref Info: Option `pdfpagelabels' set `true' on input line ....
Package hyperref Info: Hyper figures OFF on input line ....
Package hyperref Info: Link nesting OFF on input line ....
Package hyperref Info: Hyper index OFF on input line ....
Package hyperref Info: Plain pages OFF on input line ....
Package hyperref Info: Backreferencing OFF on input line ....
Package hyperref Info: Implicit mode ON; LaTeX internals redefined.
Package hyperref Info: Bookmarks ON on input line ....
\c@Hy@tempcnt=\count...
(../url.sty
\Urlmuskip=\muskip...
Package: url ....-..-.. ver 3.4 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line ....
\XeTeXLinkMargin=\dimen...
(../bitset.sty
Package: bitset ....-..-.. v... Handle bit-vector datatype (HO)
(../bigintcalc.sty
Package: bigintcalc ....-..-.. v... Expandable calculations on big integers (HO)
))
\Fld@menulength=\count...
\Field@Width=\dimen...
\Fld@charsize=\dimen...
Package hyperref Info: Hyper figures OFF on input line ....
Package hyperref Info: Link nesting OFF on input line ....
Package hyperref Info: Hyper index OFF on input line ....
Package hyperref Info: backreferencing OFF on input line ....
Package hyperref Info: Link coloring ON on input line ....
Package hyperref Info: Link coloring with OCG OFF on input line ....
Package hyperref Info: PDF/A mode OFF on input line ....
LaTeX Info: Redefining \ref on input line ....
LaTeX Info: Redefining \pageref on input line ....
(atbegshi-ltx.sty
Package: atbegshi-ltx ....-..-.. v... Emulation of the original atbegshi
package with kernel methods
)
\Hy@abspage=\count...
\c@Item=\count...
\c@Hfootnote=\count...
)
Package hyperref Info: Driver (default): hdvips.
(../hdvips.def
File: hdvips.def ....-..-.. v... Hyperref driver for dvips
(../pdfmark.def
File: pdfmark.def ....-..-.. v... Hyperref definitions for pdfmark specials
\pdf@docset=\toks...
\pdf@box=\box...
\pdf@toks=\toks...
\pdf@defaulttoks=\toks...
\HyField@AnnotCount=\count...
\Fld@listcount=\count...
\c@bookmark@seq@number=\count...
(../rerunfilecheck.sty
Package: rerunfilecheck ....-..-.. v... Rerun checks for auxiliary files (HO)
(../uniquecounter.sty
Package: uniquecounter ....-..-.. v... Provide unlimited unique counter (HO)
)
Package uniquecounter Info: New unique counter `rerunfilecheck' on input line ....
)
\Hy@SectionHShift=\skip...
))
Package hyperref Info: Option `plainpages' set `false' on input line ....
Package hyperref Info: Option `bookmarksopen' set `true' on input line ....
Package hyperref Info: Option `bookmarksnumbered' set `true' on input line ....
\c@HD@unique=\count...
\c@HD@hypercount=\count...
\HD@helplength=\skip...
) (tlb-dox013.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
Package doc Info: Made | a short reference for \verb on input line ....
(color.sty
Package: color ....-..-.. v... Standard LaTeX Color (DPC)
(color.cfg
File: color.cfg ....-..-.. v... sample color configuration
)
Package color Info: Driver file: dvips.def on input line ....
(dvips.def
File: dvips.def ....-..-.. v... Driver-dependent file (DPC,SPQR)
) (dvipsnam.def
File: dvipsnam.def ....-..-.. v... Driver-dependent file (DPC,SPQR)
))
Package hyperref Info: Link coloring ON on input line ....
(../nameref.sty
Package: nameref ....-..-.. v... Cross-referencing by name of section
(../refcount.sty
Package: refcount ....-..-.. v... Data extraction from label references (HO)
) (../gettitlestring.sty
Package: gettitlestring ....-..-.. v... Cleanup title references (HO)
)
\c@section@level=\count...
)
LaTeX Info: Redefining \ref on input line ....
LaTeX Info: Redefining \pageref on input line ....
LaTeX Info: Redefining \nameref on input line ....
(tlb-dox013.out) (tlb-dox013.out)
\@outlinefile=\write...
Package hyperref Warning: Rerun to get /PageLabels entry.
(tlb-dox013.hd)
\HD@savedest@out=\write...
19 changes: 19 additions & 0 deletions base/testfiles-doc/tlb-dox013.lvt
@@ -0,0 +1,19 @@
% \iffalse
%

% Input the test macros for latex 2e
\input{regression-test}


\documentclass[a4paper]{ltxdoc}

\START

\usepackage[numbered]{hypdoc}


\begin{document}


\END

0 comments on commit 1174a44

Please sign in to comment.