我正在尝试将外部API的交叉引用添加到我的文档中,但我面临三种不同的行为。我将sphinx(1.3.1)与Python(2.7.3)一起使用,我的intersphinx映射配置为:{'python':('https://docs.python.org/2.7',None),'numpy':('http://docs.scipy.org/doc/numpy/',None),'cv2':('http://docs.opencv.org/2.4/',None),'h5py':('http://docs.h5py.org/en/latest/',None)}我很容易用:class:`numpy
我正在尝试将外部API的交叉引用添加到我的文档中,但我面临三种不同的行为。我将sphinx(1.3.1)与Python(2.7.3)一起使用,我的intersphinx映射配置为:{'python':('https://docs.python.org/2.7',None),'numpy':('http://docs.scipy.org/doc/numpy/',None),'cv2':('http://docs.opencv.org/2.4/',None),'h5py':('http://docs.h5py.org/en/latest/',None)}我很容易用:class:`numpy
我正在使用sphinx为我的python库编写文档,我还使用intersphinx添加了另一个sphinx文档。它工作得很好,但是我的一些函数的名称与引用文档中的名称相同,这导致隐藏了它们的名称以供:func:...引用。有什么方法可以在其他文档中引用阴影函数do_some()吗?(:func:`do_some`创建到我的函数do_some()的链接) 最佳答案 根据docs您可以将intersphinx_mapping中的标识符用作目标的前缀。示例::ref:`comparisonmanual`我认为这也适用于函数。
我正在尝试使用Sphinx来记录项目,但我不知道如何使用intersphinx。我使用这一行::py:meth:`math.sin`添加链接,但在输出中,它显示为粗体,而不是链接。尽管该行不起作用,但以下两者都起作用::py:meth:`dict.items`:py:class:`zipfile.ZipFile`我在conf.py文件中的intersphinx_mapping值是:intersphinx_mapping={'python':('http://docs.python.org/2.7',None)} 最佳答案 :py:m
按照在包之间设置Sphinx文档链接的文档,我添加了intersphinx_mapping={'python':('http://docs.python.org/2',None),'numpy':('http://docs.scipy.org/doc/numpy/',None),'scipy':('http://docs.scipy.org/doc/scipy/reference/',None),'matplotlib':('http://matplotlib.sourceforge.net/',None)}到我的conf.py,但似乎无法获得除Python本身之外的任何项目的链接以工