1
votes

I'm using a markdown mainpage (mainpage.md) like this

The Main Page
=============

qwertz

A Section
---------

asdf

together with USE_MDFILE_AS_MAINPAGE = mainpage.md in the configuration.

I'd like to (auto-)link to the section 'A Section' from the documentation in the source coude, but I haven't yet figured out how to do that. I assume the 'A Section' generates an auto-linkable target, but how do I reference that (i.e. using \see ?WhatToWriteHere?)?

Additionaly, trying this

A Section {#asdfg}
---------

yields the strange warning found subsection command outside of section context!.

1
Seems like a doxygen bug. See [the other question][1], for a more in depth exploration. [1]: stackoverflow.com/questions/13648124/…user1959101
Ok, maybe I should move this over to the doxygen mailing list.mkluwe

1 Answers

1
votes

If you code the mainpage using @section section_01 A Section instead of using the ===== underlines then you can use the doxygen command

@ref section_01 "text for link here"

to create a link to it from elsewhere. I'm doing this successfully using 1.8.5.

It seems that vanilla markdown headers (either using underlining of # sequences) processed by Doxygen don't produce anything that Doxygen recognises as a target - either for linking to or for listing in a document index (which is a bit frustrating).