如何在doxygen生成的html文件中添加目录?

问题描述 投票:1回答:1

我有一个用doxygen记录的C项目,想要添加一个显示部分和子部分的目录。我按照doxygen手册中的说明尝试了\tableofcontents[TOC],但没有任何反应。这是一个小例子:

/***********************************//**
 * \file        Bsp.c
 * \brief       example
 *
 * \tableofcontents
 *
 * \section sec1 section 1
 * blabla
 *
 * \section sec2 section 2
 * blabla
 *
 * \subsection ssec21 subsection 21
 * blabla
 ***********************************/



/***********************************//**
 * \brief   
 *
 * \section sec1func funcsection 1
 * blabla
 ***********************************/
void func() 
{

}

这是我在html中得到的:

link to output of example

我做错了什么?每个提示都要提前感谢!

markdown doxygen tableofcontents
1个回答
2
投票

doxygen的documentation说,@tableofcontents仅适用于额外的页面(@page@mainpage),而不是常规文档块。

您仍然可以使用@ref和一些html构建自己的目录(尽管它不如使用builtin命令那么好)。

© www.soinside.com 2019 - 2024. All rights reserved.