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.
This commit is contained in:
John MacFarlane
2010-08-01 08:30:04 -07:00
parent f94173f6a1
commit 6ccdde5571
+3 -1
View File
@@ -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