diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-08-01 08:30:04 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-08-01 08:30:04 -0700 |
commit | 6ccdde5571ff34a24c2daf969dbcd55126b43964 (patch) | |
tree | 5689ad40433d554537e99c4c3dbe90a6da2369ca | |
parent | f94173f6a1610c22fcd8d65711b0e7faa664fbe2 (diff) | |
download | pandoc-6ccdde5571ff34a24c2daf969dbcd55126b43964.tar.gz |
gladTeX HTML - specify ENV for display or inline.
Thanks to Jonathan Daugherty for the patch.
The gladTeX program gives finer control over the LaTeX environment
used to render its input. The latest version (1.1) uses the
"displaymath" environment by default, which is nice for large,
block-level equations, but it isn't so nice for inline math (where
"math" is more appropriate). This patch causes the HTML writer to
differentiate between the two by explicitly setting the LaTeX
environment on the generated EQ tag.
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index d2a400c5c..eaaf18426 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -487,7 +487,9 @@ inlineToHtml opts inline = InlineMath -> m DisplayMath -> br +++ m +++ br GladTeX -> - return $ primHtml $ "<EQ>" ++ str ++ "</EQ>" + return $ case t of + InlineMath -> primHtml $ "<EQ ENV=\"math\">" ++ str ++ "</EQ>" + DisplayMath -> primHtml $ "<EQ ENV=\"displaymath\">" ++ str ++ "</EQ>" MathML _ -> do let dt = if t == InlineMath then DisplayInline |