@@ -34,6 +34,7 @@ import Text.Pandoc
34import Text.Pandoc.ODT
34import Text.Pandoc.ODT
35import Text.Pandoc.Writers.S5 (s5HeaderIncludes)
35import Text.Pandoc.Writers.S5 (s5HeaderIncludes)
36import Text.Pandoc.Templates (getDefaultTemplate)
36import Text.Pandoc.Templates (getDefaultTemplate)
37+import Text.Pandoc.LaTeXMathML (latexMathMLScript)
37import Text.Pandoc.Shared ( HTMLMathMethod (..), tabFilter, ObfuscationMethod (..) )
38import Text.Pandoc.Shared ( HTMLMathMethod (..), tabFilter, ObfuscationMethod (..) )
38#ifdef _HIGHLIGHTING
39#ifdef _HIGHLIGHTING
39import Text.Pandoc.Highlighting ( languages )
40import Text.Pandoc.Highlighting ( languages )
@@ -261,8 +262,8 @@ options =
262 , Option "m" ["latexmathml", "asciimathml"]
263 , Option "m" ["latexmathml", "asciimathml"]
264− (\arg opt -> return opt { optHTMLMathMethod =
266+ return opt { optHTMLMathMethod = LaTeXMathML arg })
267 "" -- "Use LaTeXMathML script in html output"
268 "" -- "Use LaTeXMathML script in html output"
@@ -641,6 +642,12 @@ main = do
641 variables
642 variables
642 else return variables
643 else return variables
645+ variables'' <- case mathMethod of
646+ LaTeXMathML (Just _) -> do
647+ s <- latexMathMLScript
648+ return $ ("latexmathml-script", s) : variables'
649+ _ -> return variables'
644 let startParserState =
651 let startParserState =
645 defaultParserState { stateParseRaw = parseRaw,
652 defaultParserState { stateParseRaw = parseRaw,
646 stateTabStop = tabStop,
653 stateTabStop = tabStop,
@@ -660,7 +667,7 @@ main = do
660 writerTemplate = if null template
667 writerTemplate = if null template
661 then defaultTemplate
668 then defaultTemplate
662 else template,
669 else template,
663− writerVariables = variables',
670+ writerVariables = variables'',
664 writerIncludeBefore = concat befores,
671 writerIncludeBefore = concat befores,
665 writerIncludeAfter = concat afters,
672 writerIncludeAfter = concat afters,
666 writerTabStop = tabStop,
673 writerTabStop = tabStop,