From 2e0894554ce591488b7e0aebfaecf1fd7dc83c10 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 5 Jan 2013 11:55:29 -0800 Subject: Implemented --toc-level for rst. --- data/templates | 2 +- src/Text/Pandoc/Writers/RST.hs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/templates b/data/templates index d54125644..9575f4f56 160000 --- a/data/templates +++ b/data/templates @@ -1 +1 @@ -Subproject commit d541256441c14601977192c2415003b5b357a108 +Subproject commit 9575f4f56f6c59776938dfcfce7e284055937298 diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index f025e6c81..ac4165116 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -79,7 +79,9 @@ pandocToRST (Pandoc (Meta tit auth dat) blocks) = do let context = writerVariables opts ++ [ ("body", main) , ("title", render Nothing title) - , ("date", render colwidth date) ] ++ + , ("date", render colwidth date) + , ("toc", if writerTableOfContents opts then "yes" else "") + , ("toc-level", show (writerTOCLevel opts)) ] ++ [ ("math", "yes") | hasMath ] ++ [ ("author", render colwidth a) | a <- authors ] if writerStandalone opts -- cgit v1.2.3