<commit_before>/**
 * A plugin which enables rendering of math equations inside
 * of reveal.js slides. Essentially a thin wrapper for MathJax.
 *
 * @author <NAME>
 */
(function(){

	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';

	// Detect when the script has loaded
	script.onload = onScriptLoad;
	script.onreadystatechange = function() {
		if ( this.readyState === 'loaded' ) {
			onScriptLoad.call();
		}
	}

	head.appendChild( script );

	function onScriptLoad() {

		MathJax.Hub.Config({
			messageStyle: 'none',
			tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
		});

		Reveal.addEventListener( 'slidechanged', function( event ) {
			MathJax.Hub.Rerender();
		} );

	}

})();
<commit_msg>limit scope of mathjax rerender #531<commit_after>/**
 * A plugin which enables rendering of math equations inside
 * of reveal.js slides. Essentially a thin wrapper for MathJax.
 *
 * @author <NAME>
 */
(function(){

	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';

	// Detect when the script has loaded
	script.onload = onScriptLoad;
	script.onreadystatechange = function() {
		if ( this.readyState === 'loaded' ) {
			onScriptLoad.call();
		}
	}

	head.appendChild( script );

	function onScriptLoad() {

		MathJax.Hub.Config({
			messageStyle: 'none',
			tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
		});

		Reveal.addEventListener( 'slidechanged', function( event ) {
			MathJax.Hub.Update( event.currentSlide );
		} );

	}

})();

{'fraction_non_alphanumeric': 0.17362270450751252, 'fraction_numerical': 0.0027824151363383415, 'mean_word_length': 3.872628726287263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3994716', 'n_tokens_mistral': 654, 'n_tokens_neox': 600, 'n_words': 130}