From 420c86b69a5491dfa1c775d8274685efc49a17e3 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sat, 14 Nov 2015 17:19:25 -0800
Subject: [PATCH] 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.
---
 data/templates                          | 2 +-
 src/Text/Pandoc/Writers/OpenDocument.hs | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/data/templates b/data/templates
index ef963c306..c31874467 160000
--- a/data/templates
+++ b/data/templates
@@ -1 +1 @@
-Subproject commit ef963c30605d7f0558b9cfbf7183f0aa4aad688e
+Subproject commit c31874467bb58ac1735dc28af458e7603a166397
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