LaTeX writer: properly handle unnumbered headings level 4+.

Closes #6018.

Previously the `\paragraph` command was used instead of
`\paragraph*` for unnumbered level 4 headings.
This commit is contained in:
John MacFarlane
2020-01-01 22:32:27 -07:00
parent 4affd40194
commit 2c1a911bc1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1010,7 +1010,7 @@ sectionHeader classes 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 then text "*" else empty
let stuffing = star <> optional <> contents
stuffing' <- hypertarget True ident $
text ('\\':sectionType) <> stuffing <> lab
+1 -1
View File
@@ -170,7 +170,7 @@ tests = [ testGroup "code blocks"
, "\\addcontentsline{toc}{subsection}{header4}\n"
, "\\subsubsection*{header5}"
, "\\addcontentsline{toc}{subsubsection}{header5}\n"
, "\\paragraph{header6}"
, "\\paragraph*{header6}"
, "\\addcontentsline{toc}{paragraph}{header6}"
]
]