Unb*_*own 7 restructuredtext python-sphinx
如何在reStructuredText文档中交叉引用索引项?
例如,我如何交叉引用SectionB:
.. index::
pair: SectionA; SectionB
SectionB
--------
SectionB description.
Run Code Online (Sandbox Code Playgroud)
我试着用:ref:'SectionB'和:index:'SectionB',但他们没有工作.
谢谢.
请参阅:交叉引用任意位置
在 Sphinx 文档中。
我认为你可能缺少的是参考标签,
尝试类似的方法:
.. index::
pair: SectionA; SectionB
.. _section-b-label:
SectionB
--------
SectionB description.
Run Code Online (Sandbox Code Playgroud)
然后在其他地方做:
:ref:`section-b-label`
Run Code Online (Sandbox Code Playgroud)