I created a document via Sphinx with the make latexpdf
command.
Now I have the problem that LaTeX is setting my picture at the top directly after the text and at the bottom of the image it puts 3 or 4 linebreaks.
Is there a possibility to get 1 space at the top and 1 space at the bottom of the picture without
having to use a \
in the syntax?
My code:
title:
===========
some text
.. image:: screenshots/manage_products.png
some more text
another title:
===========
EDIT: Here a little Screenshot to show you my problem. I also looked into the main documentation of Sphinx (+ Syntax documentation) and found no answer for this problem!
Btw: Ignore the red arrow plz.
For instance, the introduction page is an external page with a link called introduction at the top of the page. You can jump there by writting :ref:`introduction`, which appears as: Why Sphinx and for which users ?. Note that if you use the ref role, the final underscore is not required anymore. 1.2.4. List and bullets ¶ * This is a bulleted list.
Sphinx and the RST syntax provides directives to include formatted text. As an example, let us consider the code-block syntax. It allows to insert code (here HTML) within your document: .. code-block:: html :linenos: <h1>code block example</h1>. Its rendering is: 1. <h1> code block example </h1>.
Other units (like pt for points) will be used for HTML and LaTeX output (the latter replaces pt by bp as this is the TeX unit such that 72bp=1in ). Sphinx extends the standard docutils behavior by allowing an asterisk for the extension: .. image:: gnu.* Sphinx then searches for all images matching the provided pattern and determines their type.
The path to the image is relative to the file. See the Sphinx documentationfor more information. Share Improve this answer Follow answered Sep 16 '14 at 22:52 devin_sdevin_s
You could use the .. figure:: directive to add the extra spacing you would like around your image.
title:
===========
some text
.. figure:: screenshots/manage_products.png
some more text
I like using the figure directive more as well, since you have some additional control elements to your image, such as labeling.
.. figure::
Your figure text here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With