Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: KOB1
Views: 16973/**1* A plugin which enables rendering of math equations inside2* of reveal.js slides. Essentially a thin wrapper for MathJax.3*4* @author Hakim El Hattab5*/6var RevealMath = window.RevealMath || (function(){78var options = Reveal.getConfig().math || {};9options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';10options.config = options.config || 'TeX-AMS_HTML-full';1112loadScript( options.mathjax + '?config=' + options.config, function() {1314MathJax.Hub.Config({15messageStyle: 'none',16tex2jax: {17inlineMath: [['$','$'],['\\(','\\)']] ,18skipTags: ['script','noscript','style','textarea','pre']19},20skipStartupTypeset: true21});2223// Typeset followed by an immediate reveal.js layout since24// the typesetting process could affect slide height25MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] );26MathJax.Hub.Queue( Reveal.layout );2728// Reprocess equations in slides when they turn visible29Reveal.addEventListener( 'slidechanged', function( event ) {3031MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] );3233} );3435} );3637function loadScript( url, callback ) {3839var head = document.querySelector( 'head' );40var script = document.createElement( 'script' );41script.type = 'text/javascript';42script.src = url;4344// Wrapper for callback to make sure it only fires once45var finish = function() {46if( typeof callback === 'function' ) {47callback.call();48callback = null;49}50}5152script.onload = finish;5354// IE55script.onreadystatechange = function() {56if ( this.readyState === 'loaded' ) {57finish();58}59}6061// Normal browsers62head.appendChild( script );6364}6566})();676869