@@ -84,7 +84,10 @@ writeRTF options (Pandoc meta blocks) =
8484 isTOCHeader _ = False
8585 context = setField "body" body
8686 $ setField "spacer" spacer
87− $ setField "toc" (tableOfContents $ filter isTOCHeader blocks)
87+ $ (if writerTableOfContents options
88+ then setField "toc"
89+ (tableOfContents $ filter isTOCHeader blocks)
90+ else id)
8891 $ foldl (\acc (x,y) -> setField x y acc)
8992 metadata (writerVariables options)
9093 in if writerStandalone options