commit ea00136979a9899c71c1e54074cf4877e882e521
parent 0e698717b524135a93dd369b6a3c6357e5c5d33e
Author: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 4 Apr 2011 14:07:11 -0400
Merge remote branch 'dpvc/issue86'
Diffstat:
2 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/jax/output/HTML-CSS/autoload/menclose.js b/jax/output/HTML-CSS/autoload/menclose.js
@@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
-MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var d="1.1";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];var c="http://www.w3.org/2000/svg";var f="urn:schemas-microsoft-com:vml";var e="mjxvml";a.menclose.Augment({toHTML:function(K){var h=this.getValues("notation","thickness","padding","mathcolor","color");if(h.color&&!this.mathcolor){h.mathcolor=h.color}if(h.thickness==null){h.thickness=".075em"}if(h.padding==null){h.padding=".2em"}var F=b.length2em(h.padding);var y=b.length2em(h.thickness);var u=b.Em(y)+" solid";K=this.HTMLcreateSpan(K);var r=b.createStack(K);var o=b.createBox(r);this.HTMLmeasureChild(0,o);var w=o.bbox.h+F+y,A=o.bbox.d+F+y,j=o.bbox.w+2*(F+y);var z=b.createFrame(r,w+A,0,j,y,"none");z.id="MathJax-frame-"+this.spanID;b.addBox(r,z);r.insertBefore(z,o);var k=h.notation.split(/ /);var l=0,E=0,n=0,s=0,x=0,v=0;var C,g;if(!h.mathcolor){h.mathcolor="black"}else{K.style.color=h.mathcolor}for(var J=0,I=k.length;J<I;J++){switch(k[J]){case a.NOTATION.BOX:z.style.border=u;if(!b.msieBorderWidthBug){l=E=s=n=y}break;case a.NOTATION.ROUNDEDBOX:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"roundrect",{style:{width:this.HTMLpx(j-2*y),height:this.HTMLpx(w+A-2*y),left:this.HTMLpx(y)+0.5,top:this.HTMLpx(y)+0.5},arcsize:".25"})}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"rect",{x:1,y:1,width:this.HTMLpx(j-y)-1,height:this.HTMLpx(w+A-y)-1,rx:this.HTMLpx(Math.min(w+A,j)/4)})}break;case a.NOTATION.CIRCLE:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"oval",{style:{width:this.HTMLpx(j-2*y),height:this.HTMLpx(w+A-2*y),left:this.HTMLpx(y)+0.5,top:this.HTMLpx(y)+0.5}})}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"ellipse",{rx:this.HTMLpx(j/2-y),ry:this.HTMLpx((w+A)/2-y),cx:this.HTMLpx(j/2),cy:this.HTMLpx((w+A)/2)})}break;case a.NOTATION.LEFT:z.style.borderLeft=u;if(!b.msieBorderWidthBug){s=y}break;case a.NOTATION.ACTUARIAL:z.style.borderTop=u;if(!b.msieBorderWidthBug){l=y;z.bbox.w+=F-y}case a.NOTATION.RIGHT:z.style.borderRight=u;if(!b.msieBorderWidthBug){n=y}break;case a.NOTATION.VERTICALSTRIKE:var q=b.createRule(r,w+A-y/2,0,y);b.addBox(r,q);b.placeBox(q,F+y+o.bbox.w/2,-A,true);break;case a.NOTATION.TOP:z.style.borderTop=u;if(!b.msieBorderWidthBug){l=y}break;case a.NOTATION.BOTTOM:z.style.borderBottom=u;if(!b.msieBorderWidthBug){E=y}break;case a.NOTATION.HORIZONTALSTRIKE:var G=b.createRule(r,y,0,j-y/2);b.addBox(r,G);b.placeBox(G,0,(w+A)/2-A,true);break;case a.NOTATION.UPDIAGONALSTRIKE:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,"+this.HTMLpx(w+A-y),to:this.HTMLpx(j)+",0"})}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"line",{x1:1,y1:this.HTMLpx(w+A-y),x2:this.HTMLpx(j-y),y2:this.HTMLpx(y)})}break;case a.NOTATION.DOWNDIAGONALSTRIKE:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,0",to:this.HTMLpx(j)+","+this.HTMLpx(w+A-y)})}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"line",{x1:1,y1:this.HTMLpx(y),x2:this.HTMLpx(j-y),y2:this.HTMLpx(w+A-y)})}break;case a.NOTATION.MADRUWB:z.style.borderBottom=u;z.style.borderRight=u;if(!b.msieBorderWidthBug){E=n=y}break;case a.NOTATION.RADICAL:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"polyline",{points:this.HTMLpx(y/2)+","+this.HTMLpx(0.6*(w+A))+" "+this.HTMLpx(F)+","+this.HTMLpx(w+A-y)+" "+this.HTMLpx(2*F)+","+this.HTMLpx(y/2)+" "+this.HTMLpx(j)+","+this.HTMLpx(y/2)});x=F}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"path",{d:"M 1,"+this.HTMLpx(0.6*(w+A))+" L "+this.HTMLpx(F)+","+this.HTMLpx(w+A)+" L "+this.HTMLpx(2*F)+",1 L "+this.HTMLpx(j)+",1"});b.placeBox(C.parentNode,0,F/2-A,true);x=F;v=y}break;case a.NOTATION.LONGDIV:if(b.useVML){if(!g){g=this.HTMLvml(r,w,A,j,y,h.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,"+this.HTMLpx(y/2),to:this.HTMLpx(j-y)+","+this.HTMLpx(y/2)});this.HTMLvmlElement(g,"arc",{style:{width:this.HTMLpx(2*F),height:this.HTMLpx(w+A-2*y),left:this.HTMLpx(-F),top:this.HTMLpx(y)},startangle:"10",endangle:"170"});x=F}else{if(!C){C=this.HTMLsvg(r,w,A,j,y,h.mathcolor)}this.HTMLsvgElement(C.firstChild,"path",{d:"M "+this.HTMLpx(j)+",1 L 1,1 a"+this.HTMLpx(F)+","+this.HTMLpx((w+A)/2-y)+" 0 0,1 1,"+this.HTMLpx(w+A-2*y)});b.placeBox(C.parentNode,0,y-A,true);x=F;v=y}break}}z.style.width=b.Em(j-s-n);z.style.height=b.Em(w+A-l-E);b.placeBox(z,0,v-A,true);b.placeBox(o,x+F+y,0);this.HTMLhandleSpace(K);this.HTMLhandleColor(K);return K},HTMLpx:function(g){return(g*b.em)},HTMLhandleColor:function(h){var i=document.getElementById("MathJax-frame-"+this.spanID);if(i){var g=this.getValues("mathbackground","background");if(this.style&&h.style.backgroundColor){g.mathbackground=h.style.backgroundColor}if(g.background&&!this.mathbackground){g.mathbackground=g.background}if(g.mathbackground&&g.mathbackground!==a.COLOR.TRANSPARENT){i.style.backgroundColor=g.mathbackground}}else{this.SUPER(arguments).HTMLhandleColor.call(this,h)}},HTMLsvg:function(h,l,m,g,k,j){var i=document.createElementNS(c,"svg");if(i.style){i.style.width=b.Em(g);i.style.height=b.Em(l+m)}var n=b.createBox(h);n.appendChild(i);b.placeBox(n,0,-m,true);this.HTMLsvgElement(i,"g",{fill:"none",stroke:j,"stroke-width":k*b.em});return i},HTMLsvgElement:function(g,h,i){var j=document.createElementNS(c,h);if(i){for(var k in i){if(i.hasOwnProperty(k)){j.setAttributeNS(null,k,i[k].toString())}}}g.appendChild(j);return j},HTMLvml:function(i,l,m,h,k,j){var g=b.createFrame(i,l+m,0,h,0,"none");b.addBox(i,g);b.placeBox(g,0,-m,true);this.constructor.VMLcolor=j;this.constructor.VMLthickness=this.HTMLpx(k);return g},HTMLvmlElement:function(g,h,i){var j=b.addElement(g,e+":"+h,i);if(!i.fillcolor){j.fillcolor="none"}if(!i.strokecolor){j.strokecolor=this.constructor.VMLcolor}if(!i.strokeweight){j.strokeweight=this.constructor.VMLthickness}}});MathJax.Hub.Browser.Select({MSIE:function(g){b.useVML=true;if(!document.namespaces[e]){document.namespaces.add(e,f);var h=document.createStyleSheet();h.addRule(e+"\\:*","{behavior: url(#default#VML); position:absolute; top:0; left:0}")}}});MathJax.Hub.Startup.signal.Post("HTML-CSS menclose Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/menclose.js")});
+MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var d="1.1.1";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];var c="http://www.w3.org/2000/svg";var f="urn:schemas-microsoft-com:vml";var e="mjxvml";a.menclose.Augment({toHTML:function(Q){var j=this.getValues("notation","thickness","padding","mathcolor","color");if(j.color&&!this.mathcolor){j.mathcolor=j.color}if(j.thickness==null){j.thickness=".075em"}if(j.padding==null){j.padding=".2em"}var M=b.length2em(j.padding);var E=b.length2em(j.thickness);var x=b.Em(E)+" solid";Q=this.HTMLcreateSpan(Q);var u=b.createStack(Q);var q=b.createBox(u);this.HTMLmeasureChild(0,q);var A=q.bbox.h+M+E,G=q.bbox.d+M+E,k=q.bbox.w+2*(M+E);var F=b.createFrame(u,A+G,0,k,E,"none");F.id="MathJax-frame-"+this.spanID;b.addBox(u,F);u.insertBefore(F,q);var l=j.notation.split(/ /);var n=0,K=0,o=0,v=0,C=0,z=0;var J,g;if(!j.mathcolor){j.mathcolor="black"}else{Q.style.color=j.mathcolor}for(var P=0,O=l.length;P<O;P++){switch(l[P]){case a.NOTATION.BOX:F.style.border=x;if(!b.msieBorderWidthBug){n=K=v=o=E}break;case a.NOTATION.ROUNDEDBOX:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}var I=Math.floor(1000*Math.min(k,A+G)-2*E);var y=Math.floor(4000*(k-2*E)),S=Math.floor(4000*(A+G-2*E));this.HTMLvmlElement(g,"shape",{style:{width:this.HTMLpx(k-2*E),height:this.HTMLpx(A+G-2*E),left:this.HTMLpx(E,0.5),top:this.HTMLpx(E,0.5)},path:"m "+I+",0 qx 0,"+I+" l 0,"+(S-I)+" qy "+I+","+S+" l "+(y-I)+","+S+" qx "+y+","+(S-I)+" l "+y+","+I+" qy "+(y-I)+",0 x e",coordsize:y+","+S})}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"rect",{x:1,y:1,width:this.HTMLpx(k-E)-1,height:this.HTMLpx(A+G-E)-1,rx:this.HTMLpx(Math.min(A+G,k)/4)})}break;case a.NOTATION.CIRCLE:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}this.HTMLvmlElement(g,"oval",{style:{width:this.HTMLpx(k-2*E),height:this.HTMLpx(A+G-2*E),left:this.HTMLpx(E,0.5),top:this.HTMLpx(E,0.5)}})}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"ellipse",{rx:this.HTMLpx(k/2-E),ry:this.HTMLpx((A+G)/2-E),cx:this.HTMLpx(k/2),cy:this.HTMLpx((A+G)/2)})}break;case a.NOTATION.LEFT:F.style.borderLeft=x;if(!b.msieBorderWidthBug){v=E}break;case a.NOTATION.ACTUARIAL:F.style.borderTop=x;if(!b.msieBorderWidthBug){n=E;F.bbox.w+=M-E}case a.NOTATION.RIGHT:F.style.borderRight=x;if(!b.msieBorderWidthBug){o=E}break;case a.NOTATION.VERTICALSTRIKE:var s=b.createRule(u,A+G-E/2,0,E);b.addBox(u,s);b.placeBox(s,M+E+q.bbox.w/2,-G,true);break;case a.NOTATION.TOP:F.style.borderTop=x;if(!b.msieBorderWidthBug){n=E}break;case a.NOTATION.BOTTOM:F.style.borderBottom=x;if(!b.msieBorderWidthBug){K=E}break;case a.NOTATION.HORIZONTALSTRIKE:var N=b.createRule(u,E,0,k-E/2);b.addBox(u,N);b.placeBox(N,0,(A+G)/2-G,true);break;case a.NOTATION.UPDIAGONALSTRIKE:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,"+this.HTMLpx(A+G-E),to:this.HTMLpx(k)+",0"})}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"line",{x1:1,y1:this.HTMLpx(A+G-E),x2:this.HTMLpx(k-E),y2:this.HTMLpx(E)})}break;case a.NOTATION.DOWNDIAGONALSTRIKE:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,0",to:this.HTMLpx(k)+","+this.HTMLpx(A+G-E)})}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"line",{x1:1,y1:this.HTMLpx(E),x2:this.HTMLpx(k-E),y2:this.HTMLpx(A+G-E)})}break;case a.NOTATION.MADRUWB:F.style.borderBottom=x;F.style.borderRight=x;if(!b.msieBorderWidthBug){K=o=E}break;case a.NOTATION.RADICAL:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}this.HTMLvmlElement(g,"shape",{style:{width:this.HTMLpx(k),height:this.HTMLpx(A+G)},path:"m "+this.HTMLpt(E/2,0.6*(A+G))+" l "+this.HTMLpt(M,A+G-E)+" "+this.HTMLpt(2*M,E/2)+" "+this.HTMLpt(k,E/2)+" e",coordsize:this.HTMLpt(k,A+G)});C=M}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"path",{d:"M 1,"+this.HTMLpx(0.6*(A+G))+" L "+this.HTMLpx(M)+","+this.HTMLpx(A+G)+" L "+this.HTMLpx(2*M)+",1 L "+this.HTMLpx(k)+",1"});b.placeBox(J.parentNode,0,M/2-G,true);C=M;z=E}break;case a.NOTATION.LONGDIV:if(b.useVML){if(!g){g=this.HTMLvml(u,A,G,k,E,j.mathcolor)}this.HTMLvmlElement(g,"line",{from:"0,"+this.HTMLpx(E/2),to:this.HTMLpx(k-E)+","+this.HTMLpx(E/2)});this.HTMLvmlElement(g,"arc",{style:{width:this.HTMLpx(2*M),height:this.HTMLpx(A+G-2*E),left:this.HTMLpx(-M),top:this.HTMLpx(E)},startangle:"10",endangle:"170"});C=M}else{if(!J){J=this.HTMLsvg(u,A,G,k,E,j.mathcolor)}this.HTMLsvgElement(J.firstChild,"path",{d:"M "+this.HTMLpx(k)+",1 L 1,1 a"+this.HTMLpx(M)+","+this.HTMLpx((A+G)/2-E)+" 0 0,1 1,"+this.HTMLpx(A+G-2*E)});b.placeBox(J.parentNode,0,E-G,true);C=M;z=E}break}}F.style.width=b.Em(k-v-o);F.style.height=b.Em(A+G-n-K);b.placeBox(F,0,z-G,true);b.placeBox(q,C+M+E,0);this.HTMLhandleSpace(Q);this.HTMLhandleColor(Q);return Q},HTMLpx:function(g){return(g*b.em)},HTMLpt:function(g,h){return Math.floor(1000*g)+","+Math.floor(1000*h)},HTMLhandleColor:function(h){var i=document.getElementById("MathJax-frame-"+this.spanID);if(i){var g=this.getValues("mathbackground","background");if(this.style&&h.style.backgroundColor){g.mathbackground=h.style.backgroundColor}if(g.background&&!this.mathbackground){g.mathbackground=g.background}if(g.mathbackground&&g.mathbackground!==a.COLOR.TRANSPARENT){i.style.backgroundColor=g.mathbackground}}else{this.SUPER(arguments).HTMLhandleColor.call(this,h)}},HTMLsvg:function(h,l,m,g,k,j){var i=document.createElementNS(c,"svg");if(i.style){i.style.width=b.Em(g);i.style.height=b.Em(l+m)}var n=b.createBox(h);n.appendChild(i);b.placeBox(n,0,-m,true);this.HTMLsvgElement(i,"g",{fill:"none",stroke:j,"stroke-width":k*b.em});return i},HTMLsvgElement:function(g,h,i){var j=document.createElementNS(c,h);if(i){for(var k in i){if(i.hasOwnProperty(k)){j.setAttributeNS(null,k,i[k].toString())}}}g.appendChild(j);return j},HTMLvml:function(i,l,m,h,k,j){var g=b.createFrame(i,l+m,0,h,0,"none");b.addBox(i,g);b.placeBox(g,0,-m,true);this.constructor.VMLcolor=j;this.constructor.VMLthickness=this.HTMLpx(k);return g},HTMLvmlElement:function(g,h,i){var j=b.addElement(g,e+":"+h);j.style.position="absolute";j.style.left=j.style.top=0;MathJax.Hub.Insert(j,i);if(!i.fillcolor){j.fillcolor="none"}if(!i.strokecolor){j.strokecolor=this.constructor.VMLcolor}if(!i.strokeweight){j.strokeweight=this.constructor.VMLthickness}}});MathJax.Hub.Browser.Select({MSIE:function(g){a.menclose.Augment({HTMLpx:function(i,h){return(i*b.em+(h||0))+"px"}});b.useVML=true;if(!document.namespaces[e]){if(document.documentMode&&document.documentMode>=8){document.namespaces.add(e,f,"#default#VML")}else{document.namespaces.add(e,f);document.createStyleSheet().addRule(e+"\\: *","{behavior: url(#default#VML)}")}}}});MathJax.Hub.Startup.signal.Post("HTML-CSS menclose Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/menclose.js")});
diff --git a/unpacked/jax/output/HTML-CSS/autoload/menclose.js b/unpacked/jax/output/HTML-CSS/autoload/menclose.js
@@ -22,7 +22,7 @@
*/
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
- var VERSION = "1.1";
+ var VERSION = "1.1.1";
var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"];
@@ -61,10 +61,15 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
case MML.NOTATION.ROUNDEDBOX:
if (HTMLCSS.useVML) {
if (!vml) {vml = this.HTMLvml(stack,H,D,W,t,values.mathcolor)}
- this.HTMLvmlElement(vml,"roundrect",{
+ // roundrect.arcsize can't be set in IE8 standards mode, so use a path
+ var r = Math.floor(1000*Math.min(W,H+D)-2*t);
+ var w = Math.floor(4000*(W-2*t)), h = Math.floor(4000*(H+D-2*t));
+ this.HTMLvmlElement(vml,"shape",{
style: {width:this.HTMLpx(W-2*t),height:this.HTMLpx(H+D-2*t),
- left:this.HTMLpx(t)+.5,top:this.HTMLpx(t)+.5},
- arcsize: ".25"
+ left:this.HTMLpx(t,.5),top:this.HTMLpx(t,.5)},
+ path: "m "+r+",0 qx 0,"+r+" l 0,"+(h-r)+" qy "+r+","+h+" "+
+ "l "+(w-r)+","+h+" qx "+w+","+(h-r)+" l "+w+","+r+" qy "+(w-r)+",0 x e",
+ coordsize: w+","+h
});
} else {
if (!svg) {svg = this.HTMLsvg(stack,H,D,W,t,values.mathcolor)}
@@ -80,7 +85,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
if (!vml) {vml = this.HTMLvml(stack,H,D,W,t,values.mathcolor)}
this.HTMLvmlElement(vml,"oval",{
style: {width:this.HTMLpx(W-2*t),height:this.HTMLpx(H+D-2*t),
- left:this.HTMLpx(t)+.5,top:this.HTMLpx(t)+.5}
+ left:this.HTMLpx(t,.5),top:this.HTMLpx(t,.5)}
});
} else {
if (!svg) {svg = this.HTMLsvg(stack,H,D,W,t,values.mathcolor)}
@@ -151,9 +156,11 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
case MML.NOTATION.RADICAL:
if (HTMLCSS.useVML) {
if (!vml) {vml = this.HTMLvml(stack,H,D,W,t,values.mathcolor)}
- this.HTMLvmlElement(vml,"polyline",{
- points: this.HTMLpx(t/2)+","+this.HTMLpx(.6*(H+D))+" "+this.HTMLpx(p)+","+this.HTMLpx(H+D-t)+
- " "+this.HTMLpx(2*p)+","+this.HTMLpx(t/2)+" "+this.HTMLpx(W)+","+this.HTMLpx(t/2)
+ this.HTMLvmlElement(vml,"shape",{
+ style: {width:this.HTMLpx(W), height:this.HTMLpx(H+D)},
+ path: "m "+this.HTMLpt(t/2,.6*(H+D))+" l "+this.HTMLpt(p,H+D-t)+" "+
+ this.HTMLpt(2*p,t/2)+" "+this.HTMLpt(W,t/2)+" e",
+ coordsize: this.HTMLpt(W,H+D)
});
dx = p;
} else {
@@ -199,6 +206,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
},
HTMLpx: function (n) {return (n*HTMLCSS.em)},
+ HTMLpt: function (x,y) {return Math.floor(1000*x)+','+Math.floor(1000*y)},
HTMLhandleColor: function (span) {
var frame = document.getElementById("MathJax-frame-"+this.spanID);
@@ -233,7 +241,9 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
return vml;
},
HTMLvmlElement: function (vml,type,def) {
- var obj = HTMLCSS.addElement(vml,vmlns+":"+type,def);
+ var obj = HTMLCSS.addElement(vml,vmlns+":"+type);
+ obj.style.position = "absolute"; obj.style.left = obj.style.top = 0;
+ MathJax.Hub.Insert(obj,def); // IE8 needs to do this after obj is added to the page
if (!def.fillcolor) {obj.fillcolor = "none"}
if (!def.strokecolor) {obj.strokecolor = this.constructor.VMLcolor}
if (!def.strokeweight) {obj.strokeweight =this.constructor.VMLthickness}
@@ -242,11 +252,15 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
MathJax.Hub.Browser.Select({
MSIE: function (browser) {
+ MML.menclose.Augment({HTMLpx: function (n,d) {return (n*HTMLCSS.em+(d||0))+"px"}});
HTMLCSS.useVML = true;
if (!document.namespaces[vmlns]) {
- document.namespaces.add(vmlns,VMLNS);
- var sheet = document.createStyleSheet();
- sheet.addRule(vmlns+"\\:*","{behavior: url(#default#VML); position:absolute; top:0; left:0}");
+ if (document.documentMode && document.documentMode >= 8) {
+ document.namespaces.add(vmlns,VMLNS,"#default#VML");
+ } else {
+ document.namespaces.add(vmlns,VMLNS);
+ document.createStyleSheet().addRule(vmlns+"\\: *","{behavior: url(#default#VML)}");
+ }
}
}
});