How can I cross-reference an indexed item inside a reStructuredText document?
For example, how can I cross-reference SectionB:
.. index::
pair: SectionA; SectionB
SectionB
--------
SectionB description.
I tried using the index labels in references, such as:
:ref:`SectionB`
but this does not work.
see: Cross-referencing arbitrary locations
in the Sphinx documentation.
I think what you might be missing is a reference label,
Try something like:
.. index::
pair: SectionA; SectionB
.. _section-b-label:
SectionB
--------
SectionB description.
and then elsewhere do:
:ref:`section-b-label`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With