MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var t=MathJax.ElementJax.mml,a=MathJax.OutputJax.SVG,i=a.BBOX,e=MathJax.Localization,h="http://www.w3.org/1999/xlink";i.MGLYPH=i.Subclass({type:"image",removeable:!1,Init:function(t,i,e,s,l,r){null==r&&(r={});var n=1e3*t.width/a.em,o=1e3*t.height/a.em,g=n,m=o,d=0;""!==i&&(n=a.length2em(i,l,g),o=g?n/g*m:0),""!==e&&(o=a.length2em(e,l,m),""===i&&(n=m?o/m*g:0)),""!==s&&s.match(/\d/)&&(d=a.length2em(s,l),r.y=-d),r.height=Math.floor(o),r.width=Math.floor(n),r.transform="translate(0,"+o+") matrix(1 0 0 -1 0 0)",r.preserveAspectRatio="none",this.SUPER(arguments).Init.call(this,r),this.element.setAttributeNS(h,"href",t.SRC),this.w=this.r=n,this.h=this.H=o+d,this.d=this.D=-d,this.l=0}}),t.mglyph.Augment({toSVG:function(a,h){this.SVGgetStyles();var s,l,r=this.SVG();this.SVGhandleSpace(r);var n=this.getValues("src","width","height","valign","alt");if(""===n.src){if(n=this.getValues("index","fontfamily"),n.index){h||(h=this.SVGgetScale());var o={};n.fontfamily&&(o["font-family"]=n.fontfamily),r.Add(i.TEXT(h,String.fromCharCode(n.index),o))}}else if(this.img||(this.img=t.mglyph.GLYPH[n.src]),this.img||(this.img=t.mglyph.GLYPH[n.src]={img:new Image,status:"pending"},s=this.img.img,s.onload=MathJax.Callback(["SVGimgLoaded",this]),s.onerror=MathJax.Callback(["SVGimgError",this]),s.src=s.SRC=n.src,MathJax.Hub.RestartAfter(s.onload)),"OK"!==this.img.status)l=t.Error(e._(["MathML","BadMglyph"],"Bad mglyph: %1",n.src),{mathsize:"75%"}),this.Append(l),r=l.toSVG(),this.data.pop();else{var g=this.SVGgetMu(r);r.Add(i.MGLYPH(this.img.img,n.width,n.height,n.valign,g,{alt:n.alt,title:n.alt}))}return r.Clean(),this.SVGhandleColor(r),this.SVGsaveData(r),r},SVGimgLoaded:function(t,a){"string"==typeof t&&(a=t),this.img.status=a||"OK"},SVGimgError:function(){this.img.img.onload("error")}},{GLYPH:{}}),MathJax.Hub.Startup.signal.Post("SVG mglyph Ready"),MathJax.Ajax.loadComplete(a.autoloadDir+"/mglyph.js")});