From e01e4790402204af02ab0127ef5b633fb7748cd4 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Sat, 16 May 2015 12:32:23 +0100 Subject: Handle inline math with mathjax. --- haddock-api/src/Haddock/Backends/LaTeX.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs') diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs index ab6bb41c..34aca327 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -1107,6 +1107,7 @@ parLatexMarkup ppId = Markup { markupMonospaced = \p _ -> tt (p Mono), markupUnorderedList = \p v -> itemizedList (map ($v) p) $$ text "", markupPic = \p _ -> markupPic p, + markupMathInline = \p _ -> markupMathInline p, markupOrderedList = \p v -> enumeratedList (map ($v) p) $$ text "", markupDefList = \l v -> descriptionList (map (\(a,b) -> (a v, b v)) l), markupCodeBlock = \p _ -> quote (verb (p Verb)) $$ text "", @@ -1139,6 +1140,8 @@ parLatexMarkup ppId = Markup { beg = text "image: " <> text uri + markupMathInline mathjax = text "$" <> text mathjax <> text "$" + markupId ppId_ id v = case v of Verb -> theid -- cgit v1.2.3