跨页面或同等内容的狮身人面像脚注

时间:2018-09-28 03:30:27

标签: python python-sphinx restructuredtext

我有一个带有一些脚注的文档:

doc.rst

This sentence needs clarification\ [#fn1]_.

如果我将脚注放在同一文件中,则效果很好。但是,我希望有一个单独的文件,其中包含来自几个不同文档的脚注:

supplement.rst

[#fn1] A word of explanation.

这给了我两套警告。首先在supplement.rst中发出警告:

...supplement.rst:1: WARNING: Footnote [#] is not referenced.

然后在doc.rst中出现一对警告:

...doc.rst:1: WARNING: Too many autonumbered footnote references: only 0 corresponding footnotes available.
...doc.rst:1: WARNING: Unknown target name "fn1".

doc.html中的引用被呈现为文本[#fn1]_的链接,该文本无处可见,supplement.html中注释左侧的数字为灰色。

如何在sphinx中实现跨文档脚注?

1 个答案:

答案 0 :(得分:1)

脚注的范围仅限于文档,并且对于整个文档集不是全局的。您可以实现citationsglossary