Headlines and anchors
Each reST document must have a title. It is overlined and underlined like this:
.. _rest-cheat-sheet:
=============================
Cheat sheet: reStructuredText
=============================
The anchor is used for permalinks. It should be lowercase with dashes between words. During rendering special signs are converted into dashes and all letters changed to lowercase if you ignore this. Start a new anchor with the anchor of its section, see Naming a new anchor.
Use headers to divide your document into sections. Start with h2:
By convention we use the following underlines:
.. _rest-cheat-sheet:
=============================
Cheat sheet: reStructuredText
=============================
Some text.
.. _h2-headline:
H2 headline
===========
Lorem Ipsum
.. _h3-headline:
H3 headline
-----------
Some more text
Further headline levels are possible:
.. _h4-headline:
H4 headline
~~~~~~~~~~~
.. _h5-headline:
H5 headline
"""""""""""
.. _h6-headline:
H6 headline
'''''''''''
.. _another-h2-headline:
Another H2 headline
===================
They look like this:
H2 headline
H3 headline
H4 headline
H5 headline
H6 headline
Syntax of headlines
Make the over- and underline as long as the headline. The rendering does not check this.
Each headline should have an anchor. Otherwise permalinking does not work.
Never delete an anchor. If a concept is removed without substitute, move the anchor to a special page that says when and why the concept was removed. See Keeping anchors working.