Doxygen @tableofcontents not working

I am trying to use doxygen to create user help, when I use the \ tableofcontents command on the main page, nothing is displayed in the html output. I just don't know why, does anyone know how to use the table of contents command? Some examples will be better, thanks! Please note that the browser is OK.

+6
source share
1 answer

The key to the solution is to add a shortcut to the headers:

This is a level 1 header {#labelid_H1} ======================== This is a level 2 header {#labelid_H2} ------------------------ # This is a level 1 header # {#labelidH1} ## This is level 2 header ## {#labelidH2} 

Then the table of contents [TOC]

 [TOC] 

as well as link headers

 [Link to first headline](@ref labelid_H1) [Link to second headline](#labelid_H2) 

work.

Another point to mention is that Doxygen feeds on the first line of the file, which is used as the main page (look for β€œEat my shorts, Doxygen!” In: Use the README.md file as the main page in Doxygen )

+2
source

Source: https://habr.com/ru/post/916617/


All Articles