text: MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var t=MathJax.ElementJax.mml,a=MathJax.Hub.config.menuSettings;t.mbase.Augment({toMathML:function(t){var a=this.inferred&&this.parent.inferRow;null==t&&(t="");var i=this.type,s=this.toMathMLattributes();if("mspace"===i)return t+"<"+i+s+" />";for(var h=[],e=this.isToken?"":t+(a?"":"  "),n=0,r=this.data.length;n<r;n++)this.data[n]?h.push(this.data[n].toMathML(e)):this.isToken||this.isChars||h.push(e+"<mrow />");return this.isToken||this.isChars?t+"<"+i+s+">"+h.join("")+"</"+i+">":a?h.join("\n"):0===h.length||1===h.length&&""===h[0]?t+"<"+i+s+" />":t+"<"+i+s+">\n"+h.join("\n")+"\n"+t+"</"+i+">"},toMathMLattributes:function(){var a="mstyle"===this.type?t.math.prototype.defaults:this.defaults,i=this.attrNames||t.copyAttributeNames,s=t.skipAttributes,h=t.copyAttributes,e=[];if("math"!==this.type||this.attr&&this.attr.xmlns||e.push('xmlns="http://www.w3.org/1998/Math/MathML"'),!this.attrNames)for(var n in a)s[n]||h[n]||!a.hasOwnProperty(n)||null!=this[n]&&this[n]!==a[n]&&this.Get(n,null,1)!==this[n]&&e.push(n+'="'+this.toMathMLattribute(this[n])+'"');for(var r=0,o=i.length;r<o;r++)(1!==h[i[r]]||a.hasOwnProperty(i[r]))&&(value=(this.attr||{})[i[r]],null==value&&(value=this[i[r]]),null!=value&&e.push(i[r]+'="'+this.toMathMLquote(value)+'"'));return this.toMathMLclass(e),e.length?" "+e.join(" "):""},toMathMLclass:function(i){var s=[];if(this.class&&s.push(this.class),this.isa(t.TeXAtom)&&a.texHints){var h=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];h&&(s.push("MJX-TeXAtom-"+h),"OP"!==h||this.movablelimits||s.push("MJX-fixedlimits"))}this.mathvariant&&this.toMathMLvariants[this.mathvariant]&&s.push("MJX"+this.mathvariant),this.variantForm&&s.push("MJX-variant"),s.length&&i.unshift('class="'+s.join(" ")+'"')},toMathMLattribute:function(t){return"string"==typeof t&&t.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)?(RegExp.$2||"")+(1/18*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em":this.toMathMLvariants[t]?this.toMathMLvariants[t]:this.toMathMLquote(t)},toMathMLvariants:{"-tex-caligraphic":t.VARIANT.SCRIPT,"-tex-caligraphic-bold":t.VARIANT.BOLDSCRIPT,"-tex-oldstyle":t.VARIANT.NORMAL,"-tex-oldstyle-bold":t.VARIANT.BOLD,"-tex-mathit":t.VARIANT.ITALIC},toMathMLquote:function(t){t=String(t).split("");for(var a=0,i=t.length;a<i;a++){var s=t[a].charCodeAt(0);if(s<=55295||57344<=s)if(s>126||s<32&&10!==s&&13!==s&&9!==s)t[a]="&#x"+s.toString(16).toUpperCase()+";";else{var h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[t[a]];h&&(t[a]=h)}else if(a+1<i){var e=t[a+1].charCodeAt(0),n=(s-55296<<10)+(e-56320)+65536;t[a]="&#x"+n.toString(16).toUpperCase()+";",t[a+1]="",a++}else t[a]=""}return t.join("")}}),t.math.Augment({toMathML:function(t,i){var s;null==t&&(t=""),i&&i.originalText&&a.semantics&&(s=MathJax.InputJax[i.inputJax].annotationEncoding);for(var h=this.data[0]&&this.data[0].data.length>1,e=this.type,n=this.toMathMLattributes(),r=[],o=t+(s?"  "+(h?"  ":""):"")+"  ",u=0,l=this.data.length;u<l;u++)this.data[u]?r.push(this.data[u].toMathML(o)):r.push(o+"<mrow />");if(0===r.length||1===r.length&&""===r[0]){if(!s)return"<"+e+n+" />";r.push(o+"<mrow />")}if(s){h&&(r.unshift(t+"    <mrow>"),r.push(t+"    </mrow>")),r.unshift(t+"  <semantics>");var M=i.originalText.replace(/[&<>]/g,function(t){return{">":"&gt;","<":"&lt;","&":"&amp;"}[t]});r.push(t+'    <annotation encoding="'+s+'">'+M+"</annotation>"),r.push(t+"  </semantics>")}return t+"<"+e+n+">\n"+r.join("\n")+"\n"+t+"</"+e+">"}}),t.msubsup.Augment({toMathML:function(t){var a=this.type;null==this.data[this.sup]&&(a="msub"),null==this.data[this.sub]&&(a="msup");var i=this.toMathMLattributes();delete this.data[0].inferred;for(var s=[],h=0,e=this.data.length;h<e;h++)this.data[h]&&s.push(this.data[h].toMathML(t+"  "));return t+"<"+a+i+">\n"+s.join("\n")+"\n"+t+"</"+a+">"}}),t.munderover.Augment({toMathML:function(a){var i=this.type,s=this.data[this.base];s&&s.isa(t.TeXAtom)&&s.movablelimits&&!s.Get("displaystyle")?(type="msubsup",null==this.data[this.under]&&(i="msup"),null==this.data[this.over]&&(i="msub")):(null==this.data[this.under]&&(i="mover"),null==this.data[this.over]&&(i="munder"));var h=this.toMathMLattributes();delete this.data[0].inferred;for(var e=[],n=0,r=this.data.length;n<r;n++)this.data[n]&&e.push(this.data[n].toMathML(a+"  "));return a+"<"+i+h+">\n"+e.join("\n")+"\n"+a+"</"+i+">"}}),t.TeXAtom.Augment({toMathML:function(t){var a=this.toMathMLattributes();return a||1!==this.data[0].data.length?t+"<mrow"+a+">\n"+this.data[0].toMathML(t+"  ")+"\n"+t+"</mrow>":t.substr(2)+this.data[0].toMathML(t)}}),t.chars.Augment({toMathML:function(t){return(t||"")+this.toMathMLquote(this.toString())}}),t.entity.Augment({toMathML:function(t){return(t||"")+"&"+this.data[0]+";<!-- "+this.toString()+" -->"}}),t.xml.Augment({toMathML:function(t){return(t||"")+this.toString()}}),MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){t.TeXmathchoice.Augment({toMathML:function(t){return this.Core().toMathML(t)}})}),MathJax.Hub.Startup.signal.Post("toMathML Ready")}),MathJax.Ajax.loadComplete("[MathJax]/extensions/toMathML.js");