Make --toc-depth work well with books in latex/pdf output.
Closes #1210.
This commit is contained in:
parent
361167deff
commit
99f4f636df
1 changed files with 2 additions and 2 deletions
|
@ -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) $
|
||||
|
|
Loading…
Add table
Reference in a new issue