如何在Sphinx文档中创建内部超链接?我正在使用:
:role:`target`
但是它并没有起作用。
如何在Sphinx文档中创建内部超链接?我正在使用:
:role:`target`
但是它并没有起作用。
使用 ref
进行交叉引用。
:ref:`label-name`
您可以使用以下方式提供标签:
.. _label-name:
详见:https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref
角色用于创建自定义解释文本。详见:http://docutils.sourceforge.net/docs/ref/rst/directives.html#role
.. _HeaderTag:
Header
------
参考上述标题(可能不是同一文件)
:ref:`HeaderTag`
# or with custom text
:ref:`custom header<HeaderTag>`