Python-Sphinx: Link to Section in external File

本小妞迷上赌 提交于 2019-12-10 12:46:04

问题


I want to link to a section in an external file, but I can't get it to work. The :ref: does not seem to work globally, or do I use it wrong ?

..
    File: some_file.rst

.. _ref_section:

Some Section
------------

Paragraph, foo bar lorem ipsum.


..
    File: some_other_file.rst

.. seealso:: :ref:`ref_section`

How can I cross-reference to Sections from a different file ?


回答1:


Have a look at the Inter-Sphinx extension: http://sphinx-doc.org/en/master/usage/extensions/intersphinx.html



来源:https://stackoverflow.com/questions/8794088/python-sphinx-link-to-section-in-external-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!