我对使用sphinx还很陌生,第一次为python项目做文档。 例如,如何在 sphinx 文档中嵌入图像?
最佳答案
来自documenation :
There are two image directives:
image
andfigure
.An
image
is a simple picture.A
figure
consists of image data (including image options), an optional caption (a single paragraph), and an optional legend (arbitrary body elements). For page-based output media, figures might float to a different position if this helps the page layout.
图像
用法示例:
.. image:: picture.jpg
:width: 200px
:height: 100px
:scale: 50 %
:alt: alternate text
:align: right
figure
用法示例:
.. figure:: picture.png
:scale: 50 %
:alt: map to buried treasure
This is the caption of the figure (a simple paragraph).
关于python-sphinx - 我们如何在 sphinx 文档中嵌入图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25866102/