git.iko.soy/typeable/pandoc
on master help sign in
OpenDocument/ODT writer: Added support for table of contents.

Closes #2836. Thanks to @anayrat.

commit19d9482fc400cf486547b6a670c946d3634401cf authorJohn MacFarlane <jgm@berkeley.edu> dateMon 26 Jun 2017, 16:46 (9 years ago) parent6773447
2 files changed+3−1
MANUAL.txt+2−1 src/Text/Pandoc/Writers/OpenDocument.hs+1
MANUAL.txt+2−1
@@ -1228,7 +1228,8 @@ as the following:
12281228: non-null value if `--toc/--table-of-contents` was specified
12291229
12301230`toc-title`
1231−: title of table of contents (works only with EPUB and docx)
1231+: title of table of contents (works only with EPUB,
1232+ opendocument, odt, docx)
12321233
12331234`include-before`
12341235: contents specified by `-B/--include-before-body` (may have
src/Text/Pandoc/Writers/OpenDocument.hs+1
@@ -220,6 +220,7 @@ writeOpenDocument opts (Pandoc meta blocks) = do
220220 let listStyles = map listStyle (stListStyles s)
221221 let automaticStyles = vcat $ reverse $ styles ++ listStyles
222222 let context = defField "body" body
223+ $ defField "toc" (writerTableOfContents opts)
223224 $ defField "automatic-styles" (render' automaticStyles)
224225 $ metadata
225226 case writerTemplate opts of