breathe-doc / breathe

ReStructuredText and Sphinx bridge to Doxygen
https://breathe-doc.org
Other
750 stars 198 forks source link

Link to @anchor from rst #744

Open t-b opened 2 years ago

t-b commented 2 years ago

breathe version 4.31.0

Having doxygen code like

/// @file MyFile.ipf
/// @brief comment
///
/// @anchor myanchor
/// ...

I would like to refer to the anchor from rst code. I've tried

See also :ref:`myanchor`.

but that did not work. Is that currently supported?

jakobandersen commented 2 years ago

I'm not sure this is directly supported, as the anchors from Doxygen gets mangled a bit before they are put into Sphinx. But do you have a small complete example? I'm not sure what I got set up reflects what you are trying to do.

t-b commented 2 years ago

Thanks for looking into this. Here is MWE. Ideally referring to myAnchor would work from either embedded rst code or from standalone rst files.