MediaWiki:Common.js: Difference between revisions
No edit summary Tag: Reverted |
No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
*/ | */ | ||
mw.loader.load( 'https://wiki.evoludo.org/gwt/evoludoweb/evoludoweb.nocache.js' ); | mw.loader.load( 'https://wiki.evoludo.org/gwt/evoludoweb/evoludoweb.nocache.js' ); | ||
window.MathJax | /* 250221 doesn't enable equation numbering... why? | ||
* see https://docs.mathjax.org/en/latest/input/tex/eqnumbers.html | |||
window.MathJax = { | |||
tex: { | tex: { | ||
tags: ' | tags: 'ams' | ||
} | } | ||
}; | }; | ||
*/ | |||
/* 250221 doesn't work either.. | |||
* from https://stackoverflow.com/questions/31891619/mediawiki-removed-mathjax-can-mathjax-be-forced-on-client-side-another-way | |||
var mathTags = $('.mwe-math-mathml-a11y'); | |||
if (mathTags.length > 0){ //only do something when there's math on the page | |||
window.MathJax = { //hook into MathJax's configuration | |||
AuthorInit: function () { | |||
MathJax.Hub.Register.StartupHook("End",function () { //when MathJax is done... | |||
MathJax.Hub.Queue( | |||
function(){ | |||
mathTags.removeClass('mwe-math-mathml-a11y'); // .. make the span around MathML (now MathJax output) visible | |||
$('.mwe-math-fallback-image-inline').addClass('mwe-math-mathml-a11y'); //hide fallback images | |||
} | |||
); | |||
}); | |||
} | |||
}; | |||
} | |||
*/ |