summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-14 17:19:25 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-14 17:19:25 -0800
commit420c86b69a5491dfa1c775d8274685efc49a17e3 (patch)
treee471b302ae9b10e37c4d627961fe70ca24c71f3d
parent0f3a68a39dde9e6b9219a8901d9aa2ae099a338e (diff)
Allow more customization of opendocument styles.
Automatic styles can now be inserted in the template, since the template, not the writer, now provides the enclosing `<office:automatic-styles>` tags. Closes #2520.
m---------data/templates14
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs3
2 files changed, 8 insertions, 9 deletions
diff --git a/data/templates b/data/templates
-Subproject ef963c30605d7f0558b9cfbf7183f0aa4aad688
+Subproject c31874467bb58ac1735dc28af458e7603a16639
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index ebe678dc0..7ee87f4af 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -191,8 +191,7 @@ writeOpenDocument opts (Pandoc meta blocks) =
listStyle (n,l) = inTags True "text:list-style"
[("style:name", "L" ++ show n)] (vcat l)
listStyles = map listStyle (stListStyles s)
- automaticStyles = inTagsIndented "office:automatic-styles" $ vcat $
- reverse $ styles ++ listStyles
+ automaticStyles = vcat $ reverse $ styles ++ listStyles
context = defField "body" body
$ defField "automatic-styles" (render' automaticStyles)
$ metadata