/*
* /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;gf
“>”}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”l
“"f
”>“},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;fl
“</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+“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“);