Merge pull request #2045 from jgm/issue2026
Allow tex2jax options to be passed into math plugin.
This commit is contained in:
commit
137e383950
@ -9,15 +9,15 @@ var RevealMath = window.RevealMath || (function(){
|
|||||||
var options = Reveal.getConfig().math || {};
|
var options = Reveal.getConfig().math || {};
|
||||||
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
||||||
options.config = options.config || 'TeX-AMS_HTML-full';
|
options.config = options.config || 'TeX-AMS_HTML-full';
|
||||||
|
options.tex2jax = options.tex2jax || {
|
||||||
|
inlineMath: [['$','$'],['\\(','\\)']] ,
|
||||||
|
skipTags: ['script','noscript','style','textarea','pre'] };
|
||||||
|
|
||||||
loadScript( options.mathjax + '?config=' + options.config, function() {
|
loadScript( options.mathjax + '?config=' + options.config, function() {
|
||||||
|
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
messageStyle: 'none',
|
messageStyle: 'none',
|
||||||
tex2jax: {
|
tex2jax: options.tex2jax,
|
||||||
inlineMath: [['$','$'],['\\(','\\)']] ,
|
|
||||||
skipTags: ['script','noscript','style','textarea','pre']
|
|
||||||
},
|
|
||||||
skipStartupTypeset: true
|
skipStartupTypeset: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user