git.iko.soy/typeable/pandoc
on master help sign in
Make --toc-depth work well with books in latex/pdf output.

Closes #1210.

commit99f4f636df36d84a4bc58f67337af3584595f5c1 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 31 Mar 2014, 11:08 (13 years ago) parent361167d
1 file changed+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
@@ -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) $