summaryrefslogtreecommitdiff
path: root/doc/conf.py
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2021-01-24 00:41:59 +0100
committerjfbu <jfbu@free.fr>2021-01-24 00:41:59 +0100
commit3a3a479f1e739d688e831744ecc96b310b524f1d (patch)
tree2911f5f7f76c261ca00ef1e4ce534cc00880b220 /doc/conf.py
parentcef669cb0f3d4218c89ce7f92154760d5b567dfe (diff)
downloadsphinx-git-3a3a479f1e739d688e831744ecc96b310b524f1d.tar.gz
Improve Sphinx own pdf docs
Prior to this the depth of the bookmarks is too low, one does not even get to see for example what are the built-in extensions offered by Sphinx. Similarly the LaTeX created table of contents has not enough depth. Dozens of contiguous pages from our documentation get only a single link, it is very hard for newcomer to get some feeling of the scope of Sphinx. With a more detailed table of contents (be it inside the PDF or via the collapsable bookmark panel of PDF viewer) learning Sphinx is easier.
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 9f018bc7b..53f036d3e 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -69,8 +69,15 @@ latex_elements = {
\substitutefont{X2}{\sfdefault}{cmss}
\substitutefont{X2}{\ttdefault}{cmtt}
''',
- 'passoptionstopackages': '\\PassOptionsToPackage{svgnames}{xcolor}',
- 'preamble': '\\DeclareUnicodeCharacter{229E}{\\ensuremath{\\boxplus}}',
+ 'passoptionstopackages': r'''
+\PassOptionsToPackage{svgnames}{xcolor}
+\PassOptionsToPackage{bookmarksdepth=3}{hyperref}% depth of pdf bookmarks
+''',
+ 'preamble': r'''
+\DeclareUnicodeCharacter{229E}{\ensuremath{\boxplus}}
+\setcounter{tocdepth}{3}% depth of what is kept from toc file
+\setcounter{secnumdepth}{1}% depth of section numbering
+''',
'fvset': '\\fvset{fontsize=auto}',
# fix missing index entry due to RTD doing only once pdflatex after makeindex
'printindex': r'''