How to add extra whitespace between section header and a paragraph

前端 未结 2 1466
青春惊慌失措
青春惊慌失措 2020-12-03 02:54

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 re

相关标签:
2条回答
  • 2020-12-03 03:10

    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.

    0 讨论(0)
  • 2020-12-03 03:18

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

    Heading
    -------
    
    |
    |
    
    Paragraph with text.
    
    0 讨论(0)
提交回复
热议问题