aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/default.revealjs2
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs11
2 files changed, 7 insertions, 6 deletions
diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs
index 6f847e23a..68723efa6 100644
--- a/data/templates/default.revealjs
+++ b/data/templates/default.revealjs
@@ -237,7 +237,7 @@ $if(maxScale)$
$endif$
$if(mathjax)$
math: {
- mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
+ mathjax: '$mathjaxurl$',
config: 'TeX-AMS_HTML-full',
tex2jax: {
inlineMath: [['\\(','\\)']],
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index a09ad2fda..f07d0381f 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -259,7 +259,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
st <- get
notes <- footnoteSection opts (reverse (stNotes st))
let thebody = blocks' >> notes
- let math = case writerHTMLMathMethod opts of
+ let math = case writerHTMLMathMethod opts of
MathJax url
| slideVariant /= RevealJsSlides ->
-- mathjax is handled via a special plugin in revealjs
@@ -296,10 +296,11 @@ pandocToHtml opts (Pandoc meta blocks) = do
(if stMath st
then defField "math" (renderHtml' math)
else id) $
- defField "mathjax"
- (case writerHTMLMathMethod opts of
- MathJax _ -> True
- _ -> False) $
+ (case writerHTMLMathMethod opts of
+ MathJax u -> defField "mathjax" True .
+ defField "mathjaxurl"
+ (takeWhile (/='?') u)
+ _ -> defField "mathjax" False) $
defField "quotes" (stQuotes st) $
-- for backwards compatibility we populate toc
-- with the contents of the toc, rather than a