From da00a1c22a139c3de6fed2fc08111e529c3ad310 Mon Sep 17 00:00:00 2001 From: jfbu Date: Sat, 30 Jan 2021 15:44:26 +0100 Subject: [PATCH] LaTeX: remove last argument of \titleformat in sphinx.sty The {\py@NormalColor} was wrong it should have been [\py@NormalColor]. It got executed by latex during document preamble and never got integrated as part of the heading... Closes: #8788 --- CHANGES | 2 ++ sphinx/texinputs/sphinx.sty | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 9384ef6d37..3fdd07aba3 100644 --- a/CHANGES +++ b/CHANGES @@ -114,6 +114,8 @@ Bugs fixed * #8442: LaTeX: some indexed terms are ignored when using xelatex engine (or pdflatex and :confval:`latex_use_xindy` set to True) with memoir class * #8780: LaTeX: long words in narrow columns may not be hyphenated +* #8788: LaTeX: ``\titleformat`` last argument in sphinx.sty should be + bracketed, not braced (and is anyhow not needed) Testing -------- diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index c331a6e857..6b4189b213 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -716,17 +716,17 @@ % Augment the sectioning commands used to get our own font family in place, % and reset some internal data items (\titleformat from titlesec package) \titleformat{\section}{\Large\py@HeaderFamily}% - {\py@TitleColor\thesection}{0.5em}{\py@TitleColor}{\py@NormalColor} + {\py@TitleColor\thesection}{0.5em}{\py@TitleColor} \titleformat{\subsection}{\large\py@HeaderFamily}% - {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}{\py@NormalColor} + {\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor} \titleformat{\subsubsection}{\py@HeaderFamily}% - {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}{\py@NormalColor} + {\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor} % By default paragraphs (and subsubsections) will not be numbered because % sphinxmanual.cls and sphinxhowto.cls set secnumdepth to 2 \titleformat{\paragraph}{\py@HeaderFamily}% - {\py@TitleColor\theparagraph}{0.5em}{\py@TitleColor}{\py@NormalColor} + {\py@TitleColor\theparagraph}{0.5em}{\py@TitleColor} \titleformat{\subparagraph}{\py@HeaderFamily}% - {\py@TitleColor\thesubparagraph}{0.5em}{\py@TitleColor}{\py@NormalColor} + {\py@TitleColor\thesubparagraph}{0.5em}{\py@TitleColor} %% GRAPHICS