From 910e6e3e5d5c2d40d1971736f8d05507405c7f4f 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 f642906c556..56a50db6e33 100644 --- a/CHANGES +++ b/CHANGES @@ -18,6 +18,7 @@ Bugs fixed * #9917: C and C++, parse fundamental types no matter the order of simple type specifiers. +* #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