How to add extra whitespace between section header and a paragraph How to add extra whitespace between section header and a paragraph python python

How to add extra whitespace between section header and a paragraph


You can use vertical bars at the beginning of lines to produce blank lines in the output. Like this:

Heading-------||Paragraph with text.


I just had this problem and as davidjb pointed out, using | gives you too much space on LaTeX output. This is how I solved it. Define the following:

.. |vspace| raw:: latex   \vspace{5mm}

Then you can just use |vspace| on the places where you want the vertical space to get appropriate vertical space.

If you want spaces in html output as well, you can define:

.. |vspace| raw:: latex   \vspace{5mm}.. |br| raw:: html   <br />

Then when you need the space, simply put:

|vspace| |br|

and it will automatically take care of the spacing depending on the output format.