OpenDocument/ODT writer: Added support for table of contents.
Closes #2836. Thanks to @anayrat.
This commit is contained in:
parent
6773447c8c
commit
19d9482fc4
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue