comments and failesafes for #531
This commit is contained in:
parent
69f7c0c693
commit
3901904057
|
@ -38,6 +38,7 @@
|
|||
|
||||
<section>
|
||||
<h3>The Lorenz Equations</h3>
|
||||
|
||||
\[\begin{aligned}
|
||||
\dot{x} & = \sigma(y-x) \\
|
||||
\dot{y} & = \rho x - y - xz \\
|
||||
|
@ -104,6 +105,10 @@
|
|||
Reveal.initialize({
|
||||
transition: 'linear',
|
||||
|
||||
math: {
|
||||
mode: 'TeX-AMS_HTML-full'
|
||||
},
|
||||
|
||||
dependencies: [
|
||||
{ src: '../lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
{ src: '../plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
*
|
||||
* @author Hakim El Hattab
|
||||
*/
|
||||
(function(){
|
||||
var RevealMath = window.RevealMath || (function(){
|
||||
|
||||
var loaded = false;
|
||||
|
||||
var config = Reveal.getConfig().math || {};
|
||||
config.mode = config.mode || 'TeX-AMS_HTML-full';
|
||||
|
@ -16,24 +18,31 @@
|
|||
|
||||
// Detect when the script has loaded
|
||||
script.onload = onScriptLoad;
|
||||
|
||||
// IE
|
||||
script.onreadystatechange = function() {
|
||||
if ( this.readyState === 'loaded' ) {
|
||||
onScriptLoad.call();
|
||||
}
|
||||
}
|
||||
|
||||
// Normal browsers
|
||||
head.appendChild( script );
|
||||
|
||||
function onScriptLoad() {
|
||||
|
||||
// Conditioned just in case both onload and readystate fire
|
||||
if( loaded === false ) {
|
||||
loaded = true;
|
||||
|
||||
MathJax.Hub.Config({
|
||||
messageStyle: 'none',
|
||||
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).
|
||||
// this is needed 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
|
||||
|
@ -42,6 +51,7 @@
|
|||
MathJax.Hub.Update( event.currentSlide );
|
||||
|
||||
} );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user