ReStructuredText numbered headers


ReStructuredText numbered headers



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:



1. Some Section



...



...



...



2. Another Section



...




1 Answer
1



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


sectnum



So you can add something like this in the very first line(s):


.. sectnum::



HTH





Duh, how did I miss it ? Thanks!
– gsakkis
Mar 2 '10 at 10:07






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to input without newline? (Python)

C++ thread error: no type named ‘type’ MINGW

Analog for TagView in flutter