Skip to content

Commit

Permalink
Text.Pandoc.Readers.HTML: Retain display type of MathML output
Browse files Browse the repository at this point in the history
Closes #1719
  • Loading branch information
mpickering committed Dec 15, 2014
1 parent 58e4e4a commit a17f6f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Text/Pandoc/Writers/HTML.hs
Expand Up @@ -60,7 +60,7 @@ import qualified Text.Blaze.XHtml1.Transitional.Attributes as A
import Text.Blaze.Renderer.String (renderHtml)
import Text.TeXMath
import Text.XML.Light.Output
import Text.XML.Light (unode, elChildren, add_attr, unqual)
import Text.XML.Light (unode, elChildren, unqual)
import qualified Text.XML.Light as XML
import System.FilePath (takeExtension)
import Data.Monoid
Expand Down Expand Up @@ -639,7 +639,9 @@ annotateMML e tex = math (unode "semantics" [cs, unode "annotation" (annotAttrs,
[] -> unode "mrow" ()
[x] -> x
xs -> unode "mrow" xs
math = add_attr (XML.Attr (unqual "xmlns") "http://www.w3.org/1998/Math/MathML") . unode "math"
math childs = XML.Element q as [XML.Elem childs] l
where
(XML.Element q as _ l) = e
annotAttrs = [XML.Attr (unqual "encoding") "application/x-tex"]


Expand Down

0 comments on commit a17f6f2

Please sign in to comment.