@@ -259,7 +259,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
259259 st <- get
260260 notes <- footnoteSection opts (reverse (stNotes st))
261261 let thebody = blocks' >> notes
262− let math = case writerHTMLMathMethod opts of
262+ let math = case writerHTMLMathMethod opts of
263263 MathJax url
264264 | slideVariant /= RevealJsSlides ->
265265 -- mathjax is handled via a special plugin in revealjs
@@ -296,10 +296,11 @@ pandocToHtml opts (Pandoc meta blocks) = do
296296 (if stMath st
297297 then defField "math" (renderHtml' math)
298298 else id) $
299− defField "mathjax"
300− (case writerHTMLMathMethod opts of
301− MathJax _ -> True
302− _ -> False) $
299+ (case writerHTMLMathMethod opts of
300+ MathJax u -> defField "mathjax" True .
301+ defField "mathjaxurl"
302+ (takeWhile (/='?') u)
303+ _ -> defField "mathjax" False) $
303304 defField "quotes" (stQuotes st) $
304305 -- for backwards compatibility we populate toc
305306 -- with the contents of the toc, rather than a