Search code examples
pythonrestructuredtext

How to insert two blank lines between title and header in list-table of reStrutureText?


Here is the snippet of list-table in reStrutureText.

.. list-table:: Frozen Delights!
  :widths: 15 10 30
  :header-rows: 1

  * - Treat
    - Quantity
    - Description
  * - Albatross
    - 2.99
    - On a stick!
  * - Crunchy Frog
    - 1.49
    - If we took the bones out, it wouldn't be
      crunchy, now would it?
  * - Gannet Ripple
    - 1.99
    - On a stick!

The display effect.

enter image description here

How to insert two blank lines between title Frozen Delights! and header line Treat Quantity Description ?

To test \n in online tool http://rst.ninjs.org/, \n doesn't work.

enter image description here enter image description here


Solution

  • If all you want is a style modification with visual space, and not actual line breaks, then modify the style sheet of the rendered HTML.

    caption {
        margin-bottom: 2em;
    }
    

    caption style