第一个* .rst文件“ lower.rst”与“ figures”文件夹位于同一级别,我在其中包含一个数字,如下所示:
.. figure:: figures/figure1.png
第二个* .rst文件“ higher.rst”比lower.rst高几个级别.实际上,我将lower.rst包含在higher.rst中,如下所示:
.. include:: relative/path/to/lower.rst.
不幸的是,在higher.rst中,没有显示lower.rst中的数字:
"image file not readable" error.
upper.rst在当前目录中查找图形,而不是指向原始的下部目录.
此问题已在此处解决:Can sphinx link to documents that are not located in directories below the root document?,但我仍然不明白如何使用此处提供的信息解决我的问题.
.. figure:: /_static/figure1.png
现在,从较高级别的文件中,您应该可以包括较低级别的文件,并且两个文件都应显示图像.