RST

Styling tables

Link

Underlining

Source

There is not method per default for underlining text in restructuredText. This is not part of the specification. This is explained in Problems with StructuredText

The solution is to make use of the role command:

.. role:: underline
   :class: underlined

:underlined:`Underlined Text`

underlined:
  underline: true

Adding whitespace

Source

In order to put some extra whitespace between e.g. a heading and a paragraph, add the pipe:

Heading
-------

|
|
|

Lorem Ipsum dolor sit amet.

Section numbering

Source

This is a bit hidden. To add section numbering, add this line into your rst document:

.. section-numbering::

Cheat Sheet

Source

Inline

italic | *string* | string | bold | **string** | string | verbatim | ``*`` | * |

link external | `[text] <https://www.example.com>`_ | text | link to title | `link text`_ | link text | Link to headlines and titles by just using their string link explicit | label: .. _top_link: [Top link]
Link: top_link_ or :ref:`top_link` | top_link / [Top Link]

Code

Example::

    import math
    print 'import done'

Renders to:

Example::

    import math
    print 'import done'

Other example:

.. code-block:: html
   :linenos:

   <h1>Code block example</h1>

renders to:

<h1>Code block example</h1>

Pagebreaks

.. raw:: pdf

   PageBreak

More information