aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/OpenDocument.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-26 16:46:56 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-26 16:46:56 +0200
commit19d9482fc400cf486547b6a670c946d3634401cf (patch)
tree8a1c12d21b394b2fe5d4761d920a1d01cc9d3f75 /src/Text/Pandoc/Writers/OpenDocument.hs
parent6773447c8caf31d3fc0b9390fed79ca64c6d2195 (diff)
downloadpandoc-19d9482fc400cf486547b6a670c946d3634401cf.tar.gz
OpenDocument/ODT writer: Added support for table of contents.
Closes #2836. Thanks to @anayrat.
Diffstat (limited to 'src/Text/Pandoc/Writers/OpenDocument.hs')
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index 6c53ab4ab..ed3dabb87 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -220,6 +220,7 @@ writeOpenDocument opts (Pandoc meta blocks) = do
let listStyles = map listStyle (stListStyles s)
let automaticStyles = vcat $ reverse $ styles ++ listStyles
let context = defField "body" body
+ $ defField "toc" (writerTableOfContents opts)
$ defField "automatic-styles" (render' automaticStyles)
$ metadata
case writerTemplate opts of