aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-03-31 11:08:10 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-03-31 11:08:10 -0700
commit99f4f636df36d84a4bc58f67337af3584595f5c1 (patch)
treed5fc32258480df60d4a536080e61d1febd136151 /src
parent361167deff57e0e2d3508c598785a7de7b887fb7 (diff)
downloadpandoc-99f4f636df36d84a4bc58f67337af3584595f5c1.tar.gz
Make --toc-depth work well with books in latex/pdf output.
Closes #1210.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index b2eff4490..07be6e9af 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -133,7 +133,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
authorsMeta <- mapM (stringToLaTeX TextString . stringify) $ docAuthors meta
let context = defField "toc" (writerTableOfContents options) $
defField "toc-depth" (show (writerTOCDepth options -
- if writerChapters options
+ if stBook st
then 1
else 0)) $
defField "body" main $
@@ -141,7 +141,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
defField "author-meta" (intercalate "; " authorsMeta) $
defField "documentclass" (if writerBeamer options
then ("beamer" :: String)
- else if writerChapters options
+ else if stBook st
then "book"
else "article") $
defField "verbatim-in-note" (stVerbInNote st) $