From 1b4f59797d072190118649e0b1d268c6fbffb649 Mon Sep 17 00:00:00 2001 From: Adam Israel Date: Sun, 6 Jul 2025 18:35:06 -0400 Subject: [PATCH] Fix paragraph indentation This should fix the paragraph indentation to be one half-inch. I had to look at the indentation from a Scrivener-compiled manuscript, which turned out to be 0.63cm, where I'd based my calculation on 1.48cm. What can I say, I'm a writer, not a mathmatician. --- src/markdown.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/markdown.rs b/src/markdown.rs index 91568e5..004c30e 100644 --- a/src/markdown.rs +++ b/src/markdown.rs @@ -45,10 +45,11 @@ fn content_to_paragraphs(mut content: String) -> Vec { .line(480), // double spaced ) // Indent the first line: one half-inch - // FIX: The indent is a little bigger than Shunn recommends (one half-inch) // https://stackoverflow.com/questions/14360183/default-wordml-unit-measurement-pixel-or-point-or-inches // 1.48cm == 0.5826772 inches == 839.05 dxa - .indent(None, Some(SpecialIndentType::FirstLine(839)), None, None); + // According to a Scrivener-compiled document, the indentation should be: + // 0.63cm == 0.2480315 inches == 357.16536 dxa + .indent(None, Some(SpecialIndentType::FirstLine(357)), None, None); for run in runs { p = p.add_run(run); }