And*_*ier 5 python glossary restructuredtext python-sphinx
我确实了解如何在 Sphinx RST 中创建术语表,以及如何链接到其术语:
.. glossary::
term1
description of term1
Linking to :term:`term1` is easy.
Run Code Online (Sandbox Code Playgroud)
我的问题是,如何链接到不同 Sphinx 项目词汇表中的术语(我有一个 intersphinx 定义)?
例如,我对 Python 2 的 Sphinx 文档有一个 intersphinx 定义:
intersphinx_mapping = {
'py': ('https://docs.python.org/2/', None),
}
Run Code Online (Sandbox Code Playgroud)
但我未能成功指定其词汇表术语之一的链接,使用 RST 源中的任何这些结构:
:ref:`py:iterable`
:ref:`py:glossary.iterable`
:term:`py:iterable`
:term:`py:glossary.iterable`
Run Code Online (Sandbox Code Playgroud)
这可能吗?如果可能的话,词汇表的定义需要是什么样子,以及对词汇表术语的引用如何?