作为注册用户,您可以执行以下操作:
在用户首选项 => 外观下,打开“MathML with SVG or PNG fallback”模式。(其他两种模式需要稍微不同的脚本,但恕我直言,该模式是目前最好的选择。)
https://en.wikipedia.org/wiki/User:YOURHANDLE/common.js
接下来在[不要忘记更改用户名!]编辑您的用户特定脚本页面,并将以下自定义脚本添加到其中:
// add to User:YOURNAME/common.js to get smooth MathJax rendering
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
}
);
});
}
};
mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=MML_HTMLorMML-full');//load MathJax with a suitable combined config file
}
此脚本仅在页面中有数学时加载 MathJax,渲染它,并且(在渲染完成时)用结果替换后备图像。
这样,您几乎没有抖动。从快速测试来看,这似乎适用于 Chrome 43、Firefox 39、IE8 和 Edge,以及 WebKit 2.6.2(因此应该适用于 Safari)。