如何使用 doxygen 获取降价页面目录以在乳胶中呈现?

How can I get a markdown page TOC to render in latex using doxygen?

我正在使用 doxygen 进行开发。我正在用 doxygen 将与源代码同时使用的 markdown 文件补充一些需求信息。每个降价要求文件都需要有自己的目录。如果您使用的是 HTML 输出,则使用 [TOC]\tableofcontents doxygen 命令非常适合此操作。但是,最终文档必须是 pdf 格式,并将通过 latex 输出生成。

今天测试 latex 输出后,我注意到在每个页面的 HTML 中呈现的 [TOC] 没有放入 latex 输出。

我将如何去添加一个单独的 [TOC] 到乳胶输出中的每个降价要求页面?

知道 latex 在编译器的第二个 运行 上生成目录,我想没有办法只为那些特定页面生成目录。相反,我必须将降价文件生成为它们自己的文档,然后以某种方式将它们包含在主文档中?我该怎么做?

我希望有更简单的事情。

答案: 从 doxygen 文档中,它表明必须在命令中指定 latex 才能在乳胶中呈现。

\tableofcontents{latex,html}

这将在 html 和乳胶中呈现目录。

来自1.8.20版本的文档:

24.112 \tableofcontents['{'[option[:level]][,option[:level]]*'}']

Creates a table of contents at the top of a page, listing all sections and subsections in the page. The option can be HTML or LaTeX or XML or DocBook. When a level is specified this means the maximum nesting level that is shown. The value of level should be in the range 1..5, values outside this range are considered to be 5. In case no level is specified level is set to 5 (show all) In case no option. is specified \tableofcontents acts as if just the option HTML and XML was specified. In case of multiple \tableofcontents commands in a page the option(s) will be used additional to the already specified option(s), but only the last level of an option is valid.

Warning

This command only works inside related page documentation and not in other documentation blocks and only has effect in the the specified output!

另请参阅:https://www.doxygen.nl/manual/commands.html#cmdtableofcontents