diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-05 18:14:52 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-05 18:15:34 -0800 |
commit | 65d01857fbb4041b68ce3767773c151b4f135a27 (patch) | |
tree | 0566682a6915b41e1856984bed2bd2ff708107a9 | |
parent | f9799c2a425787fb8d5528d00e20e47a56996853 (diff) | |
download | pandoc-65d01857fbb4041b68ce3767773c151b4f135a27.tar.gz |
Support --toc-depth in context writer.
m--------- | data/templates | 12 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/data/templates b/data/templates -Subproject 25ad173f00bc7e07c72468deb1d955f707aeaea +Subproject f0347e7af09f8aad32287b2b2d808cfb57e4e50 diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index df11d79cc..c67daf13d 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -74,6 +74,12 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do let main = (render colwidth . vcat) body let context = writerVariables options ++ [ ("toc", if writerTableOfContents options then "yes" else "") + , ("placelist", intercalate "," $ + take (writerTOCDepth options + if writerChapters options + then 0 + else 1) + ["chapter","section","subsection","subsubsection", + "subsubsubsection","subsubsubsubsection"]) , ("body", main) , ("title", titletext) , ("date", datetext) ] ++ |