将 table 内容导出到 doxygen 文档的 Markdown 文件不会在 HTML 中创建目录

Markdown file with table of contents exported to a doxygen documentation does not create a TOC in HTML

有一个降价文件,我正在使用它通过 cmake 指令和 doxyfile.in 语句创建部分 doxygen 文档。生成的文档几乎是正确的。其实这个markdown文件就是doxygen文档的主页。

降价文件的开头是

# Title1

[TOC]
## Title2

文档的其余部分继续。然而,当我生成 doxygen 文档时, table 的内容不会出现。请问有人知道吗?

我们这里处理的是in-pagetable的内容。

看起来有多个问题。

1) [TOC] 应该在第一个 header 之前(即 # Title1)(如果不是这种情况,内容的 table 仍然不正确,除非给出其他命令,如 \页。)

2) TOC_INCLUDE_HEADINGS(在 Doxyfile 即 doxygen 配置文件中)应设置为 > 0 的值以获得 n-page TOC。来自 Doxyfile / doxygen 文档:

# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
# to that level are automatically included in the table of contents, even if
# they do not have an id attribute.
# Note: This feature currently applies only to Markdown headings.
# Minimum value: 0, maximum value: 99, default value: 0.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.