How to add extra whitespace between section header and a paragraph

六眼飞鱼酱① 提交于 2019-12-17 10:56:32

问题


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.


回答1:


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

Heading
-------

|
|

Paragraph with text.



回答2:


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.



来源:https://stackoverflow.com/questions/8218039/how-to-add-extra-whitespace-between-section-header-and-a-paragraph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!