要在狮身人面像中引用使用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`.正如所解释的,这里。
这将导致通过标题引用的部分,也就是说,我得到了行:
它引用了部分本身,请参阅http://section-to-cross-reference/。
(凡各条互相参照链接至相应章节的开头)
我想要的是:
它引用了部分本身,请参阅http://section-to-cross-reference/。
其中2.1是该节的编号。
有没有办法在狮身人面像中使用reStructuredText来完成这个任务?
发布于 2015-04-23 16:34:16
numsec狮身人面像扩展可以满足您的需要。源代码在这里:https://github.com/jterrace/sphinxtr/blob/master/extensions/numsec.py。
该扩展是Stack溢出成员跳台开发的"Sphinx论文资源“包的一部分。见https://github.com/jterrace/sphinxtr。
https://stackoverflow.com/questions/29754675
复制相似问题