From b6ba8cad104eb44c8718c6b941df520dd207cd2d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Tue, 22 May 2018 23:47:21 +0900 Subject: [PATCH] Fix #4648: latex: Now "rubric" elements are rendered as unnumbered section title --- CHANGES | 1 + sphinx/writers/latex.py | 2 +- tests/test_build_latex.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 5f777ae7d..2f5afc1f6 100644 --- a/CHANGES +++ b/CHANGES @@ -33,6 +33,7 @@ Incompatible changes :confval:`viewcode_follow_imported_members` (refs: #4035) * #1857: latex: :confval:`latex_show_pagerefs` does not add pagerefs for citations +* #4648: latex: Now "rubric" elements are rendered as unnumbered section title Deprecated ---------- diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 006b476c4..12423242c 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1252,7 +1252,7 @@ class LaTeXTranslator(nodes.NodeVisitor): if len(node.children) == 1 and node.children[0].astext() in \ ('Footnotes', _('Footnotes')): raise nodes.SkipNode - self.body.append('\\paragraph{') + self.body.append('\\subsubsection*{') self.context.append('}\n') self.in_title = 1 diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 73e91fdea..dfc2059f8 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -617,7 +617,7 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning): assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result assert ('\\sphinxcaption{The table title with a reference' ' to {[}AuthorYear{]}}' in result) - assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result + assert '\\subsubsection*{The rubric title with a reference to {[}AuthorYear{]}}' in result assert ('\\chapter{The section with a reference to \\sphinxfootnotemark[5]}\n' '\\label{\\detokenize{index:the-section-with-a-reference-to}}' '%\n\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'