【发布时间】:2015-06-27 13:54:10
【问题描述】:
要在 Sphinx 中使用 reStructuredText 引用一个部分,我可以这样做:
.. _my-reference-label:
Section to cross-reference
--------------------------
This is the text of the section.
It refers to the section itself, see :ref:`my-reference-label`.
正如here 解释的那样。
这导致该部分被按标题引用,即我得到以下行:
它指的是部分本身,请参阅Section to cross-reference。
(其中要交叉引用的部分链接到相应部分的开头)
我想改为:
它指的是部分本身,请参阅2.1。
其中 2.1 是节的编号。
有没有办法在 Sphinx 中使用 reStructuredText 来实现这一点?
【问题讨论】:
标签: python-sphinx restructuredtext