From 5b08dd48f2b1657d4923025e0f06507bc7ae6cca 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: f74238d08163f6fc45939422ae96a3d69c0e4449) Signed-off-by: Paul Barker Signed-off-by: Richard Purdie (cherry picked from commit 5db16d3b01da0a138b6413347fcf2321a1bfae08) Signed-off-by: Nicolas Dechesne Signed-off-by: Richard Purdie --- documentation/conf.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'documentation') 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