From 6ccdde5571ff34a24c2daf969dbcd55126b43964 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 1 Aug 2010 08:30:04 -0700 Subject: 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. --- src/Text/Pandoc/Writers/HTML.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 $ "" ++ str ++ "" + return $ case t of + InlineMath -> primHtml $ "" ++ str ++ "" + DisplayMath -> primHtml $ "" ++ str ++ "" MathML _ -> do let dt = if t == InlineMath then DisplayInline -- cgit v1.2.3