@@ -131,6 +131,10 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do
131131 _ -> []
132132 context = writerVariables options ++
133133 [ ("toc", if writerTableOfContents options then "yes" else "")
134+ , ("toc-level", show (writerTOCLevel options -
135+ if writerChapters options
136+ then 1
137+ else 0))
134138 , ("body", main)
135139 , ("title", titletext)
136140 , ("title-meta", stringify title)