MathJax loading fixes from mathjax-users list:
* fix for $ stripping in IE * wrap everything in {} for \displaystyle
This commit is contained in:
parent
b93e71e0ae
commit
87cbb1f4c8
|
@ -36,14 +36,14 @@ MathJax.Extension.wiki2jax = {
|
|||
if (node.nodeName == 'IMG') {
|
||||
tex = node.alt;
|
||||
} else {
|
||||
tex = node.innerHTML.substring(node.innerHTML[0]=='$',node.innerHTML.length-(node.innerHTML[node.innerHTML.length-1]=='$'));
|
||||
tex = node.innerHTML.replace(/^\$/,"").replace(/\$$/,"");
|
||||
tex = tex.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/ /g," ");
|
||||
}
|
||||
|
||||
tex = tex.replace(/\\iiint([^!]*)!\\!\\!\\!\\!.*\\subset\\!\\supset/g,"\\iiint$1mkern-2.5em\\subset\\!\\supset").replace(/\\iint([^!]*)!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!(.*)\\subset\\!\\supset/g,"\\iint$1mkern-1.65em$2\\subset\\!\\!\\supset").replace(/\\int\\!\\!\\!(\\!)+\\int\\!\\!\\!(\\!)+\\int([^!]*)!\\!\\!\\!\\!.*\\bigcirc(\\,)*/g,"\\iiint$3mkern-2.5em\\subset\\!\\supset").replace(/\\int\\!\\!\\!(\\!)+\\int([^!]*)!\\!\\!\\!\\!\\!\\!\\!\\!(.*)\\bigcirc(\\,)*/g,"\\iint$2mkern-1.65em$3\\subset\\!\\!\\supset");
|
||||
if (mode === "") {
|
||||
tex = tex.replace(/ *\\scriptstyle(\W)/g,"\\textstyle$1").replace(/ *\\scriptscriptstyle(\W)/g,"\\scriptstyle$1");
|
||||
if (parent.firstChild === node) tex = "\\displaystyle "+tex;
|
||||
if (parent.firstChild === node) tex = "\\displaystyle{"+tex+"}";
|
||||
}
|
||||
|
||||
var i;
|
||||
|
|
Loading…
Reference in New Issue