summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/LaTeXMathML.hs
blob: 362e7b084a39139f23b26d4505f12db0e2e0ae90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- | Definitions for use of LaTeXMathML in HTML.  
-- (See <http://math.etsu.edu/LaTeXMathML/>)
module Text.Pandoc.LaTeXMathML ( latexMathMLScript ) where
import System.FilePath ( (</>) )
import Text.Pandoc.Shared (readDataFile)

-- | String containing LaTeXMathML javascript.
latexMathMLScript :: FilePath -> IO String
latexMathMLScript datadir = do
 jsCom <- readDataFile datadir $ "data" </> "LaTeXMathML.js.comment"
 jsPacked <- readDataFile datadir $ "data" </> "LaTeXMathML.js.packed"
 return $ "<script type=\"text/javascript\">\n" ++ jsCom ++ jsPacked ++
          "</script>\n"