Is there a way in rst to have automatic header numbering ? That is something like:
#. Some Section
===============
...
#. Some Subsection
------------------
...
#. Another Subsection
---------------------
...
#. Another Section
==================
...
that would be rendered as:
...
...
...
...
RST stands for ReStructured Text. It is the standard markup language used for documenting python packages. Sphinx is the Python package that generates an html website from RST files, and it is what we are using to generate this site.
To get a new line immediately following a few long lines I have to a) start a new (empty) line and b) THEN (on the next line) follow it with | <my new line> .
According to the docutils manual, you can use the sectnum
directive: http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#automatic-section-numbering
So you can add something like this in the very first line(s):
.. sectnum::
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With