doctools 应如何与标准类一起使用?

doctools 应如何与标准类一起使用?

我正在探索使用它来记录包的可能性doctools。根据文档,它可以在加载.dtx时用于文件doc.sty,也可以在未加载时用于普通文档。我正在尝试后者。

根据手册第 3 页底部的示例,我尝试这样做:

\documentclass{article}
\usepackage[%
  loadHyperref=true,
  createIndexEntries=true,
]{doctools}
\begin{document}
  aardvark
\end{document}

这无法编译并出现错误,抱怨需要textcomp,因此我添加了以下内容:

\documentclass{article}
\usepackage{textcomp}
\usepackage[%
  loadHyperref=true,
  createIndexEntries=true,
]{doctools}
\begin{document}
  aardvark
\end{document}

这确实可以编译,但会产生大量警告。以下是典型的警告:

Package hyperref Warning: Option `draft' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `final' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `setpagesize' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `colorlinks' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdfpagemode' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdfstartpage' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdfstartview' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdfcenterwindow' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdffitwindow' has already been used,
(hyperref)                setting the option has no effect on input line 13.


Package hyperref Warning: Option `pdfdisplaydoctitle' has already been used,
(hyperref)                setting the option has no effect on input line 13.

这些结果来自一次编译运行,用于TEXMFHOME=/dir pdflatex <filename>.tex消除我个人树中的杂散配置文件的任何可能干扰。(/dir是一个不存在的目录。)

我意识到这些只是警告 - 除了由于缺乏而导致的初始错误之外textcomp- 但是当初次尝试使用包时出现错误,紧接着在我尝试使用它之前出现十几个警告,这通常不是一个好兆头。

最好避免吗doctools?还是应该以不同的方式使用它?

相关内容