diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-18 11:41:40 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-18 11:44:21 +0200 |
commit | ec3992b2f0aef0eefb85bdb693adfd0969126f7d (patch) | |
tree | 3b5d4562f0c5d4d5b8fecebdd10403984b76b51c /data/templates/default.revealjs | |
parent | abd2e94f5a8c1238eebeef9b6edb91b8031507e7 (diff) |
Use revealjs's math plugin for mathjax.
This is a thin wrapper around mathjax that makes math look better
on revealjs.
See https://github.com/hakimel/reveal.js/#mathjax
We do this by setting the 'mathjax' boolean variable and
using it in the revealjs template. Also, for revealjs
and mathjax, we don't assign the usual thing to the 'math'
variable, since it's handled by mathjax config.
Closes #3743.
Diffstat (limited to 'data/templates/default.revealjs')
-rw-r--r-- | data/templates/default.revealjs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs index ac8d6c444..a3f39885e 100644 --- a/data/templates/default.revealjs +++ b/data/templates/default.revealjs @@ -229,15 +229,24 @@ $endif$ $if(maxScale)$ maxScale: $maxScale$, $endif$ +$if(mathjax)$ + math: { + mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js', + config: 'TeX-AMS_HTML-full', + }, +$endif$ // Optional reveal.js plugins dependencies: [ { src: '$revealjs-url$/lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: '$revealjs-url$/plugin/zoom-js/zoom.js', async: true }, - $if(notes-server)$ +$if(notes-server)$ { src: '$revealjs-url$/socket.io/socker.io.js', async: true }, { src: '$revealjs-url$/plugin/notes-server/client.js', async: true }, - $endif$ +$endif$ +$if(mathjax)$ + { src: '$revealjs-url$/plugin/math/math.js', async: true }, +$endif$ { src: '$revealjs-url$/plugin/notes/notes.js', async: true } ] }); |