/*

*  /MathJax/extensions/toMathML.js
*
*  Copyright (c) 2009-2018 The MathJax Consortium
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/

MathJax.Hub.Register.LoadHook(“/jax/element/mml/jax.js”,function(){var c=“2.7.5”;var a=MathJax.ElementJax.mml,b=MathJax.Hub.config.menuSettings;a.mbase.Augment({toMathML:function(l){var h=(this.inferred&&this.parent.inferRow);if(l==null){l=“”}var f=this.type,e=this.toMathMLattributes();if(f===“mspace”){return l+“<"+f+e+" />”}var k=[],j=(this.isToken?“”:l+(h?“”:“ ”));for(var g=0,d=this.data.length;g“)}}}if(this.isToken||this.isChars){return l+”<"+f+e+">“+k.join(”“)+”f“>”}if(h){return k.join(“n”)}if(k.length===0||(k.length===1&&k[0]===“”)){return l+“<"+f+e+" />”}return l+“<"+f+e+">n”+k.join(“n”)+“n”lf”>“},toMathMLattributes:function(){var j=(this.type===”mstyle“?a.math.prototype.defaults:this.defaults);var h=(this.attrNames||a.copyAttributeNames),g=a.skipAttributes,l=a.copyAttributes;var e=[];if(this.type===”math“&&(!this.attr||!(”xmlns“ in this.attr))){e.push(‘xmlns=”http://www.w3.org/1998/Math/MathML“’)}if(!this.attrNames){for(var k in j){if(!g[k]&&!l[k]&&j.hasOwnProperty(k)){if(this[k]!=null&&this[k]!==j[k]){if(this.Get(k,null,1)!==this[k]){e.push(k+‘=”’+this.toMathMLattribute(this[k])+‘“’)}}}}}for(var f=0,d=h.length;f126||(k<32&&k!==10&&k!==13&&k!==9)){f[g]="&#x"+k.toString(16).toUpperCase()+";"}else{var j={"&":"&","<":"<",">”:“>”,‘“’:”“”}[f[g]];if(j)f[g]=j}}}else{if(g+11);var p=this.type,k=this.toMathMLattributes();var j=[],o=d+(g?“ ”+(n?“ ”:“”):“”)+“ ”;for(var h=0,f=this.data.length;h“)}}if(j.length===0||(j.length===1&&j[0]===”“)){if(!g){return”<"+p+k+" />“}j.push(o+”“)}if(g){if(n){j.unshift(d+” “);j.push(d+” “)}j.unshift(d+” “);var l=e.originalText.replace(/[&<>]/g,function(i){return{”>“:”>“,”<":"<","&":"&"});j.push(d+' <annotation encoding=“'+this.toMathMLquote(g)+'”>'l“</annotation>”);j.push(d+“ </semantics>”)}return d+“<”+p+k+“>n”+j.join(“n”)+“n”d“</”p“>”}});a.msubsup.Augment({toMathML:function(j){var f=this.type;if(this.data==null){f=“msub”}if(this.data==null){f=“msup”}var e=this.toMathMLattributes();delete this.data.inferred;var h=[];for(var g=0,d=this.data.length;g<d;g++){if(this.data){h.push(this.data.toMathML(j+“ ”))}}return j+“<”+f+e+“>n”+h.join(“n”)+“n”j“</”f“>”}});a.munderover.Augment({toMathML:function(k){var f=this.type;var j=this.data;if(j&&j.isa(a.TeXAtom)&&j.movablelimits&&!j.Get(“displaystyle”)){type=“msubsup”;if(this.data==null){f=“msup”}if(this.data==null){f=“msub”}}else{if(this.data==null){f=“mover”}if(this.data==null){f=“munder”}}var e=this.toMathMLattributes();delete this.data.inferred;var h=[];for(var g=0,d=this.data.length;g<d;g++){if(this.data){h.push(this.data.toMathML(k+“ ”))}}return k+“<”+f+e+“>n”+h.join(“n”)+“n”k“</”f“>”}});a.TeXAtom.Augment({toMathML:function(e){var d=this.toMathMLattributes();if(!d&&this.data.data.length===1){return e.substr(2)+this.data.toMathML(e)}return e+“d”>n“+this.data.toMathML(e+” “)+”n“e”</mrow>“}});a.chars.Augment({toMathML:function(d){return(d||”“)+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(d){return(d||”“)+”&“+this.toMathMLquote(this.data)+”;<!– “+this.toString()+” –>“}});a.xml.Augment({toMathML:function(d){return(d||”“)+this.toString()}});MathJax.Hub.Register.StartupHook(”TeX mathchoice Ready“,function(){a.TeXmathchoice.Augment({toMathML:function(d){return this.Core().toMathML(d)}})});MathJax.Hub.Startup.signal.Post(”toMathML Ready“)});MathJax.Ajax.loadComplete(”/extensions/toMathML.js“);