I inherited an existing RST document with the following structure:
DocTitle
========
Heading2
--------
Heading1
========
Note that Heading1
is a larger heading than Heading2
. Due to the fact that I am now adding this document to a TOC, I want it to be properly indented. That means changing the title to a new heading, such as the following:
DocTitle
########
Heading2
--------
Heading1
========
The problem is that the above makes Heading2
larger than Heading1
. Is there some way to define a heading style without adding an actual heading to the page? For example, I want to do something like:
DocTitle
########
.. hidden::
Heading1
========
Heading2
--------
Heading1
========
Is there any way to achieve this result in an RST file?
Related question: Skipping heading levels in reStructuredText
The answer to that question is "no", but I wonder if there is a way to define a heading that is hidden from the resulting output.