diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 52740ebe7..b75f56cef 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -88,7 +88,10 @@ writeLaTeX options document = stTable = False, stStrikeout = False, stUrl = False, stGraphics = False, stLHS = False, - stBook = writerTopLevelDivision options < Section, + stBook = (case writerTopLevelDivision options of + Just Part -> True + Just Chapter -> True + _ -> False), stCsquotes = False, stHighlighting = False, stIncremental = writerIncremental options, stInternalLinks = [], stUsesEuro = False } @@ -758,7 +761,7 @@ sectionHeader unnumbered ident level lst = do <> braces (text plain)) book <- gets stBook opts <- gets stOptions - let topLevelDivision = min (if book then Chapter else Section) + let topLevelDivision = fromMaybe (if book then Chapter else Section) (writerTopLevelDivision opts) let level' = if writerBeamer opts && topLevelDivision < Section -- beamer has parts but no chapters |