From 792a4481b3341269434f7c60709d8d812d8eff60 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 9 Jan 2022 22:32:48 -0800 Subject: [PATCH] Remove vertical spacing between paragraphs. --- format_novel/format_novel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/format_novel/format_novel.py b/format_novel/format_novel.py index 9dfe4c1..2836cbb 100755 --- a/format_novel/format_novel.py +++ b/format_novel/format_novel.py @@ -57,6 +57,9 @@ def double_space_and_indent(paragraphs): for paragraph in paragraphs: paragraph.paragraph_format.line_spacing = 2 + paragraph.paragraph_format.space_before = docx.shared.Inches(0) + paragraph.paragraph_format.space_after = docx.shared.Inches(0) + this_paragraph_plaintext = bool(paragraph.style.name == 'Normal') # Indent first lines of paragraphs except for styled ones (headings, etc.) and initial