updates to mathjax plugin, incl more examples #531
This commit is contained in:
@ -6,10 +6,13 @@
|
||||
*/
|
||||
(function(){
|
||||
|
||||
var config = Reveal.getConfig().math || {};
|
||||
config.mode = config.mode || 'TeX-AMS_HTML-full';
|
||||
|
||||
var head = document.querySelector( 'head' );
|
||||
var script = document.createElement( 'script' );
|
||||
script.type = 'text/javascript';
|
||||
script.src = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_SVG-full';
|
||||
script.src = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=' + config.mode;
|
||||
|
||||
// Detect when the script has loaded
|
||||
script.onload = onScriptLoad;
|
||||
@ -28,8 +31,16 @@
|
||||
tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
|
||||
});
|
||||
|
||||
// Process any math inside of the current slide when navigating,
|
||||
// this is important since it's not possible to typeset
|
||||
// equations within invisible elements (far future or past).
|
||||
Reveal.addEventListener( 'slidechanged', function( event ) {
|
||||
|
||||
// This will only typeset equations that have not yet been
|
||||
// processed, as well as equations that have change since
|
||||
// last being processed.
|
||||
MathJax.Hub.Update( event.currentSlide );
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user