@@ -133,7 +133,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
133133 authorsMeta <- mapM (stringToLaTeX TextString . stringify) $ docAuthors meta
134134 let context = defField "toc" (writerTableOfContents options) $
135135 defField "toc-depth" (show (writerTOCDepth options -
136− if writerChapters options
136+ if stBook st
137137 then 1
138138 else 0)) $
139139 defField "body" main $
@@ -141,7 +141,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
141141 defField "author-meta" (intercalate "; " authorsMeta) $
142142 defField "documentclass" (if writerBeamer options
143143 then ("beamer" :: String)
144− else if writerChapters options
144+ else if stBook st
145145 then "book"
146146 else "article") $
147147 defField "verbatim-in-note" (stVerbInNote st) $