From e1b2936892677ecf7c7a80a64d9552ae4aba7af6 Mon Sep 17 00:00:00 2001 From: jfbu <2589111+jfbu@users.noreply.github.com> Date: Sun, 5 Dec 2021 22:03:34 +0100 Subject: [PATCH] Fix #9944 (LaTeX writer visit_desc_content()) The "~" was added 14 years ago at 3761223d85b16 Seems not to be needed anymore and causes extra vertical space in some circumstances. t --- CHANGES | 1 + sphinx/writers/latex.py | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index b7895fe6f1a..2c41eb1f89c 100644 --- a/CHANGES +++ b/CHANGES @@ -38,6 +38,7 @@ Bugs fixed * #9909: HTML, prevent line-wrapping in literal text. * #9925: LaTeX: prohibit also with ``'xelatex'`` line splitting at dashes of inline and parsed literals +* #9944: LaTeX: extra vertical whitespace for some nested declarations Testing -------- diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 3f032e6164f..6f7e2024183 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -757,9 +757,7 @@ def depart_desc_signature_line(self, node: Element) -> None: self._depart_signature_line(node) def visit_desc_content(self, node: Element) -> None: - if node.children and not isinstance(node.children[0], nodes.paragraph): - # avoid empty desc environment which causes a formatting bug - self.body.append('~') + pass def depart_desc_content(self, node: Element) -> None: pass