From eb82fd6b5e12e46eafe21d3f0b7f9c21a893be4e Mon Sep 17 00:00:00 2001 From: Nils Carlson Date: Wed, 21 Nov 2018 22:05:42 +0000 Subject: ODT writer: Fix list indentation Previously lists were indented by half an inch on the first line for each level of nesting. This resulted in lists that looked like this: 1. The first line of the list point text the second line of the same list point. Fix this and bring style into line with libreoffice standards: 1. The first line of the list point text the second line of the list point text. --- src/Text/Pandoc/Writers/OpenDocument.hs | 4 +- test/writer.opendocument | 378 ++++++++++++++++---------------- 2 files changed, 191 insertions(+), 191 deletions(-) diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index d9f0a8e44..071826117 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -601,7 +601,7 @@ orderedListLevelStyle (s,n, d) (l,ls) = listLevelStyle :: Int -> Doc listLevelStyle i = - let indent = show (0.5 * fromIntegral i :: Double) in + let indent = show (0.5 + (0.25 * fromIntegral i :: Double)) in inTags True "style:list-level-properties" [ ("text:list-level-position-and-space-mode", "label-alignment") @@ -610,7 +610,7 @@ listLevelStyle i = selfClosingTag "style:list-level-label-alignment" [ ("text:label-followed-by", "listtab") , ("text:list-tab-stop-position", indent ++ "in") - , ("fo:text-indent", "-0.1in") + , ("fo:text-indent", "-0.25in") , ("fo:margin-left", indent ++ "in") ] diff --git a/test/writer.opendocument b/test/writer.opendocument index 09a246b52..0073d5957 100644 --- a/test/writer.opendocument +++ b/test/writer.opendocument @@ -7,1005 +7,1005 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -- cgit v1.2.3