git.iko.soy/typeable/pandoc
on master help sign in
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.

commita480293b3c99780bcf34c81bdac125694a38f8a2 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 6 Aug 2016, 22:35 (10 years ago) parent7af8bfd
1 file changed+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
@@ -732,7 +732,6 @@ sectionHeader unnumbered ident level lst = do
732732 noNote x = x
733733 let lstNoNotes = walk noNote lst
734734 txtNoNotes <- inlineListToLaTeX lstNoNotes
735− let star = if unnumbered then text "*" else empty
736735 -- footnotes in sections don't work (except for starred variants)
737736 -- unless you specify an optional argument:
738737 -- \section[mysec]{mysec\footnote{blah}}
@@ -745,7 +744,6 @@ sectionHeader unnumbered ident level lst = do
745744 else braces (text "\\texorpdfstring"
746745 <> braces txt
747746 <> braces (text plain))
748− let stuffing = star <> optional <> contents
749747 book <- gets stBook
750748 opts <- gets stOptions
751749 let level' = if book || writerChapters opts then level - 1 else level
@@ -765,6 +763,8 @@ sectionHeader unnumbered ident level lst = do
765763 -- see http://tex.stackexchange.com/questions/169830/
766764 else empty
767765 lab <- labelFor ident
766+ let star = if unnumbered && level < 4 then text "*" else empty
767+ let stuffing = star <> optional <> contents
768768 stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab
769769 return $ if level' > 5
770770 then txt