From ef028fee59869997995895f1869d415f66311b8b Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 1 Dec 2007 03:11:52 +0000 Subject: Added --gladtex and --mimetex options. + New HTMLMathMethod structure in WriterOptions keeps track of how to display math in HTML output. + If none of the special options are selected, default to displaying TeX math verbatim, with no enclosing $'s, in HTML. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1125 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/HTML.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Text/Pandoc/Writers') diff --git a/Text/Pandoc/Writers/HTML.hs b/Text/Pandoc/Writers/HTML.hs index 0085e5419..881e3c07c 100644 --- a/Text/Pandoc/Writers/HTML.hs +++ b/Text/Pandoc/Writers/HTML.hs @@ -404,9 +404,13 @@ inlineToHtml opts inline = (return $ case writerHTMLMathMethod opts of ASCIIMathML _ -> stringToHtml ("$" ++ str ++ "$") + MimeTeX url -> + image ! [src (url ++ "?" ++ str), + alt str, title str] GladTeX -> tag "eq" << str - _ -> stringToHtml ("$" ++ str ++ "$")) + PlainMath -> + stringToHtml str) (TeX str) -> return noHtml (HtmlInline str) -> return $ primHtml str (Link [Code str] (src,tit)) | "mailto:" `isPrefixOf` src -> -- cgit v1.2.3