0

I'm trying to have the following kind of layout in a Sphinx document :


Title

Article 1

Section 1

Article 2


I already saw that no matter what symbols I use to underline or overline the headers, the first appearance of a given heading will determine its hierarchical relation to the others. I.e, the following won't work :

==========
Title
==========

Article 1
---------

---------
Section 1
---------

Article 2
---------

Is there a way to circumvent this, for example by defining an invisible "Section 0" heading between Title and Article 1 with dashes as underline and overline, so that sphinx understands that Sections are greater than Articles, without actually displaying a "Section 0" between the title and the first article ?

I'm trying to do something like this Skipping heading levels in reStructuredText - although I don't really understand the code example they give...

Gouvernathor
  • 92
  • 1
  • 12

1 Answers1

0

The only ugly solution I found is the following :

=====
Title
=====

-----
 \
-----

Article 1
---------
...

The two issues are that it creates a blank gap in the resulting document, and that it inserts a title-less heading in the toctree at the index page (even though it does not do that in the local summary).

Gouvernathor
  • 92
  • 1
  • 12