git.iko.soy/typeable/pandoc
on master help sign in
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.

commit6ccdde5571ff34a24c2daf969dbcd55126b43964 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 1 Aug 2010, 08:30 (16 years ago) parentf94173f
1 file changed+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
@@ -487,7 +487,9 @@ inlineToHtml opts inline =
487487 InlineMath -> m
488488 DisplayMath -> br +++ m +++ br
489489 GladTeX ->
490− return $ primHtml $ "<EQ>" ++ str ++ "</EQ>"
490+ return $ case t of
491+ InlineMath -> primHtml $ "<EQ ENV=\"math\">" ++ str ++ "</EQ>"
492+ DisplayMath -> primHtml $ "<EQ ENV=\"displaymath\">" ++ str ++ "</EQ>"
491493 MathML _ -> do
492494 let dt = if t == InlineMath
493495 then DisplayInline