status-completed. See Re-render MathJax in comments.
A workaround is to use the following userscript. (can some GM gurus see if it's possible to remove all those unsafeWindow
s?)
// ==UserScript==
// @name Fix TeX related problems on math.SE
// @namespace http://networkpx.googlecode.com
// @description Fix TeX related problems on math.SE
// @include https://math.meta.stackexchange.com/*
// @include http://math.stackexchange.com/*
// ==/UserScript==
var rl = unsafeWindow.removeLoader;
unsafeWindow.removeLoader = function(){
rl();
unsafeWindow.styleCode();
}
There are 2 options to fix this problem.
Option 1:
- Edit "question.js".
- Find the "
var n = function (r, q)
" function, inside the comments
object.
Modify this function to:
var p = h(r, " > table > tbody");
if (p.children().length > 0) {
p.children().remove()
}
p.append(q);
d();
o();
if (typeof MathJax != "undefined") // <--
MathJax.Hub.Queue(["Typeset", MathJax.Hub]); // <--
removeLoader()
This should fully solve the problem (I haven't tested), but it requires changing a file that is shared by every site.
Option 2:
- Edit any Javascript file, e.g. "math-tex.js", after "master.js" is loaded.
Add these lines of code:
var rl = removeLoader;
removeLoader = function(){
rl();
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
}
This relies on the loader is being removed when a comment is successfully added, fetched or edited. It is pretty hackish.