diff options
Diffstat (limited to 'src/Haddock/Backends/LaTeX.hs')
-rw-r--r-- | src/Haddock/Backends/LaTeX.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index f4edb5fc..5f00d784 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -1013,9 +1013,16 @@ parLatexMarkup ppId = Markup { markupHyperlink = \l _ -> markupLink l, markupAName = \_ _ -> empty, markupProperty = \p _ -> quote $ verb $ text p, - markupExample = \e _ -> quote $ verb $ text $ unlines $ map exampleToString e + markupExample = \e _ -> quote $ verb $ text $ unlines $ map exampleToString e, + markupHeader = \(Header l h) p -> header l (h p) } where + header 1 d = text "\\section*" <> braces d + header 2 d = text "\\subsection*" <> braces d + header l d + | l > 0 && l <= 6 = text "\\subsubsection*" <> braces d + header l _ = error $ "impossible header level in LaTeX generation: " ++ show l + fixString Plain s = latexFilter s fixString Verb s = s fixString Mono s = latexMonoFilter s |