Document Title (Level 1)
=========================
Major Section (Level 2)
-----------------------
Subsection (Level 3)
~~~~~~~~~~~~~~~~~~~~
Sub-subsection (Level 4)
^^^^^^^^^^^^^^^^^^^^^^^^
Paragraph (Level 5)
"""""""""""""""""""
Sub-paragraph (Level 6)
'''''''''''''''''''''''| Level | Character | Usage Example |
|---|---|---|
| 1 | = |
Document/Chapter title (introduction.rst) |
| 2 | - |
Major sections (Recommandations...) |
| 3 | ~ |
Subsections (Composants Polarisés) |
| 4 | ^ |
Sub-subsections (Composants à Surveiller) |
| 5 | " |
Paragraphs (detailed procedures) |
| 6 | ' |
Sub-paragraphs (fine details) |
For very deep documentation structures:
######################
Document Title (Level 0) - with overline
######################
Major Part (Level 1) - with overline
********************
Chapter (Level 2)
=================
Section (Level 3)
-----------------
Subsection (Level 4)
~~~~~~~~~~~~~~~~~~~~
Sub-subsection (Level 5)
^^^^^^^^^^^^^^^^^^^^^^^^
Paragraph (Level 6)
"""""""""""""""""""
Sub-paragraph (Level 7)
'''''''''''''''''''''''- Underline length: Must be at least as long as the title text
- Consistency: Use the same character for the same level throughout the entire documentation
- No skipping: Don't skip levels (e.g., don't go from
=directly to~without using-) - Overlines (optional): Only for top-level titles (Level 0-1), both overline and underline must match
❌ Wrong - Using ' for level 4:
Composants Polarisés
~~~~~~~~~~~~~~~~~~~~
Composants à Surveiller
''''''''''''''''''''''' ← Too deep!✅ Correct - Using ^ for level 4:
Composants Polarisés
~~~~~~~~~~~~~~~~~~~~
Composants à Surveiller
^^^^^^^^^^^^^^^^^^^^^^^ ← Correct!To check for title level inconsistencies:
make html 2>&1 | grep -i "title level inconsistent"- Sphinx maps RST sections to HTML
<h1>through<h6> - Levels deeper than 6 become
<p class="rubric">in HTML - The actual character doesn't matter to RST parser, but consistency matters for maintainability
- Alternative characters for additional levels:
+ . : ; , _ *
2025-11-30 - Fixed 6 instances where ' was incorrectly used instead of ^ for level 4 headings