diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-10-31 18:55:02 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-10-31 18:55:35 -0700 |
commit | bd24e83c8188866d37c1468d948d44692e6547a4 (patch) | |
tree | be02cc8a7ea5f259761392d12d489c85127ea9b2 /src/Text | |
parent | 9cf27c92c136cce4785744542eaf962c05f1052c (diff) | |
download | pandoc-bd24e83c8188866d37c1468d948d44692e6547a4.tar.gz |
--mathjax: Use mathjax with raw latex rather than mathml.
It seems to work better, and the default config can be used.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 7374cb343..b8da4bec0 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -503,18 +503,10 @@ inlineToHtml opts inline = Left _ -> inlineListToHtml opts (readTeXMath str) >>= return . (thespan ! [theclass "math"]) - MathJax _ -> do - let dt = if t == InlineMath - then DisplayInline - else DisplayBlock - let conf = useShortEmptyTags (const False) - defaultConfigPP - case texMathToMathML dt str of - Right r -> return $ primHtml $ - ppcElement conf r - Left _ -> inlineListToHtml opts - (readTeXMath str) >>= return . - (thespan ! [theclass "math"]) + MathJax _ -> return $ primHtml $ + case t of + InlineMath -> "\\(" ++ str ++ "\\)" + DisplayMath -> "\\[" ++ str ++ "\\]" PlainMath -> do x <- inlineListToHtml opts (readTeXMath str) let m = thespan ! [theclass "math"] $ x |