aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-08-06 22:35:52 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-08-06 22:37:11 +0200
commita480293b3c99780bcf34c81bdac125694a38f8a2 (patch)
treee9ee6d545a8bbbc30854820774abf9db3a6fb9d1 /src/Text
parent7af8bfd8c8beeeeaeb1bc022b1104a8e13558080 (diff)
downloadpandoc-a480293b3c99780bcf34c81bdac125694a38f8a2.tar.gz
LaTeX writer: don't use * for unnumbered paragraph, subparagraph.
The starred variants don't exist. This helps with part of #3058...it gets rid of the spurious *s. But we still have numbers on the 4th and 5th level headers.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 5829bcd33..29e8c962c 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -732,7 +732,6 @@ sectionHeader unnumbered ident level lst = do
noNote x = x
let lstNoNotes = walk noNote lst
txtNoNotes <- inlineListToLaTeX lstNoNotes
- let star = if unnumbered then text "*" else empty
-- footnotes in sections don't work (except for starred variants)
-- unless you specify an optional argument:
-- \section[mysec]{mysec\footnote{blah}}
@@ -745,7 +744,6 @@ sectionHeader unnumbered ident level lst = do
else braces (text "\\texorpdfstring"
<> braces txt
<> braces (text plain))
- let stuffing = star <> optional <> contents
book <- gets stBook
opts <- gets stOptions
let level' = if book || writerChapters opts then level - 1 else level
@@ -765,6 +763,8 @@ 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 stuffing = star <> optional <> contents
stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab
return $ if level' > 5
then txt