aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-01 03:11:52 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-01 03:11:52 +0000
commitef028fee59869997995895f1869d415f66311b8b (patch)
tree944fd4c118d3c71da0667c2027fdda6120459cd3 /Text/Pandoc/Writers
parent6e079a67e89ff9fef9ffbe01489fb7950c0b9f5f (diff)
downloadpandoc-ef028fee59869997995895f1869d415f66311b8b.tar.gz
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
Diffstat (limited to 'Text/Pandoc/Writers')
-rw-r--r--Text/Pandoc/Writers/HTML.hs6
1 files changed, 5 insertions, 1 deletions
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 ->