I want to have more space between the header and the paragraph and between the paragraphs. I doesn't want this to be a global setting but I want to use it where and when required. Appreciate any suggestions.
Asked
Active
Viewed 6,153 times
2 Answers
37
You can use vertical bars at the beginning of lines to produce blank lines in the output. Like this:
Heading
-------
|
|
Paragraph with text.

mzjn
- 48,958
- 13
- 128
- 248
-
5For LaTeX output, this adds far too much spacing, even when just used with a single pipe character. Seems the LaTeX ``DUlineblock`` that gets generated defaults to 2.5em height, and with paragraph spacing results in a lot more space than just one line. – davidjb Jun 17 '14 at 22:58
15
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.

joon
- 3,899
- 1
- 40
- 53
-
1Thanks very much for this, it's just solved the same issue that I was seeing. – phil76 Feb 06 '23 at 10:03