From 52c71e41d464e24efa496754bd13c3b16cb7198c Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Fri, 13 Nov 2020 09:54:31 +0000 Subject: conf.py: Improve TOC and Outline depth in PDF output The default PDF output shows only chapter headings in the table of contents and in the outline (aka PDF bookmarks). We should override these defaults to set something more suitable. With a depth of 2 for the TOC we see both section and subsection headings which is enough to get the list of classes in the reference manual and the list of topics under "Common Tasks" in the development manual. Going to a deeper level would make the TOC unwieldy but we do want to make sure we can navigate more precisely using the outline (commonly shown in a left tab in PDF viewers) so we set the depth to 5 for the outline. (From yocto-docs rev: 5db16d3b01da0a138b6413347fcf2321a1bfae08) Signed-off-by: Paul Barker Signed-off-by: Richard Purdie --- documentation/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/documentation/conf.py b/documentation/conf.py index 9a0186f352..a8df6e8f86 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -124,3 +124,8 @@ html_last_updated_fmt = '%b %d, %Y' # Remove the trailing 'dot' in section numbers html_secnumber_suffix = " " + +latex_elements = { + 'passoptionstopackages': '\PassOptionsToPackage{bookmarksdepth=5}{hyperref}', + 'preamble': '\setcounter{tocdepth}{2}', +} -- cgit v1.2.3-54-g00ecf