Sphinx¶
This documents current Sphinx behaviour for html and latex
using the current implementation of toctree.
Parts and Chapters¶
The following toctree is contained in master_doc
.. toctree::
:maxdepth: 2
:caption: Contents:
:numbered:
intro
part1
part2
with additional toctree directives in part1.md and part2.md
.. toctree::
chapter1
chapter2
produces the following html and pdf output
and conf.py contains latex_toplevel_sectioning = "part"
Limitations:
The
introdocument is interpreted as a part and doesn’t seem to be any direct support forfrontmatterin the current sphinx approach. This is despite thetopheader being marked aslevel=1using====rather than alevel=0using double====markup.
Important Notes:
Section levels seem to be inferred at the document level – so for each document the section level is set to the base level for the first header of the document regardless of any relative relationship outside of the document.
this means that
chapter1.rstwith:Chapter 1 ========= Section1 --------
and a
chapter2.rstwithChapter 2 --------- Section 1 ~~~~~~~~~
have the same level for
Chapter 1andChapter 2(andSections) in the output.The
sphinx/mixed-sphinx-jbproject allows for exploration oftocstructures. It allows the ability to includefrontmatterforhtmlwith numbering starting at the first part – but it doesn’t cater toabstractstyle number such asA.