1

There is a markdown file which I'm using to create part of a doxygen documentation through cmake directives and doxyfile.in statements. The generated documentation is almost correct. Actually this markdown file is the main page of the doxygen documentation.

The beginning of the markdown file reads

# Title1

[TOC]
## Title2

and the rest of the document goes on. Nevertheless, when I generate the doxygen documentation the table of contents does not appear. Please, does someone have any clue?

0

1 Answer 1

1

We are dealing here with the in-page table of contents.

Looks like that there are multiple problems.

1) [TOC] should be before the first header (i.e. # Title1) (when this is not the case the table of contents is still incorrect unless other commands are given like \page.)

2) The TOC_INCLUDE_HEADINGS (in the Doxyfile i.e. the doxygen configuration file) should be set to a value > 0 to get an n-page TOC. From the Doxyfile / doxygen documentation:

# 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.
3
  • I've just pushed a proposed documentation patch to github (pull request 688, github.com/doxygen/doxygen/pull/688).
    – albert
    Mar 31, 2018 at 12:10
  • Your answer is correct, it worked well. If I let the [TOC] after the first header the table of contents does not show the correct titles and the links stay broken.
    – lmc
    Mar 31, 2018 at 19:55
  • Remark is correct (regarding the place of the [TOC]), doxygen gives a warning and incorrect TOC. I had also a \page command which again results in correct results (it is all quite complex the possibilities of markdown together with regular doxygen commands). I'll adjust the answer so you can accept it.
    – albert
    Apr 1, 2018 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.