From 7550fdc86226d0a994239ba5e32af2ca4c00d387 Mon Sep 17 00:00:00 2001 From: Karl Hammond Date: Fri, 14 Oct 2022 15:28:55 -0500 Subject: [PATCH] Sphinx conf edit so PDF ToC entries w/ subsections >= 100 work --- doc/utils/sphinx-config/conf.py.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/utils/sphinx-config/conf.py.in b/doc/utils/sphinx-config/conf.py.in index c94fcaf1d2..501799608e 100644 --- a/doc/utils/sphinx-config/conf.py.in +++ b/doc/utils/sphinx-config/conf.py.in @@ -288,6 +288,14 @@ latex_elements = { 'preamble': r''' \setcounter{tocdepth}{2} \renewcommand{\AA}{\mbox{\textrm{\r{A}}}} +% Make ToC number fields wider to accommodate sections with >= 100 subsections +% or >= 10 subsections with >= 10 subsubsections +\makeatletter +\renewcommand*{\sphinxtableofcontentshook}{% + \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{3.1em}} + \renewcommand*\l@subsection{\@dottedtocline{2}{4.6em}{4.5em}} +} +\makeatother ''' }