@@ -146,6 +146,28 @@ tests = [ testGroup "code blocks"
146146 , "\\subsection{header2}\n"
147147 , "\\subsubsection{header3}"
148148 ]
149+ , test (latexTopLevelDiv TopLevelPart)
150+ "part top-level, section not in toc" $
151+ ( headerWith ("", ["unnumbered"], []) 1 (text "header1")
152+ <> headerWith ("", ["unnumbered"], []) 2 (text "header2")
153+ <> headerWith ("", ["unnumbered"], []) 3 (text "header3")
154+ <> headerWith ("", ["unnumbered"], []) 4 (text "header4")
155+ <> headerWith ("", ["unnumbered"], []) 5 (text "header5")
156+ <> headerWith ("", ["unnumbered"], []) 6 (text "header6"))
157+ =?>
158+ unlines [ "\\part*{header1}"
159+ , "\\addcontentsline{toc}{part}{header1}\n"
160+ , "\\chapter*{header2}"
161+ , "\\addcontentsline{toc}{chapter}{header2}\n"
162+ , "\\section*{header3}"
163+ , "\\addcontentsline{toc}{section}{header3}\n"
164+ , "\\subsection*{header4}"
165+ , "\\addcontentsline{toc}{subsection}{header4}\n"
166+ , "\\subsubsection*{header5}"
167+ , "\\addcontentsline{toc}{subsubsection}{header5}\n"
168+ , "\\paragraph{header6}"
169+ , "\\addcontentsline{toc}{paragraph}{header6}"
170+ ]
149171 ]
150172 ]
151173 ]