How to insert some space before and after images in Sphinx

I created the document through Sphinx using the make latexpdf .

Now I have a problem that LaTeX sets my picture at the top right after the text, and at the bottom of the image it puts 3 or 4 lines.

Is it possible to get 1 place at the top and 1 place at the bottom of the image without need to use \ in the syntax?

My code is:

 title: =========== some text .. image:: screenshots/manage_products.png some more text another title: =========== 

EDIT: Here is a little screenshot to show you my problem. I also studied the main documentation for the Sphinx documentation (+ Syntax) and could not find an answer to this problem!

enter image description here

Btw: ignore the red arrow plz.

+4
source share
1 answer

You can use the .. figure :: directive to add an extra spacing that you would like to place around your image.

 title: =========== some text .. figure:: screenshots/manage_products.png some more text 

I also like to use the picture directive, as you have some additional controls for your image, such as marking.

 .. figure:: Your figure text here 
+4
source

Source: https://habr.com/ru/post/1493677/


All Articles