From d83090c420fe3684c3847ef7b41e50c2739e2b8f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 5 Aug 2019 11:41:54 +0200 Subject: [PATCH 1/2] LaTeX: Avoid section titles at the end of a page The topic directive uses in LaTeX rendering a framed box which encourages a pagebreak before it even if the element is a section title. This can be avoided with the nobottomtitles option of the titlesec package. Fixes: #6618 --- sphinx/texinputs/sphinx.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 2eebbb914..9198d739b 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -40,7 +40,7 @@ % for \text macro and \iffirstchoice@ conditional even if amsmath not loaded \RequirePackage{amstext} \RequirePackage{textcomp}% "warn" option issued from template -\RequirePackage{titlesec} +\RequirePackage[nobottomtitles*]{titlesec} \@ifpackagelater{titlesec}{2016/03/15}% {\@ifpackagelater{titlesec}{2016/03/21}% {}% From fcba6b68fc7fdcc0aeb932ef489b0c353d825454 Mon Sep 17 00:00:00 2001 From: jfbu Date: Thu, 5 Sep 2019 09:26:05 +0200 Subject: [PATCH 2/2] Update CHANGES for PR #6633 --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 2a26406f3..a10ed1969 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,8 @@ Features added Bugs fixed ---------- +* #6618: LaTeX: Avoid section names at the end of a page + Testing --------