mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 06:55:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user