Python sphinx 创建具有独立文本的链接
是否可以使用sphinx创建文档内链接,以便显示的文本独立于链接和目的地? 目前,我制作文档内链接,如下所示:Python sphinx 创建具有独立文本的链接,python-sphinx,restructuredtext,Python Sphinx,Restructuredtext,是否可以使用sphinx创建文档内链接,以便显示的文本独立于链接和目的地? 目前,我制作文档内链接,如下所示: .. _Label_For_Section: =============== Name Of Section =============== The link :ref:`Label_For_Section` is rendered as "Name Of Section". The link Label_For_Section_ is rendered as "Label_For
.. _Label_For_Section:
===============
Name Of Section
===============
The link :ref:`Label_For_Section` is rendered as "Name Of Section".
The link Label_For_Section_ is rendered as "Label_For_Section".
我想要的是一种链接方式,其中目标文本、链接标签和显示的链接文本都可以是不同的字符串。例如,链接到一个名为“a”的部分,带有标签_B:
显示为“C”
注
我注意到其他类型的链接(例如外部超链接)也受到类似的约束,我认为解决方案可能看起来类似,但我正在专门寻找文档内链接的解决方案。请参见,特别是
:ref:`链接标题`
具体请参见
:ref:`链接标题`
:ref:`Link title <label-name>`