OpenDocument/ODT writer: Added support for table of contents.

Closes #2836.

Thanks to @anayrat.
This commit is contained in:
John MacFarlane 2017-06-26 16:46:56 +02:00
parent 6773447c8c
commit 19d9482fc4
2 changed files with 3 additions and 1 deletions

View file

@ -1228,7 +1228,8 @@ as the following:
: non-null value if `--toc/--table-of-contents` was specified
`toc-title`
: title of table of contents (works only with EPUB and docx)
: title of table of contents (works only with EPUB,
opendocument, odt, docx)
`include-before`
: contents specified by `-B/--include-before-body` (may have

View file

@ -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