17 lines
32 KiB
JavaScript
17 lines
32 KiB
JavaScript
/*
|
|
* /MathJax/jax/element/mml/jax.js
|
|
*
|
|
* Copyright (c) 2010 Design Science, Inc.
|
|
*
|
|
* Part of the MathJax library.
|
|
* See http://www.mathjax.org for details.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0;
|
|
* you may not use this file except in compliance with the License.
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*/
|
|
|
|
MathJax.ElementJax.mml=MathJax.ElementJax({mimeType:"jax/mml"},{id:"mml",version:"1.1.1",directory:MathJax.ElementJax.directory+"/mml",extensionDir:MathJax.ElementJax.extensionDir+"/mml",optableDir:MathJax.ElementJax.directory+"/mml/optable"});MathJax.ElementJax.mml.Augment({Init:function(){if(arguments.length===1&&arguments[0].type==="math"){this.root=arguments[0]}else{this.root=MathJax.ElementJax.mml.math.apply(this,arguments)}if(this.root.mode){if(!this.root.display&&this.root.mode==="display"){this.root.display="block"}delete this.root.mode}}},{INHERIT:"_inherit_",AUTO:"_auto_",SIZE:{INFINITY:"infinity",SMALL:"small",NORMAL:"normal",BIG:"big"},COLOR:{TRANSPARENT:"transparent"},VARIANT:{NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALIGRAPHIC:"-tex-caligraphic",OLDSTYLE:"-tex-oldstyle"},FORM:{PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},LINEBREAK:{AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},LINEBREAKSTYLE:{BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},INDENTALIGN:{LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},INDENTSHIFT:{INDENTSHIFT:"indentshift"},LINETHICKNESS:{THIN:"thin",MEDIUM:"medium",THICK:"thick"},NOTATION:{LONGDIV:"longdiv",ACTUARIAL:"actuarial",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",MADRUWB:"madruwb"},ALIGN:{TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},LINES:{NONE:"none",SOLID:"solid",DASHED:"dashed"},SIDE:{LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},WIDTH:{AUTO:"auto",FIT:"fit"},ACTIONTYPE:{TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},LENGTH:{VERYVERYTHINMATHSPACE:"veryverythinmathspace",VERYTHINMATHSPACE:"verythinmathspace",THINMATHSPACE:"thinmathspace",MEDIUMMATHSPACE:"mediummathspace",THICKMATHSPACE:"thickmathspace",VERYTHICKMATHSPACE:"verythickmathspace",VERYVERYTHICKMATHSPACE:"veryverythickmathspace",NEGATIVEVERYVERYTHINMATHSPACE:"negativeveryverythinmathspace",NEGATIVEVERYTHINMATHSPACE:"negativeverythinmathspace",NEGATIVETHINMATHSPACE:"negativethinmathspace",NEGATIVEMEDIUMMATHSPACE:"negativemediummathspace",NEGATIVETHICKMATHSPACE:"negativethickmathspace",NEGATIVEVERYTHICKMATHSPACE:"negativeverythickmathspace",NEGATIVEVERYVERYTHICKMATHSPACE:"negativeveryverythickmathspace"},OVERFLOW:{LINBREAK:"linebreak",SCROLL:"scroll",ELIDE:"elide",TRUNCATE:"truncate",SCALE:"scale"},UNIT:{EM:"em",EX:"ex",PX:"px",IN:"in",CM:"cm",MM:"mm",PT:"pt",PC:"pc"},TEXCLASS:{ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},PLANE1:String.fromCharCode(55349)});(function(a){var d=false;var b=true;a.mbase=MathJax.Object.Subclass({type:"base",isToken:d,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT},noInherit:{},Init:function(){this.data=[];if(this.inferRow&&!(arguments.length===1&&arguments[0].inferred)){this.Append(a.mrow().With({inferred:b}))}this.Append.apply(this,arguments)},With:function(f){for(var g in f){if(f.hasOwnProperty(g)){this[g]=f[g]}}return this},Append:function(){if(this.inferRow&&this.data.length){this.data[0].Append.apply(this.data[0],arguments)}else{for(var g=0,f=arguments.length;g<f;g++){this.SetData(this.data.length,arguments[g])}}},SetData:function(f,g){if(g!=null){if(!(g instanceof a.mbase)){g=(this.isToken?a.chars(g):a.mtext(g))}g.parent=this;g.setInherit(this.inheritFromMe?this:this.inherit)}this.data[f]=g},Parent:function(){var f=this.parent;while(f&&f.inferred){f=f.parent}return f},Get:function(g,k){if(typeof(this[g])!=="undefined"){return this[g]}var h=this.Parent();if(h&&h["adjustChild_"+g]!=null){return(h["adjustChild_"+g])(h.childPosition(this))}var j=this.inherit;var f=j;while(j){if(typeof(j[g])!=="undefined"){var i=j.noInherit[this.type];if(!(i&&i[g])){return j[g]}}f=j;j=j.inherit}if(!k){if(this.defaults[g]===a.AUTO){return this.autoDefault(g)}if(this.defaults[g]!==a.INHERIT&&this.defaults[g]!=null){return this.defaults[g]}if(f){return f.defaults[g]}}return null},hasValue:function(f){return(this.Get(f,true)!=null)},getValues:function(){var g={};for(var h=0,f=arguments.length;h<f;h++){g[arguments[h]]=this.Get(arguments[h])}return g},adjustChild_scriptlevel:function(f){return this.Get("scriptlevel")},adjustChild_displaystyle:function(f){return this.Get("displaystyle")},adjustChild_texprimestyle:function(f){return this.Get("texprimestyle")},childPosition:function(h){if(h.parent.inferred){h=h.parent}for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]===h){return g}}return null},setInherit:function(h){if(h!==this.inherit&&this.inherit==null){this.inherit=h;for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]&&this.data[g].setInherit){this.data[g].setInherit(h)}}}},setTeXclass:function(f){this.getPrevClass(f);return(typeof(this.texClass)!=="undefined"?this:f)},getPrevClass:function(f){if(f){this.prevClass=f.Get("texClass");this.prevLevel=f.Get("scriptlevel")}},updateTeXclass:function(f){if(f){this.prevClass=f.prevClass;delete f.prevClass;this.prevLevel=f.prevLevel;delete f.prevLevel;this.texClass=f.Get("texClass")}},texSpacing:function(){var g=(this.prevClass!=null?this.prevClass:a.TEXCLASS.NONE);var f=(this.Get("texClass")||a.TEXCLASS.ORD);if(g===a.TEXCLASS.NONE||f===a.TEXCLASS.NONE){return""}if(g===a.TEXCLASS.VCENTER){g=a.TEXCLASS.ORD}if(f===a.TEXCLASS.VCENTER){f=a.TEXCLASS.ORD}var h=this.TEXSPACE[g][f];if(this.prevLevel>0&&this.Get("scriptlevel")>0&&h>=0){return""}return this.TEXSPACELENGTH[Math.abs(h)]},TEXSPACELENGTH:["",a.LENGTH.THINMATHSPACE,a.LENGTH.MEDIUMMATHSPACE,a.LENGTH.THICKMATHSPACE],TEXSPACE:[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],autoDefault:function(f){return""},isSpacelike:function(){return d},isEmbellished:function(){return d},Core:function(){return this},CoreMO:function(){return this},lineBreak:function(){if(this.isEmbellished()){return this.CoreMO().lineBreak()}else{return"none"}},array:function(){if(this.inferred){return this.data}else{return[this]}},toString:function(){return this.type+"("+this.data.join(",")+")"}},{childrenSpacelike:function(){for(var f=0;f<this.data.length;f++){if(!this.data[f].isSpacelike()){return d}}return b},childEmbellished:function(){return(this.data[0]&&this.data[0].isEmbellished())},childCore:function(){return this.data[0]},childCoreMO:function(){return(this.data[0]?this.data[0].CoreMO():null)},setChildTeXclass:function(f){if(this.data[0]){f=this.data[0].setTeXclass(f);this.updateTeXclass(this.data[0])}return f},setBaseTeXclasses:function(h){this.getPrevClass(h);this.texClass=null;if(this.isEmbellished()){h=this.data[0].setTeXclass(h);this.updateTeXclass(this.Core())}else{if(this.data[0]){this.data[0].setTeXclass()}h=this}for(var g=1,f=this.data.length;g<f;g++){if(this.data[g]){this.data[g].setTeXclass()}}return h},setSeparateTeXclasses:function(h){this.getPrevClass(h);for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]){this.data[g].setTeXclass()}}if(this.isEmbellished()){this.updateTeXclass(this.Core())}return this}});a.mi=a.mbase.Subclass({type:"mi",isToken:b,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.AUTO,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT},autoDefault:function(g){if(g==="mathvariant"){var f=(this.data[0]||"").toString();return(f.length===1||(f.length===2&&f.charCodeAt(0)===this.PLANE1)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""}});a.mn=a.mbase.Subclass({type:"mn",isToken:b,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:b,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,form:a.AUTO,fence:a.AUTO,separator:a.AUTO,lspace:a.AUTO,rspace:a.AUTO,stretchy:a.AUTO,symmetric:a.AUTO,maxsize:a.AUTO,minsize:a.AUTO,largeop:a.AUTO,movablelimits:a.AUTO,accent:a.AUTO,linebreak:a.LINEBREAK.AUTO,lineleading:a.INHERIT,linebreakstyle:a.AUTO,linebreakmultchar:a.INHERIT,indentalign:a.INHERIT,indentshift:a.INHERIT,indenttarget:a.INHERIT,indentalignfirst:a.INHERIT,indentshiftfirst:a.INHERIT,indentalignlast:a.INHERIT,indentshiftlast:a.INHERIT,texClass:a.AUTO},defaultDef:{form:a.FORM.INFIX,fence:d,separator:d,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:d,symmetric:b,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:d,movablelimits:d,accent:d,linebreak:a.LINEBREAK.AUTO,lineleading:"1ex",linebreakstyle:"before",indentalign:a.INDENTALIGN.AUTO,indentshift:"0",indenttarget:"",indentalignfirst:a.INDENTALIGN.INDENTALIGN,indentshiftfirst:a.INDENTSHIFT.INDENTSHIFT,indentalignlast:a.INDENTALIGN.INDENTALIGN,indentshiftlast:a.INDENTSHIFT.INDENTSHIFT,texClass:a.TEXCLASS.REL},SPACE_ATTR:{lspace:1,rspace:2,form:4},useMMLspacing:7,autoDefault:function(h,o){var n=this.def;if(!n){if(h==="form"){this.useMMLspacing&=~this.SPACE_ATTR.form;return this.getForm()}var l=this.data.join("");var g=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var j=0,f=g.length;j<f;j++){var k=this.OPTABLE[g[j]][l];if(k){n=this.makeDef(k);break}}if(!n){n=this.CheckRange(l)}if(!n&&o){n={}}else{if(!n){n=MathJax.Hub.Insert({},this.defaultDef)}n.form=g[0];this.def=n}}this.useMMLspacing&=~(this.SPACE_ATTR[h]||0);if(n[h]!=null){return n[h]}else{if(!o){return this.defaultDef[h]}}return""},CheckRange:function(k){var l=k.charCodeAt(0);if(k.charAt(0)===a.PLANE1){l=k.charCodeAt(1)+119808-56320}for(var h=0,f=this.RANGES.length;h<f&&this.RANGES[h][0]<=l;h++){if(l<=this.RANGES[h][1]){if(this.RANGES[h][3]){var g=a.optableDir+"/"+this.RANGES[h][3]+".js";this.RANGES[h][3]=null;MathJax.Hub.RestartAfter(MathJax.Ajax.Require(g))}var j=(["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER"])[this.RANGES[h][2]];j=this.OPTABLE.infix[k]=a.mo.OPTYPES[j==="BIN"?"BIN3":j];return this.makeDef(j)}}return null},makeDef:function(g){if(g[2]==null){g[2]=this.defaultDef.texClass}if(!g[3]){g[3]={}}var f=MathJax.Hub.Insert({},g[3]);f.lspace=this.SPACE[g[0]];f.rspace=this.SPACE[g[1]];f.texClass=g[2];return f},getForm:function(){var f=this,h=this.parent,g=this.Parent();while(g&&g.isEmbellished()){f=h;h=g.parent;g=g.Parent()}if(h&&h.type==="mrow"&&h.NonSpaceLength()!==1){if(h.FirstNonSpace()===f){return a.FORM.PREFIX}if(h.LastNonSpace()===f){return a.FORM.POSTFIX}}return a.FORM.INFIX},isEmbellished:function(){return b},lineBreak:function(){var f=this.getValues("linebreak","linebreakstyle");if(f.linebreak===a.LINEBREAK.NEWLINE){if(f.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){f.linebreakstyle=this.Get("infixlinebreakstyle")}return f.linebreakstyle}return"none"},setTeXclass:function(f){this.getValues("lspace","rspace");if(this.useMMLspacing){this.texClass=a.TEXCLASS.NONE;return this}this.texClass=this.Get("texClass");if(f){this.prevClass=f.texClass||a.TEXCLASS.ORD;this.prevLevel=f.Get("scriptlevel")}else{this.prevClass=a.TEXCLASS.NONE}if(this.texClass===a.TEXCLASS.BIN&&(this.prevClass===a.TEXCLASS.NONE||this.prevClass===a.TEXCLASS.BIN||this.prevClass===a.TEXCLASS.OP||this.prevClass===a.TEXCLASS.REL||this.prevClass===a.TEXCLASS.OPEN||this.prevClass===a.TEXCLASS.PUNCT)){this.texClass=a.TEXCLASS.ORD}else{if(this.prevClass===a.TEXCLASS.BIN&&(this.texClass===a.TEXCLASS.REL||this.texClass===a.TEXCLASS.CLOSE||this.texClass===a.TEXCLASS.PUNCT)){f.texClass=this.prevClass=a.TEXCLASS.ORD}}return this}});a.mtext=a.mbase.Subclass({type:"mtext",isToken:b,isSpacelike:function(){return b},texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT}});a.mspace=a.mbase.Subclass({type:"mspace",isToken:b,isSpacelike:function(){return b},defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,width:"0em",height:"0ex",depth:"0ex",linebreak:a.LINEBREAK.AUTO},lineBreak:function(){return(this.Get("linebreak")===a.LINEBREAK.NEWLINE?a.LINEBREAKSTYLE.AFTER:"none")}});a.ms=a.mbase.Subclass({type:"ms",isToken:b,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,lquote:'"',rquote:'"'}});a.mglyph=a.mbase.Subclass({type:"mglyph",isToken:b,texClass:a.TEXCLASS.ORD,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,alt:"",src:"",width:a.AUTO,height:a.AUTO,valign:"0em"}});a.mrow=a.mbase.Subclass({type:"mrow",isSpacelike:a.mbase.childrenSpacelike,inferred:d,isEmbellished:function(){var g=d;for(var h=0,f=this.data.length;h<f;h++){if(this.data[h]==null){continue}if(this.data[h].isEmbellished()){if(g){return d}g=b;this.core=h}else{if(!this.data[h].isSpacelike()){return d}}}return g},NonSpaceLength:function(){var h=0;for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]&&!this.data[g].isSpacelike()){h++}}return h},FirstNonSpace:function(){for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]&&!this.data[g].isSpacelike()){return this.data[g]}}return null},LastNonSpace:function(){for(var f=this.data.length-1;f>=0;f--){if(this.data[0]&&!this.data[f].isSpacelike()){return this.data[f]}}return null},Core:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core]},CoreMO:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core].CoreMO()},toString:function(){if(this.inferred){return"["+this.data.join(",")+"]"}return this.SUPER(arguments).toString.call(this)},setTeXclass:function(h){for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]){h=this.data[g].setTeXclass(h)}}if(this.data[0]){this.updateTeXclass(this.data[0])}return h}});a.mfrac=a.mbase.Subclass({type:"mfrac",num:0,den:1,texClass:a.TEXCLASS.INNER,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,linethickness:a.LINETHICKNESS.MEDIUM,numalign:a.ALIGN.CENTER,denomalign:a.ALIGN.CENTER,bevelled:d},adjustChild_displaystyle:function(f){return d},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");if(!this.Get("displaystyle")||f>0){f++}return f},adjustChild_texprimestyle:function(f){if(f==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:b,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(f){return b}});a.mroot=a.mbase.Subclass({type:"mroot",texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(f){if(f===1){return d}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");if(g===1){f+=2}return f},adjustChild_texprimestyle:function(f){if(f===0){return b}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.mstyle=a.mbase.Subclass({type:"mstyle",isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,inferRow:b,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(h){var g=this.scriptlevel;if(g==null){g=this.Get("scriptlevel")}else{if(String(g).match(/^ *[-+]/)){delete this.scriptlevel;var f=this.Get("scriptlevel");this.scriptlevel=g;g=f+parseInt(g)}}return g},inheritFromMe:b,noInherit:{mpadded:{width:b,height:b,depth:b,lspace:b,voffset:b},mtable:{width:b,height:b,depth:b,align:b}},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:b,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:b,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,width:"",height:"",depth:"",lspace:0,voffset:0},setTeXclass:a.mbase.setChildTeXclass});a.mphantom=a.mbase.Subclass({type:"mphantom",texClass:a.TEXCLASS.ORD,inferRow:b,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,setTeXclass:a.mbase.setChildTeXclass});a.mfenced=a.mbase.Subclass({type:"mfenced",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,open:"(",close:")",separators:","},texClass:a.TEXCLASS.OPEN,setTeXclass:function(j){this.getPrevClass(j);var g=this.getValues("open","close","separators");g.open=g.open.replace(/[ \t\n\r]/g,"");g.close=g.close.replace(/[ \t\n\r]/g,"");g.separators=g.separators.replace(/[ \t\n\r]/g,"");if(g.open!==""){this.SetData("open",a.mo(g.open).With({stretchy:true,texClass:a.TEXCLASS.OPEN}));j=this.data.open.setTeXclass(j)}if(g.separators!==""){while(g.separators.length<this.data.length){g.separators+=g.separators.charAt(g.separators.length-1)}}if(this.data[0]){j=this.data[0].setTeXclass(j)}for(var h=1,f=this.data.length;h<f;h++){if(this.data[h]){if(g.separators!==""){this.SetData("sep"+h,a.mo(g.separators.charAt(h-1)));j=this.data["sep"+h].setTeXclass(j)}j=this.data[h].setTeXclass(j)}}if(g.close!==""){this.SetData("close",a.mo(g.close).With({stretchy:true,texClass:a.TEXCLASS.CLOSE}));j=this.data.close.setTeXclass(j)}this.updateTeXclass(this.data.open);return j}});a.menclose=a.mbase.Subclass({type:"menclose",inferRow:b,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,notation:a.NOTATION.LONGDIV,texClass:a.TEXCLASS.ORD},setTeXclass:a.mbase.setSeparateTeXclasses});a.msubsup=a.mbase.Subclass({type:"msubsup",base:0,sub:1,sup:2,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,subscriptshift:"",superscriptshift:"",texClass:a.AUTO},autoDefault:function(f){if(f==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(f):a.TEXCLASS.ORD)}return 0},adjustChild_displaystyle:function(f){if(f>0){return d}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");if(g>0){f++}return f},adjustChild_texprimestyle:function(f){if(f===this.sub){return b}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.msub=a.msubsup.Subclass({type:"msub"});a.msup=a.msubsup.Subclass({type:"msup",sub:2,sup:1});a.mmultiscripts=a.msubsup.Subclass({type:"mmultiscripts",adjustChild_texprimestyle:function(f){if(f%2===1){return b}return this.Get("texprimestyle")}});a.mprescripts=a.mbase.Subclass({type:"mprescripts"});a.none=a.mbase.Subclass({type:"none"});a.munderover=a.mbase.Subclass({type:"munderover",base:0,under:1,over:2,sub:1,sup:2,ACCENTS:["","accentunder","accent"],isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,accent:a.AUTO,accentunder:a.AUTO,align:a.ALIGN.CENTER,texClass:a.AUTO,subscriptshift:"",superscriptshift:""},autoDefault:function(f){if(f==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(f):a.TEXCLASS.ORD)}if(f==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(f==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return d},adjustChild_displaystyle:function(f){if(f>0){return d}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");if(g==this.under&&!this.Get("accentunder")){f++}if(g==this.over&&!this.Get("accent")){f++}return f},adjustChild_texprimestyle:function(f){if(f===this.base&&this.data[this.over]){return b}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.munder=a.munderover.Subclass({type:"munder"});a.mover=a.munderover.Subclass({type:"mover",over:1,under:2,sup:1,sub:2,ACCENTS:["","accent","accentunder"]});a.mtable=a.mbase.Subclass({type:"mtable",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,align:a.ALIGN.AXIS,rowalign:a.ALIGN.BASELINE,columnalign:a.ALIGN.CENTER,groupalign:"{left}",alignmentscope:b,columnwidth:a.WIDTH.AUTO,width:a.WIDTH.AUTO,rowspacing:"1ex",columnspacing:".8em",rowlines:a.LINES.NONE,columnlines:a.LINES.NONE,frame:a.LINES.NONE,framespacing:"0.4em 0.5ex",equalrows:d,equalcolumns:d,displaystyle:d,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},inheritFromMe:b,noInherit:{mtable:{align:b,rowalign:b,columnalign:b,groupalign:b,alignmentscope:b,columnwidth:b,width:b,rowspacing:b,columnspacing:b,rowlines:b,columnlines:b,frame:b,framespacing:b,equalrows:b,equalcolumns:b,side:b,minlabelspacing:b,texClass:b,useHeight:1}},Append:function(){for(var g=0,f=arguments.length;g<f;g++){if(!((arguments[g] instanceof a.mtr)||(arguments[g] instanceof a.mlabeledtr))){arguments[g]=a.mtd(arguments[g])}}this.SUPER(arguments).Append.apply(this,arguments)},setTeXclass:a.mbase.setSeparateTeXclasses});a.mtr=a.mbase.Subclass({type:"mtr",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,rowalign:a.INHERIT,columnalign:a.INHERIT,groupalign:a.INHERIT},inheritFromMe:b,noInherit:{mrow:{rowalign:b,columnalign:b,groupalign:b},mtable:{rowalign:b,columnalign:b,groupalign:b}},Append:function(){for(var g=0,f=arguments.length;g<f;g++){if(!(arguments[g] instanceof a.mtd)){arguments[g]=a.mtd(arguments[g])}}this.SUPER(arguments).Append.apply(this,arguments)},setTeXclass:a.mbase.setSeparateTeXclasses});a.mtd=a.mbase.Subclass({type:"mtd",inferRow:b,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,rowspan:1,columnspan:1,rowalign:a.INHERIT,columnalign:a.INHERIT,groupalign:a.INHERIT},setTeXclass:a.mbase.setSeparateTeXclasses});a.maligngroup=a.mbase.Subclass({type:"malign",isSpacelike:function(){return b},defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,groupalign:a.INHERIT},inheritFromMe:b,noInherit:{mrow:{groupalign:b},mtable:{groupalign:b}}});a.malignmark=a.mbase.Subclass({type:"malignmark",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,edge:a.SIDE.LEFT},isSpacelike:function(){return b}});a.mlabeledtr=a.mtr.Subclass({type:"mlabeledtr"});a.maction=a.mbase.Subclass({type:"maction",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,actiontype:a.ACTIONTYPE.TOGGLE,selection:1},selected:function(){return this.data[this.Get("selection")-1]||a.NULL},isEmbellished:function(){return this.selected().isEmbellished()},isSpacelike:function(){return this.selected().isSpacelike()},Core:function(){return this.selected().Core()},CoreMO:function(){return this.selected().CoreMO()},setTeXclass:function(f){return this.selected().setTeXclass(f)}});a.semantics=a.mbase.Subclass({type:"semantics",isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{definitionURL:null,encoding:null},setTeXclass:a.mbase.setChildTeXclass});a.annotation=a.mbase.Subclass({type:"annotation",isToken:b,defaults:{definitionURL:null,encoding:null,cd:"mathmlkeys",name:"",src:null}});a["annotation-xml"]=a.mbase.Subclass({type:"annotation-xml",defaults:{definitionURL:null,encoding:null,cd:"mathmlkeys",name:"",src:null}});a.math=a.mstyle.Subclass({type:"math",defaults:{mathvariant:a.VARIANT.NORMAL,mathsize:a.SIZE.NORMAL,mathcolor:"",mathbackground:a.COLOR.TRANSPARENT,scriptlevel:0,displaystyle:a.AUTO,display:"inline",maxwidth:"",overflow:a.OVERFLOW.LINEBREAK,altimg:"","altimg-width":"","altimg-height":"","altimg-valign":"",alttext:"",cdgroup:"",scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8px",infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,lineleading:"1ex",indentshift:"auto",indentalign:a.INDENTALIGN.AUTO,indentalignfirst:a.INDENTALIGN.INDENTALIGN,indentshiftfirst:a.INDENTSHIFT.INDENTSHIFT,decimalseparator:".",texprimestyle:d},autoDefault:function(f){if(f==="displaystyle"){return this.Get("display")==="block"}return""},setTeXclass:a.mbase.setChildTeXclass});a.chars=a.mbase.Subclass({type:"chars",Append:function(){this.data.push.apply(this.data,arguments)},value:function(){return this.data.join("")},toString:function(){return this.data.join("")}});a.entity=a.mbase.Subclass({type:"entity",Append:function(){this.data.push.apply(this.data,arguments)},value:function(){if(this.data[0].substr(0,2)==="#x"){return parseInt(this.data[0].substr(2),16)}else{if(this.data[0].substr(0,1)==="#"){return parseInt(this.data[0].substr(1))}else{return 0}}},toString:function(){var f=this.value();if(f<=65535){return String.fromCharCode(f)}return this.PLANE1+String.fromCharCode(f-119808+56320)}});a.xml=a.mbase.Subclass({type:"xml",Init:function(){this.div=document.createElement("div");return this.SUPER(arguments).Init.apply(this,arguments)},Append:function(){for(var g=0,f=arguments.length;g<f;g++){var h=this.Import(arguments[g]);this.data.push(h);this.div.appendChild(h)}},Import:function(k){if(document.importNode){return document.importNode(k,true)}var g,h,f;if(k.nodeType===1){g=document.createElement(k.nodeName);if(k.className){g.className=iNode.className}for(h=0,f=k.attributes.length;h<f;h++){var j=k.attributes[h];if(j.specified&&j.nodeValue!=null&&j.nodeValue!=""){g.setAttribute(j.nodeName,j.nodeValue)}if(j.nodeName==="style"){g.style.cssText=j.nodeValue}}if(k.className){g.className=k.className}}else{if(k.nodeType===3||k.nodeType===4){g=document.createTextNode(k.nodeValue)}else{if(k.nodeType===8){g=document.createComment(k.nodeValue)}else{return document.createTextNode("")}}}for(h=0,f=k.childNodes.length;h<f;h++){g.appendChild(this.Import(k.childNodes[h]))}return g},value:function(){return this.div},toString:function(){return this.div.innerHTML}});a.TeXAtom=a.mbase.Subclass({type:"texatom",inferRow:b,texClass:a.TEXCLASS.ORD,setTeXclass:function(f){this.getPrevClass(f);this.data[0].setTeXclass();return this}});a.NULL=a.mbase().With({type:"null"});var c=a.TEXCLASS;var e={ORD:[0,0,c.ORD],ORD11:[1,1,c.ORD],ORD21:[2,1,c.ORD],ORD02:[0,2,c.ORD],ORD55:[5,5,c.ORD],OP:[1,2,c.OP,{largeop:true,movablelimits:true,symmetric:true}],OPFIXED:[1,2,c.OP,{largeop:true,movablelimits:true}],INTEGRAL:[0,1,c.OP,{largeop:true,symmetric:true}],INTEGRAL2:[1,2,c.OP,{largeop:true,symmetric:true}],BIN3:[3,3,c.BIN],BIN4:[4,4,c.BIN],BIN01:[0,1,c.BIN],TALLBIN:[4,4,c.BIN,{stretchy:true}],BINOP:[4,4,c.BIN,{largeop:true,movablelimits:true}],REL:[5,5,c.REL],REL1:[1,1,c.REL,{stretchy:true}],REL4:[4,4,c.REL],WIDEREL:[5,5,c.REL,{stretchy:true}],RELACCENT:[5,5,c.REL,{accent:true,stretchy:true}],OPEN:[0,0,c.OPEN,{fence:true,stretchy:true,symmetric:true}],CLOSE:[0,0,c.CLOSE,{fence:true,stretchy:true,symmetric:true}],INNER:[0,0,c.INNER],PUNCT:[0,3,c.PUNCT],ACCENT:[0,0,c.ORD,{accent:true}],WIDEACCENT:[0,0,c.ORD,{accent:true,stretchy:true}]};a.mo.Augment({SPACE:["0em","0.1111em","0.1667em","0.2222em","0.2667em","0.3333em"],RANGES:[[32,127,c.REL,"BasicLatin"],[160,255,c.ORD,"Latin1Supplement"],[256,383,c.ORD],[384,591,c.ORD],[688,767,c.ORD,"SpacingModLetters"],[768,879,c.ORD,"CombDiacritMarks"],[880,1023,c.ORD,"GreekAndCoptic"],[7680,7935,c.ORD],[8192,8303,c.PUNCT,"GeneralPunctuation"],[8304,8351,c.ORD],[8352,8399,c.ORD],[8400,8447,c.ORD,"CombDiactForSymbols"],[8448,8527,c.ORD,"LetterlikeSymbols"],[8528,8591,c.ORD],[8592,8703,c.REL,"Arrows"],[8704,8959,c.BIN,"MathOperators"],[8960,9215,c.ORD,"MiscTechnical"],[9312,9471,c.ORD],[9632,9727,c.ORD,"GeometricShapes"],[9984,10175,c.ORD,"Dingbats"],[10176,10223,c.ORD,"MiscMathSymbolsA"],[10496,10623,c.REL,"SupplementalArrowsB"],[10624,10751,c.ORD,"MiscMathSymbolsB"],[10752,11007,c.BIN,"SuppMathOperators"],[11008,11263,c.ORD],[119808,120831,c.ORD]],OPTABLE:{prefix:{"\u2111":e.ORD11,"\u2113":e.ORD11,"\u211C":e.ORD11,"\u2200":e.ORD21,"\u2202":e.ORD21,"\u2203":e.ORD21,"\u2207":e.ORD21,"\u220F":e.OP,"\u2210":e.OP,"\u2211":e.OP,"\u2212":e.BIN01,"\u2213":e.BIN01,"\u221A":[1,1,c.ORD,{stretchy:true}],"\u2220":e.ORD,"\u222B":e.INTEGRAL,"\u222E":e.INTEGRAL,"\u22C0":e.OP,"\u22C1":e.OP,"\u22C2":e.OP,"\u22C3":e.OP,"\u2308":e.OPEN,"\u230A":e.OPEN,"\u27E8":e.OPEN,"\u2A00":e.OP,"\u2A01":e.OP,"\u2A02":e.OP,"\u2A04":e.OP,"\u2A06":e.OP,"\u00AC":e.ORD21,"\u00B1":e.BIN01,"(":e.OPEN,"+":e.BIN01,"-":e.BIN01,"[":e.OPEN,"{":e.OPEN,"|":e.OPEN},postfix:{"!":[1,0,c.CLOSE],"&":e.ORD,"\u2032":e.ORD02,"\u203E":e.WIDEACCENT,"\u2309":e.CLOSE,"\u230B":e.CLOSE,"\u23DE":e.WIDEACCENT,"\u23DF":e.WIDEACCENT,"\u266D":e.ORD02,"\u266E":e.ORD02,"\u266F":e.ORD02,"\u27E9":e.CLOSE,"\u02C6":e.WIDEACCENT,"\u02C7":e.WIDEACCENT,"\u02D8":e.ACCENT,"\u02D9":e.ACCENT,"\u02DC":e.WIDEACCENT,"\u0302":e.ACCENT,"\u00A8":e.ACCENT,"\u00AF":e.WIDEACCENT,")":e.CLOSE,"]":e.CLOSE,"^":e.WIDEACCENT,_:e.WIDEACCENT,"`":e.ACCENT,"|":e.CLOSE,"}":e.CLOSE,"~":e.WIDEACCENT},infix:{"%":[3,3,c.ORD],"\u2022":e.BIN4,"\u2026":e.INNER,"\u2044":e.TALLBIN,"\u2061":e.ORD,"\u2062":e.ORD,"\u2063":[0,0,c.ORD,{separator:true}],"\u2064":e.ORD,"\u2190":e.RELACCENT,"\u2191":e.WIDEREL,"\u2192":e.RELACCENT,"\u2193":e.WIDEREL,"\u2194":e.RELACCENT,"\u2195":e.WIDEREL,"\u2196":e.WIDEREL,"\u2197":e.WIDEREL,"\u2198":e.WIDEREL,"\u2199":e.WIDEREL,"\u21A6":e.WIDEREL,"\u21A9":e.WIDEREL,"\u21AA":e.WIDEREL,"\u21BC":e.RELACCENT,"\u21BD":e.WIDEREL,"\u21C0":e.RELACCENT,"\u21C1":e.WIDEREL,"\u21CC":e.WIDEREL,"\u21D0":e.WIDEREL,"\u21D1":e.WIDEREL,"\u21D2":e.WIDEREL,"\u21D3":e.WIDEREL,"\u21D4":e.WIDEREL,"\u21D5":e.WIDEREL,"\u2208":e.REL,"\u2209":e.REL,"\u220B":e.REL,"\u2212":e.BIN4,"\u2213":e.BIN4,"\u2215":e.TALLBIN,"\u2216":e.BIN4,"\u2217":e.BIN4,"\u2218":e.BIN4,"\u2219":e.BIN4,"\u221D":e.REL,"\u2223":e.REL,"\u2225":e.REL,"\u2227":e.BIN4,"\u2228":e.BIN4,"\u2229":e.BIN4,"\u222A":e.BIN4,"\u223C":e.REL,"\u2240":e.BIN4,"\u2243":e.REL,"\u2245":e.REL,"\u2248":e.REL,"\u224D":e.REL,"\u2250":e.REL,"\u2260":e.REL,"\u2261":e.REL,"\u2264":e.REL,"\u2265":e.REL,"\u226A":e.REL,"\u226B":e.REL,"\u227A":e.REL,"\u227B":e.REL,"\u2282":e.REL,"\u2283":e.REL,"\u2286":e.REL,"\u2287":e.REL,"\u228E":e.BIN4,"\u2291":e.REL,"\u2292":e.REL,"\u2293":e.BIN4,"\u2294":e.BIN4,"\u2295":e.BIN4,"\u2296":e.BIN4,"\u2297":e.BIN4,"\u2298":e.BIN4,"\u2299":e.BIN4,"\u22A2":e.REL,"\u22A3":e.REL,"\u22A4":e.ORD55,"\u22A5":e.REL,"\u22A8":e.REL,"\u22C4":e.BIN4,"\u22C5":e.BIN4,"\u22C6":e.BIN4,"\u22C8":e.REL,"\u22EE":e.ORD55,"\u22EF":e.INNER,"\u22F1":[5,5,c.INNER],"\u2500":[0,0,c.ORD,{stretchy:true}],"\u25B3":e.BIN4,"\u25B5":e.BIN4,"\u25B9":e.BIN4,"\u25BD":e.BIN4,"\u25BF":e.BIN4,"\u25C3":e.BIN4,"\u2758":[4,4,c.REL,{fence:true,stretchy:true,symmetric:true}],"\u27F5":e.REL1,"\u27F6":e.REL1,"\u27F7":e.REL1,"\u27F8":e.REL1,"\u27F9":e.REL1,"\u27FA":e.REL1,"\u2A2F":e.BIN4,"\u2A3F":e.BIN4,"\u2AAF":e.REL,"\u2AB0":e.REL,"\u00B1":e.BIN4,"\u00B7":e.BIN4,"\u00D7":e.BIN4,"\u00F7":e.BIN4,"*":e.BIN3,"+":e.BIN4,",":[0,3,c.PUNCT,{separator:true}],"-":e.BIN4,".":[3,3,c.ORD],"/":e.ORD11,":":[1,2,c.REL],";":[0,3,c.PUNCT,{separator:true}],"<":e.REL,"=":e.REL,">":e.REL,"?":[1,1,c.CLOSE],"\\":e.ORD,_:e.ORD11,"|":[2,2,c.ORD,{fence:true,stretchy:true,symmetric:true}],"#":e.ORD,"$":e.ORD,"\u002E":[0,3,c.PUNCT,{separator:true}],"\u02B9":e.ORD,"\u02C9":e.ACCENT,"\u02CA":e.ACCENT,"\u02CB":e.ACCENT,"\u0300":e.ACCENT,"\u0301":e.ACCENT,"\u0303":e.WIDEACCENT,"\u0304":e.ACCENT,"\u0306":e.ACCENT,"\u0307":e.ACCENT,"\u0308":e.ACCENT,"\u030C":e.ACCENT,"\u0332":e.WIDEACCENT,"\u0338":e.REL4,"\u2015":[0,0,c.ORD,{stretchy:true}],"\u2017":[0,0,c.ORD,{stretchy:true}],"\u2020":e.BIN3,"\u2021":e.BIN3,"\u20D7":e.ACCENT,"\u2118":e.ORD,"\u2205":e.ORD,"\u221E":e.ORD,"\u2305":e.BIN3,"\u2306":e.BIN3,"\u2322":e.REL4,"\u2323":e.REL4,"\u2329":e.OPEN,"\u232A":e.CLOSE,"\u23AA":e.ORD,"\u23AF":[0,0,c.ORD,{stretchy:true}],"\u23B0":e.OPEN,"\u23B1":e.CLOSE,"\u25EF":e.BIN3,"\u2660":e.ORD,"\u2661":e.ORD,"\u2662":e.ORD,"\u2663":e.ORD,"\u27EE":e.OPEN,"\u27EF":e.CLOSE,"\u27FC":e.REL4,"\u3008":e.OPEN,"\u3009":e.CLOSE,"\uFE37":e.WIDEACCENT,"\uFE38":e.WIDEACCENT}}},{OPTYPES:e})})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js");
|
|
|