Sphinx and RST syntax guide (0.9.3)

FAQS

How to create an internal reference

First, you need to create a label in the text wherever you want the reference to jump to. Here, we place such a label just before the title (see source file) using this syntax:

.. _How_to_create_an_internal_reference:

Then, use the :ref: keyword and reference name as follows:

:ref:`How_to_create_an_internal_reference`

So, in the text, it will simply appears like that: How to create an internal reference.

This is not satisfactory because the name is not great. So, you can replace it as follows:

:ref:`nicer reference <How_to_create_an_internal_reference>`

which renders as follows nicer reference

Get section numbers

Give a :numbered: option to the toctree directive where you want to start numbering.:

.. toctree::
   :numbered: 1