git.iko.soy/typeable/pandoc
on master help sign in
Support toc-depth option for ODT writer (#6697)
1f707daniszet
data/templates/default.opendocument+1−1
@@ -31,7 +31,7 @@ $include-before$
31$endfor$
31$endfor$
32$if(toc)$
32$if(toc)$
33<text:table-of-content>
33<text:table-of-content>
34− <text:table-of-content-source text:outline-level="10">
34+ <text:table-of-content-source text:outline-level="$toc-depth$">
35 <text:index-title-template text:style-name="Contents_20_Heading">$toc-title$</text:index-title-template>
35 <text:index-title-template text:style-name="Contents_20_Heading">$toc-title$</text:index-title-template>
36 <text:table-of-content-entry-template text:outline-level="1"
36 <text:table-of-content-entry-template text:outline-level="1"
37 text:style-name="Contents_20_1">
37 text:style-name="Contents_20_1">
src/Text/Pandoc/Writers/OpenDocument.hs+1
@@ -247,6 +247,7 @@ writeOpenDocument opts (Pandoc meta blocks) = do
247 let automaticStyles = vcat $ reverse $ styles ++ listStyles
247 let automaticStyles = vcat $ reverse $ styles ++ listStyles
248 let context = defField "body" body
248 let context = defField "body" body
249 . defField "toc" (writerTableOfContents opts)
249 . defField "toc" (writerTableOfContents opts)
250+ . defField "toc-depth" (tshow $ writerTOCDepth opts)
250 . defField "automatic-styles" automaticStyles
251 . defField "automatic-styles" automaticStyles
251 $ metadata
252 $ metadata
252 return $ render colwidth $
253 return $ render colwidth $