From 3f50b955324bd4b42f88a421f0203bc46a3ccf64 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Sat, 16 May 2015 13:53:14 +0100 Subject: Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs --- haddock-api/src/Haddock/Backends/LaTeX.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 34aca327..e30c768a 100644 --- a/haddock-api/src/Haddock/Backends/LaTeX.hs +++ b/haddock-api/src/Haddock/Backends/LaTeX.hs @@ -1108,6 +1108,7 @@ parLatexMarkup ppId = Markup { markupUnorderedList = \p v -> itemizedList (map ($v) p) $$ text "", markupPic = \p _ -> markupPic p, markupMathInline = \p _ -> markupMathInline p, + markupMathDisplay = \p _ -> markupMathDisplay 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 "", @@ -1140,7 +1141,9 @@ parLatexMarkup ppId = Markup { beg = text "image: " <> text uri - markupMathInline mathjax = text "$" <> text mathjax <> text "$" + markupMathInline mathjax = text "\\(" <> text mathjax <> text "\\)" + + markupMathDisplay mathjax = text "\\[" <> text mathjax <> text "\\]" markupId ppId_ id v = case v of -- cgit v1.2.3