aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-12-04 21:15:10 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2016-12-04 21:15:52 +0100
commitbfa734c402fab970c1abebf1d6c1429f060082b8 (patch)
treedaf88cf89ae3428fa8b6c632816cb2efa271fec7 /src/Text/Pandoc
parent85e8afe942d5bef9f6ce42368333efc0092a4b43 (diff)
downloadpandoc-bfa734c402fab970c1abebf1d6c1429f060082b8.tar.gz
LaTeX writer: Fix unnumbered headers when used with `--top-level`
Fix interaction of top-level divisions `part` or `chapter` with unnumbered headers when emitting LaTeX. Headers are ensured to be written using stared commands (like `\subsection*{}`). Fixes: #3272
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index afadbcb67..88be106fd 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -791,7 +791,7 @@ sectionHeader unnumbered ident level lst = do
-- see http://tex.stackexchange.com/questions/169830/
else empty
lab <- labelFor ident
- let star = if unnumbered && level < 4 then text "*" else empty
+ let star = if unnumbered && level' < 4 then text "*" else empty
let stuffing = star <> optional <> contents
stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab
return $ if level' > 5