Support toc-depth option for ODT writer (#6697)
To support `--toc-depth` option for ODT, writer and template are updated. Closes #6696.
This commit is contained in:
parent
09d39e0e98
commit
1f707da40f
2 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,7 @@ $include-before$
|
||||||
$endfor$
|
$endfor$
|
||||||
$if(toc)$
|
$if(toc)$
|
||||||
<text:table-of-content>
|
<text:table-of-content>
|
||||||
<text:table-of-content-source text:outline-level="10">
|
<text:table-of-content-source text:outline-level="$toc-depth$">
|
||||||
<text:index-title-template text:style-name="Contents_20_Heading">$toc-title$</text:index-title-template>
|
<text:index-title-template text:style-name="Contents_20_Heading">$toc-title$</text:index-title-template>
|
||||||
<text:table-of-content-entry-template text:outline-level="1"
|
<text:table-of-content-entry-template text:outline-level="1"
|
||||||
text:style-name="Contents_20_1">
|
text:style-name="Contents_20_1">
|
||||||
|
|
|
@ -247,6 +247,7 @@ writeOpenDocument opts (Pandoc meta blocks) = do
|
||||||
let automaticStyles = vcat $ reverse $ styles ++ listStyles
|
let automaticStyles = vcat $ reverse $ styles ++ listStyles
|
||||||
let context = defField "body" body
|
let context = defField "body" body
|
||||||
. defField "toc" (writerTableOfContents opts)
|
. defField "toc" (writerTableOfContents opts)
|
||||||
|
. defField "toc-depth" (tshow $ writerTOCDepth opts)
|
||||||
. defField "automatic-styles" automaticStyles
|
. defField "automatic-styles" automaticStyles
|
||||||
$ metadata
|
$ metadata
|
||||||
return $ render colwidth $
|
return $ render colwidth $
|
||||||
|
|
Loading…
Reference in a new issue