aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/LaTeXMathML.hs
blob: 0c8f74bdf495f1a6ed3c2fdafb2e471863215ba2 (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 :: Maybe 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"