Suppose I have:
- a
foo0.rst
file at the root (source
) of mysphinx-doc
source folder, - a
foo1.rst
file in a subfoldersubfolder1
ofsource
, - a
foo2.rst
file in a subfoldersubfolder2
ofsubfolder1
,
that is:
$ tree source
source
├── foo0.rst
└── subfolder1
├── foo1.rst
└── subfolder2
└── foo2.rst
all with the same content:
This a title
============
Now, if the index.rst
contains:
Welcome to Test's documentation!
================================
.. toctree::
:maxdepth: 3
:caption: Contents:
foo0
subfolder1/foo1
subfolder1/subfolder2/foo2
make html
gives:
Welcome to Test’s documentation!
Contents:
• This a title
• This a title
• This a title
that is all the headings are sections.
What I would like to get instead is the following:
Welcome to Test’s documentation!
Contents:
• This a title
◦ This a title
▪ This a title
that is the heading of:
foo0.rst
being a section,subfolder1/foo1.rst
being a subsection (and not a section),subfolder1/subfolder2/foo2.rst
being a subsubsection (and not a section).
My question is therefore: is it possible to make the heading levels of documents belonging to (sub(sub(...)))folders automatically depend on the depth's levels of the folders they belong to?