@@ -732,7 +732,6 @@ sectionHeader unnumbered ident level lst = do
732 noNote x = x
732 noNote x = x
733 let lstNoNotes = walk noNote lst
733 let lstNoNotes = walk noNote lst
734 txtNoNotes <- inlineListToLaTeX lstNoNotes
734 txtNoNotes <- inlineListToLaTeX lstNoNotes
735− let star = if unnumbered then text "*" else empty
736 -- footnotes in sections don't work (except for starred variants)
735 -- footnotes in sections don't work (except for starred variants)
737 -- unless you specify an optional argument:
736 -- unless you specify an optional argument:
738 -- \section[mysec]{mysec\footnote{blah}}
737 -- \section[mysec]{mysec\footnote{blah}}
@@ -745,7 +744,6 @@ sectionHeader unnumbered ident level lst = do
745 else braces (text "\\texorpdfstring"
744 else braces (text "\\texorpdfstring"
746 <> braces txt
745 <> braces txt
747 <> braces (text plain))
746 <> braces (text plain))
748− let stuffing = star <> optional <> contents
749 book <- gets stBook
747 book <- gets stBook
750 opts <- gets stOptions
748 opts <- gets stOptions
751 let level' = if book || writerChapters opts then level - 1 else level
749 let level' = if book || writerChapters opts then level - 1 else level
@@ -765,6 +763,8 @@ sectionHeader unnumbered ident level lst = do
765 -- see http://tex.stackexchange.com/questions/169830/
763 -- see http://tex.stackexchange.com/questions/169830/
766 else empty
764 else empty
767 lab <- labelFor ident
765 lab <- labelFor ident
766+ let star = if unnumbered && level < 4 then text "*" else empty
767+ let stuffing = star <> optional <> contents
768 stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab
768 stuffing' <- hypertarget ident $ text ('\\':sectionType) <> stuffing <> lab
769 return $ if level' > 5
769 return $ if level' > 5