Jump to content

User:Salix alba/MathJax.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
console.log("Loading mathjax7");
/*$.ajax({
  url: "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"
}).done(function() {
    console.log( "success" );
    MathJax.Hub.Config({
      tex2jax: { inlineMath: [['$','$']] }
    });
  })
  .fail(function() {
    console.log( "error" );
  });
*/
window.MathJax = {
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  };

mw.loader.load( 
	'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML');
/*	
 https://cdn.mathjax.org/mathjax/latest/MathJax.js?
	function(){
	  console.log("MJ OK");
      },
	function(){
	  console.log("MJ Error");
      }
);
*/