【发布时间】:2019-07-13 18:32:55
【问题描述】:
我正在尝试使用 Doxygen 和 MikTex(也经过 Tex Live 测试)从源文件生成 PDF,但没有成功。这是我试图生成文档的示例文件:
/**
* @defgroup Example examplegroup
* @{ */
/**
* @brief Example function
* @param[in] e example var */
void exampleFunction( int e )
{
(void)e;
}
/** @} */
当我尝试运行 latex/make.bat 来生成 PDF 时出现错误:
//...
("C:\Program Files\MiKTeX 2.9\tex/latex/caption\ltcaption.sty"))
("C:\Program Files\MiKTeX 2.9\tex/latex/etoc\etoc.sty")
No file refman.aux.
("C:\Program Files\MiKTeX 2.9\tex/latex/base\ts1cmr.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\t1phv.fd")
("C:\Program Files\MiKTeX 2.9\tex/context/base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
) ("C:\Program Files\MiKTeX 2.9\tex/latex/oberdiek\epstopdf-base.sty"
("C:\Program Files\MiKTeX 2.9\tex/latex/oberdiek\grfext.sty"))
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
("C:\Program Files\MiKTeX 2.9\tex/latex/hyperref\nameref.sty"
("C:\Program Files\MiKTeX 2.9\tex/generic/oberdiek\gettitlestring.sty"))
No file refman.toc.
[1{C:/Users/FIJOGRE/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
[2]
Chapter 1.
(modules.tex ("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsa.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/amsfonts\umsb.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/wasysym\uwasy.fd")
LaTeX Warning: Reference `group___example' on page 1 undefined on input line 3.
) [1] [2]
Chapter 2.
(group___example.tex ("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\ts1phv.fd")
("C:\Program Files\MiKTeX 2.9\tex/latex/psnfss\t1pcr.fd")
! Missing } inserted.
<inserted text>
}
l.28 \end{DoxyParams}
?
所以我得出的结论是,当我在源文件 cmets 中使用 param-tag 时,doxygen 会在 doxygen.sty 中生成这种 DoxyParams 部分,从而导致问题:
%...
% Used by parameter lists
\newenvironment{DoxyParams}[2][]{%
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
{\ifthenelse{\equal{#1}{1}}%
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
{\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
}
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endfirsthead%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
\endhead%
}{%
\end{longtabu*}%
\vspace{6pt}%
}
%...
我在想 ifthen-begins 可能没有用结束标签正确关闭?因为如果我删除第一个 ifthens 并开始,我会让 pdflatex 工作。或者还有别的什么? Doxygen 中是否存在生成无效 doxygen.sty 的错误?还是其他地方的问题?我该怎么做才能使文档生成正常工作?
编辑:
更多信息,我认为这个问题也与分组有关,因为如果我删除分组,生成工作。所以 defgroup + param with doxygen + pdflatex -> 问题。
【问题讨论】:
-
您最近是否安装/更新了您的 MikTeX 发行版(即 2018 年 12 月中旬之后)?由于 Latex3/latex2e 的变化,LaTeX 禁忌包存在问题,在 doxygen 控制之外,另请参阅 doxygen 问题github.com/doxygen/doxygen/issues/6769
-
几天前我确实安装了最新版本并更新了所有最新版本,我也尝试手动添加该自定义禁忌包,但没有成功。
-
我认为您必须降级到 2018 年 12 月中旬之前的版本。
-
这可能吗?我应该从哪里获得旧版本?
-
不幸的是,我没有降级/获取旧 MikTeX 版本的经验(我也没有调查)。也许最好查看 MikTex 网站以了解可能的情况或在 tex.stackexchange.com 论坛中提问。主要问题是由于 latex3/latex2e 的更改,tabu 包没有得到维护并且现在已经损坏,并且制作 github.com/tabu-fixed/tabu 存储库的知识渊博的人正忙于其他任务,很难修复 tabu 包(以及所有交互)。
标签: latex doxygen tex pdflatex miktex