2024-04-20 12:51:00 发布
网友
我有2页包括在目录中。你知道吗
在第1页我有以下内容
The link :py:class:`testtest`
在第2页我有
The link :py:class:`testtest` .. autoclass:: testtest
在第2页的链接是工作的,因为类已自动记录使用自动类。你知道吗
为什么第1页上的相同链接不起作用?如果不在第1页包含autoclass指令,如何使其工作?你知道吗
谢谢你
杰伊
page_1不知道在哪里可以找到testtest-page_2找到它,因为当它没有直接找到它时,它隐式地在节点的“作用域”(也就是说)中查找它。正在执行:
page_1
testtest
page_2
:py:class:`module.testtest`
在page_1中,如果路径设置正确,还可以执行以下操作:
:py:class:`~module.testtest`
只有testtest作为链接文本。为了避免必须使用模块前缀,可以使用.. currentmodule:: modulename指令,但一次只能应用其中一个指令,因此如果在多个模块中重新引用内容,就不会真正节省键入时间。你知道吗
.. currentmodule:: modulename
http://sphinx-doc.org/domains.html#directive-py:currentmodulehttp://sphinx-doc.org/markup/inline.html#xref-syntaxhttp://sphinx-doc.org/domains.html#cross-referencing-python-objects
page_1
不知道在哪里可以找到testtest
-page_2
找到它,因为当它没有直接找到它时,它隐式地在节点的“作用域”(也就是说)中查找它。正在执行:在
page_1
中,如果路径设置正确,还可以执行以下操作:只有
testtest
作为链接文本。为了避免必须使用模块前缀,可以使用.. currentmodule:: modulename
指令,但一次只能应用其中一个指令,因此如果在多个模块中重新引用内容,就不会真正节省键入时间。你知道吗http://sphinx-doc.org/domains.html#directive-py:currentmodule
http://sphinx-doc.org/markup/inline.html#xref-syntax
http://sphinx-doc.org/domains.html#cross-referencing-python-objects
相关问题 更多 >
编程相关推荐