# HG changeset patch # User Marcin Kuzminski # Date 2017-02-28 14:58:30 # Node ID 658ff334c6176b26dbc96b4bacd4513f849964e1 # Parent d29f4cdcae76b217ed51d39a1e1ae50767732d5c mathJax: added resources to enable rendering of math formulas. diff --git a/rhodecode/public/js/src/math_jax/MathJax.js b/rhodecode/public/js/src/math_jax/MathJax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/MathJax.js @@ -0,0 +1,19 @@ +/* + * /MathJax.js + * + * Copyright (c) 2009-2016 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. + */ + +if(document.getElementById&&document.childNodes&&document.createElement){if(!(window.MathJax&&MathJax.Hub)){if(window.MathJax){window.MathJax={AuthorConfig:window.MathJax}}else{window.MathJax={}}MathJax.isPacked=true;MathJax.version="2.7.0";MathJax.fileversion="2.7.0";MathJax.cdnVersion="2.7.0";MathJax.cdnFileVersions={};(function(d){var b=window[d];if(!b){b=window[d]={}}var e=[];var c=function(f){var g=f.constructor;if(!g){g=function(){}}for(var h in f){if(h!=="constructor"&&f.hasOwnProperty(h)){g[h]=f[h]}}return g};var a=function(){return function(){return arguments.callee.Init.call(this,arguments)}};b.Object=c({constructor:a(),Subclass:function(f,h){var g=a();g.SUPER=this;g.Init=this.Init;g.Subclass=this.Subclass;g.Augment=this.Augment;g.protoFunction=this.protoFunction;g.can=this.can;g.has=this.has;g.isa=this.isa;g.prototype=new this(e);g.prototype.constructor=g;g.Augment(f,h);return g},Init:function(f){var g=this;if(f.length===1&&f[0]===e){return g}if(!(g instanceof f.callee)){g=new f.callee(e)}return g.Init.apply(g,f)||g},Augment:function(f,g){var h;if(f!=null){for(h in f){if(f.hasOwnProperty(h)){this.protoFunction(h,f[h])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){this.protoFunction("toString",f.toString)}}if(g!=null){for(h in g){if(g.hasOwnProperty(h)){this[h]=g[h]}}}return this},protoFunction:function(g,f){this.prototype[g]=f;if(typeof f==="function"){f.SUPER=this.SUPER.prototype}},prototype:{Init:function(){},SUPER:function(f){return f.callee.SUPER},can:function(f){return typeof(this[f])==="function"},has:function(f){return typeof(this[f])!=="undefined"},isa:function(f){return(f instanceof Object)&&(this instanceof f)}},can:function(f){return this.prototype.can.call(this,f)},has:function(f){return this.prototype.has.call(this,f)},isa:function(g){var f=this;while(f){if(f===g){return true}else{f=f.SUPER}}return false},SimpleSUPER:c({constructor:function(f){return this.SimpleSUPER.define(f)},define:function(f){var h={};if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){h[g]=this.wrap(g,f[g])}}if(f.toString!==this.prototype.toString&&f.toString!=={}.toString){h.toString=this.wrap("toString",f.toString)}}return h},wrap:function(i,h){if(typeof(h)!=="function"||!h.toString().match(/\.\s*SUPER\s*\(/)){return h}var g=function(){this.SUPER=g.SUPER[i];try{var f=h.apply(this,arguments)}catch(j){delete this.SUPER;throw j}delete this.SUPER;return f};g.toString=function(){return h.toString.apply(h,arguments)};return g}})});b.Object.isArray=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"};b.Object.Array=Array})("MathJax");(function(BASENAME){var BASE=window[BASENAME];if(!BASE){BASE=window[BASENAME]={}}var isArray=BASE.Object.isArray;var CALLBACK=function(data){var cb=function(){return arguments.callee.execute.apply(arguments.callee,arguments)};for(var id in CALLBACK.prototype){if(CALLBACK.prototype.hasOwnProperty(id)){if(typeof(data[id])!=="undefined"){cb[id]=data[id]}else{cb[id]=CALLBACK.prototype[id]}}}cb.toString=CALLBACK.prototype.toString;return cb};CALLBACK.prototype={isCallback:true,hook:function(){},data:[],object:window,execute:function(){if(!this.called||this.autoReset){this.called=!this.autoReset;return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))}},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var ISCALLBACK=function(f){return(typeof(f)==="function"&&f.isCallback)};var EVAL=function(code){return eval.call(window,code)};var TESTEVAL=function(){EVAL("var __TeSt_VaR__ = 1");if(window.__TeSt_VaR__){try{delete window.__TeSt_VaR__}catch(error){window.__TeSt_VaR__=null}}else{if(window.execScript){EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";window.execScript(code);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}else{EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";var head=(document.getElementsByTagName("head"))[0];if(!head){head=document.body}var script=document.createElement("script");script.appendChild(document.createTextNode(code));head.appendChild(script);head.removeChild(script);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}}TESTEVAL=null};var USING=function(args,i){if(arguments.length>1){if(arguments.length===2&&!(typeof arguments[0]==="function")&&arguments[0] instanceof Object&&typeof arguments[1]==="number"){args=[].slice.call(args,i)}else{args=[].slice.call(arguments,0)}}if(isArray(args)&&args.length===1){args=args[0]}if(typeof args==="function"){if(args.execute===CALLBACK.prototype.execute){return args}return CALLBACK({hook:args})}else{if(isArray(args)){if(typeof(args[0])==="string"&&args[1] instanceof Object&&typeof args[1][args[0]]==="function"){return CALLBACK({hook:args[1][args[0]],object:args[1],data:args.slice(2)})}else{if(typeof args[0]==="function"){return CALLBACK({hook:args[0],data:args.slice(1)})}else{if(typeof args[1]==="function"){return CALLBACK({hook:args[1],object:args[0],data:args.slice(2)})}}}}else{if(typeof(args)==="string"){if(TESTEVAL){TESTEVAL()}return CALLBACK({hook:EVAL,data:[args]})}else{if(args instanceof Object){return CALLBACK(args)}else{if(typeof(args)==="undefined"){return CALLBACK({})}}}}}throw Error("Can't make callback from given data")};var DELAY=function(time,callback){callback=USING(callback);callback.timeout=setTimeout(callback,time);return callback};var WAITFOR=function(callback,signal){callback=USING(callback);if(!callback.called){WAITSIGNAL(callback,signal);signal.pending++}};var WAITEXECUTE=function(){var signals=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var result=this.execute.apply(this,arguments);if(ISCALLBACK(result)&&!result.called){WAITSIGNAL(result,signals)}else{for(var i=0,m=signals.length;i0&&priority=0;i--){this.hooks.splice(i,1)}this.remove=[]}});var EXECUTEHOOKS=function(hooks,data,reset){if(!hooks){return null}if(!isArray(hooks)){hooks=[hooks]}if(!isArray(data)){data=(data==null?[]:[data])}var handler=HOOKS(reset);for(var i=0,m=hooks.length;ig){g=document.styleSheets.length}if(!i){i=document.head||((document.getElementsByTagName("head"))[0]);if(!i){i=document.body}}return i};var f=[];var c=function(){for(var k=0,j=f.length;k=this.timeout){i(this.STATUS.ERROR);return 1}return 0},file:function(j,i){if(i<0){a.Ajax.loadTimeout(j)}else{a.Ajax.loadComplete(j)}},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(i,j,k){if(i.time(k)){return}if(document.styleSheets.length>j&&document.styleSheets[j].cssRules&&document.styleSheets[j].cssRules.length){k(i.STATUS.OK)}else{setTimeout(i,i.delay)}},checkLength:function(i,l,n){if(i.time(n)){return}var m=0;var j=(l.sheet||l.styleSheet);try{if((j.cssRules||j.rules||[]).length>0){m=1}}catch(k){if(k.message.match(/protected variable|restricted URI/)){m=1}else{if(k.message.match(/Security error/)){m=1}}}if(m){setTimeout(a.Callback([n,i.STATUS.OK]),0)}else{setTimeout(i,i.delay)}}},loadComplete:function(i){i=this.fileURL(i);var j=this.loading[i];if(j&&!j.preloaded){a.Message.Clear(j.message);clearTimeout(j.timeout);if(j.script){if(f.length===0){setTimeout(c,0)}f.push(j.script)}this.loaded[i]=j.status;delete this.loading[i];this.addHook(i,j.callback)}else{if(j){delete this.loading[i]}this.loaded[i]=this.STATUS.OK;j={status:this.STATUS.OK}}if(!this.loadHooks[i]){return null}return this.loadHooks[i].Execute(j.status)},loadTimeout:function(i){if(this.loading[i].timeout){clearTimeout(this.loading[i].timeout)}this.loading[i].status=this.STATUS.ERROR;this.loadError(i);this.loadComplete(i)},loadError:function(i){a.Message.Set(["LoadFailed","File failed to load: %1",i],null,2000);a.Hub.signal.Post(["file load error",i])},Styles:function(k,l){var i=this.StyleString(k);if(i===""){l=a.Callback(l);l()}else{var j=document.createElement("style");j.type="text/css";this.head=h(this.head);this.head.appendChild(j);if(j.styleSheet&&typeof(j.styleSheet.cssText)!=="undefined"){j.styleSheet.cssText=i}else{j.appendChild(document.createTextNode(i))}l=this.timer.create.call(this,l,j)}return l},StyleString:function(n){if(typeof(n)==="string"){return n}var k="",o,m;for(o in n){if(n.hasOwnProperty(o)){if(typeof n[o]==="string"){k+=o+" {"+n[o]+"}\n"}else{if(a.Object.isArray(n[o])){for(var l=0;l="0"&&q<="9"){f[j]=p[f[j]-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{if(q==="{"){q=f[j].substr(1);if(q>="0"&&q<="9"){f[j]=p[f[j].substr(1,f[j].length-2)-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{var k=f[j].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(k){if(k[1]==="plural"){var d=p[k[2]-1];if(typeof d==="undefined"){f[j]="???"}else{d=this.plural(d)-1;var h=k[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/);if(d>=0&&d=3){c.push([f[0],f[1],this.processSnippet(g,f[2])])}else{c.push(e[d])}}}}else{c.push(e[d])}}return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(b,h,d){var j=[],e;var c=b.split(this.markdownPattern);var g=c[0];for(var f=1,a=c.length;f1?d[1]:""));f=null}if(e&&(!b.preJax||d)){c.nodeValue=c.nodeValue.replace(b.postJax,(e.length>1?e[1]:""))}if(f&&!f.nodeValue.match(/\S/)){f=f.previousSibling}}if(b.preRemoveClass&&f&&f.className===b.preRemoveClass){a.MathJax.preview=f}a.MathJax.checked=1},processInput:function(a){var b,i=MathJax.ElementJax.STATE;var h,e,d=a.scripts.length;try{while(a.ithis.processUpdateTime&&a.i1){d.jax[a.outputJax].push(b)}b.MathJax.state=c.OUTPUT},prepareOutput:function(c,f){while(c.jthis.processUpdateTime&&h.i=0;q--){if((b[q].src||"").match(f)){s.script=b[q].innerHTML;if(RegExp.$2){var t=RegExp.$2.substr(1).split(/\&/);for(var p=0,l=t.length;p=parseInt(y[z])}}return true},Select:function(j){var i=j[d.Browser];if(i){return i(d.Browser)}return null}};var e=k.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");d.Browser=d.Insert(d.Insert(new String("Unknown"),{version:"0.0"}),a);for(var v in a){if(a.hasOwnProperty(v)){if(a[v]&&v.substr(0,2)==="is"){v=v.slice(2);if(v==="Mac"||v==="PC"){continue}d.Browser=d.Insert(new String(v),a);var r=new RegExp(".*(Version/| Trident/.*; rv:)((?:\\d+\\.)+\\d+)|.*("+v+")"+(v=="MSIE"?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)");var u=r.exec(e)||["","","","unknown","0.0"];d.Browser.name=(u[1]!=""?v:(u[3]||u[5]));d.Browser.version=u[2]||u[4]||u[6];break}}}try{d.Browser.Select({Safari:function(j){var i=parseInt((String(j.version).split("."))[0]);if(i>85){j.webkit=j.version}if(i>=538){j.version="8.0"}else{if(i>=537){j.version="7.0"}else{if(i>=536){j.version="6.0"}else{if(i>=534){j.version="5.1"}else{if(i>=533){j.version="5.0"}else{if(i>=526){j.version="4.0"}else{if(i>=525){j.version="3.1"}else{if(i>500){j.version="3.0"}else{if(i>400){j.version="2.0"}else{if(i>85){j.version="1.0"}}}}}}}}}}j.webkit=(navigator.appVersion.match(/WebKit\/(\d+)\./))[1];j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);j.noContextMenu=j.isMobile},Firefox:function(j){if((j.version==="0.0"||k.match(/Firefox/)==null)&&navigator.product==="Gecko"){var m=k.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(m){j.version=m[1]}else{var i=(navigator.buildID||navigator.productSub||"0").substr(0,8);if(i>="20111220"){j.version="9.0"}else{if(i>="20111120"){j.version="8.0"}else{if(i>="20110927"){j.version="7.0"}else{if(i>="20110816"){j.version="6.0"}else{if(i>="20110621"){j.version="5.0"}else{if(i>="20110320"){j.version="4.0"}else{if(i>="20100121"){j.version="3.6"}else{if(i>="20090630"){j.version="3.5"}else{if(i>="20080617"){j.version="3.0"}else{if(i>="20061024"){j.version="2.0"}}}}}}}}}}}}j.isMobile=(navigator.appVersion.match(/Android/i)!=null||k.match(/ Fennec\//)!=null||k.match(/Mobile/)!=null)},Chrome:function(i){i.noContextMenu=i.isMobile=!!navigator.userAgent.match(/ Mobile[ \/]/)},Opera:function(i){i.version=opera.version()},Edge:function(i){i.isMobile=!!navigator.userAgent.match(/ Phone/)},MSIE:function(j){j.isMobile=!!navigator.userAgent.match(/ Phone/);j.isIE9=!!(document.documentMode&&(window.performance||window.msPerformance));MathJax.HTML.setScriptBug=!j.isIE9||document.documentMode<9;MathJax.Hub.msieHTMLCollectionBug=(document.documentMode<9);if(document.documentMode<10&&!s.params.NoMathPlayer){try{new ActiveXObject("MathPlayer.Factory.1");j.hasMathPlayer=true}catch(m){}try{if(j.hasMathPlayer){var i=document.createElement("object");i.id="mathplayer";i.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";g.appendChild(i);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");j.mpNamespace=true;if(document.readyState&&(document.readyState==="loading"||document.readyState==="interactive")){document.write('');j.mpImported=true}}else{document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}}catch(m){}}}})}catch(c){console.error(c.message)}d.Browser.Select(MathJax.Message.browsers);if(h.AuthorConfig&&typeof h.AuthorConfig.AuthorInit==="function"){h.AuthorConfig.AuthorInit()}d.queue=h.Callback.Queue();d.queue.Push(["Post",s.signal,"Begin"],["Config",s],["Cookie",s],["Styles",s],["Message",s],function(){var i=h.Callback.Queue(s.Jax(),s.Extensions());return i.Push({})},["Menu",s],s.onLoad(),function(){MathJax.isReady=true},["Typeset",s],["Hash",s],["MenuZoom",s],["Post",s.signal,"End"])})("MathJax")}}; diff --git a/rhodecode/public/js/src/math_jax/config/Safe.js b/rhodecode/public/js/src/math_jax/config/Safe.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/config/Safe.js @@ -0,0 +1,19 @@ +/* + * /MathJax/config/Safe.js + * + * Copyright (c) 2009-2016 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.StartupHook("End Config",function(){if(!MathJax.Hub.config.extensions){MathJax.Hub.config.extensions=[]}MathJax.Hub.config.extensions.push("Safe.js")});MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js"); diff --git a/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML-full.js b/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML-full.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML-full.js @@ -0,0 +1,60 @@ +/* + * /MathJax/config/TeX-AMS_HTML-full.js + * + * Copyright (c) 2010-2016 The MathJax Consortium + * + * 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.Ajax.Preloading( + "[MathJax]/jax/input/TeX/config.js", + "[MathJax]/jax/output/HTML-CSS/config.js", + "[MathJax]/jax/output/PreviewHTML/config.js", + "[MathJax]/extensions/tex2jax.js", + "[MathJax]/extensions/MathEvents.js", + "[MathJax]/extensions/MathZoom.js", + "[MathJax]/extensions/MathMenu.js", + "[MathJax]/jax/element/mml/jax.js", + "[MathJax]/extensions/toMathML.js", + "[MathJax]/extensions/TeX/noErrors.js", + "[MathJax]/extensions/TeX/noUndefined.js", + "[MathJax]/jax/input/TeX/jax.js", + "[MathJax]/extensions/TeX/AMSmath.js", + "[MathJax]/extensions/TeX/AMSsymbols.js", + "[MathJax]/jax/output/HTML-CSS/jax.js", + "[MathJax]/jax/output/HTML-CSS/autoload/mtable.js", + "[MathJax]/jax/output/PreviewHTML/jax.js", + "[MathJax]/extensions/fast-preview.js", + "[MathJax]/extensions/AssistiveMML.js" +); + +MathJax.Hub.Config({ + extensions: ['[Contrib]/a11y/accessibility-menu.js'] +}); + +MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.0",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(b,a){return a+"#"+escape(b)},useLabelIds:true}},resetEquationNumbers:function(){}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); +MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.7.0",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px","z-index":401}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.lastt){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); +(function(f,o,q,e,r){var p="2.7.0";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var j=(a?null:"5px");var s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},"#MathJax_About.MathJax_MousePost":{outline:"none"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(a?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":j,"-webkit-border-radius":j,"-moz-border-radius":j,"-khtml-border-radius":j,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(a?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em","padding-top":".25em",color:"#666666","font-family":(l?"'Arial unicode MS'":null),"font-size":".75em"},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(a?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(a?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(a?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(a?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(a?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(a?"Highlight":"#606872"),color:(a?"HighlightText":"white")},".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus":{"background-color":"#E8E8E8"},".MathJax_ContextMenu:focus":{outline:"none"},".MathJax_ContextMenu .MathJax_MenuItem:focus":{outline:"none"},"#MathJax_AboutClose":{top:".2em",right:".2em"},".MathJax_Menu .MathJax_MenuClose":{top:"-10px",left:"-10px"},".MathJax_MenuClose":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","font-family":"'Courier New',Courier","font-size":"24px",color:"#F0F0F0"},".MathJax_MenuClose span":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","line-height":0,padding:"8px 0 6px"},".MathJax_MenuClose:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_MenuClose:hover span":{"background-color":"#CCC!important"},".MathJax_MenuClose:hover:focus":{outline:"none"}}});var n,k,b;f.Register.StartupHook("MathEvents Ready",function(){n=MathJax.Extension.MathEvents.Event.False;k=MathJax.Extension.MathEvents.Hover;b=MathJax.Extension.MathEvents.Event.KEY});var h=MathJax.Object.Subclass({Keydown:function(u,v){switch(u.keyCode){case b.ESCAPE:this.Remove(u,v);break;case b.RIGHT:this.Right(u,v);break;case b.LEFT:this.Left(u,v);break;case b.UP:this.Up(u,v);break;case b.DOWN:this.Down(u,v);break;case b.RETURN:case b.SPACE:this.Space(u,v);break;default:return;break}return n(u)},Escape:function(u,v){},Right:function(u,v){},Left:function(u,v){},Up:function(u,v){},Down:function(u,v){},Space:function(u,v){}},{});var g=MathJax.Menu=h.Subclass({version:p,items:[],posted:false,title:null,margin:5,Init:function(u){this.items=[].slice.call(arguments,0)},With:function(u){if(u){f.Insert(this,u)}return this},Post:function(M,E,B){if(!M){M=window.event||{}}var I=document.getElementById("MathJax_MenuFrame");if(!I){I=g.Background(this);delete c.lastItem;delete c.lastMenu;delete g.skipUp;d.Post(["post",g.jax]);g.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var v=o.Element("div",{onmouseup:g.Mouseup,ondblclick:n,ondragstart:n,onselectstart:n,oncontextmenu:n,menuItem:this,className:"MathJax_Menu",onkeydown:g.Keydown,role:"menu"});if(M.type==="contextmenu"||M.type==="mouseover"){v.className+=" MathJax_ContextMenu"}if(!B){MathJax.Localization.setCSS(v)}for(var N=0,K=this.items.length;NA-this.margin){H=A-v.offsetWidth-this.margin}if(g.isMobile){H=Math.max(5,H-Math.floor(v.offsetWidth/2));F-=20}g.skipUp=M.isContextMenu}else{var z="left",J=E.offsetWidth;H=(g.isMobile?30:J-2);F=0;while(E&&E!==I){H+=E.offsetLeft;F+=E.offsetTop;E=E.parentNode}if(!g.isMobile){if((g.isRTL&&H-J-v.offsetWidth>this.margin)||(!g.isRTL&&H+v.offsetWidth>A-this.margin)){z="right";H=Math.max(this.margin,H-J-v.offsetWidth+6)}}if(!a){v.style["borderRadiusTop"+z]=0;v.style["WebkitBorderRadiusTop"+z]=0;v.style["MozBorderRadiusTop"+z]=0;v.style["KhtmlBorderRadiusTop"+z]=0}}v.style.left=H+"px";v.style.top=F+"px";if(document.selection&&document.selection.empty){document.selection.empty()}var G=window.pageXOffset||document.documentElement.scrollLeft;var D=window.pageYOffset||document.documentElement.scrollTop;g.Focus(v);if(M.type==="keydown"){g.skipMouseoverFromKey=true;setTimeout(function(){delete g.skipMouseoverFromKey},s.delay)}window.scrollTo(G,D);return n(M)},Remove:function(u,v){d.Post(["unpost",g.jax]);var w=document.getElementById("MathJax_MenuFrame");if(w){w.parentNode.removeChild(w);if(this.msieFixedPositionBug){detachEvent("onresize",g.Resize)}}if(g.jax.hover){delete g.jax.hover.nofade;k.UnHover(g.jax)}g.Unfocus(v);if(u.type==="mousedown"){g.CurrentNode().blur()}return n(u)},Find:function(u){return this.FindN(1,u,[].slice.call(arguments,1))},FindId:function(u){return this.FindN(0,u,[].slice.call(arguments,1))},FindN:function(y,v,x){for(var w=0,u=this.items.length;w0){u.oldTabIndex=u.tabIndex}u.tabIndex=-1}},SetTabIndex:function(){var v=g.AllNodes();for(var w=0,u;u=v[w];w++){if(u.oldTabIndex!==undefined){u.tabIndex=u.oldTabIndex;delete u.oldTabIndex}else{u.tabIndex=f.getTabOrder(u)}}},Mod:function(u,v){return((u%v)+v)%v},IndexOf:(Array.prototype.indexOf?function(u,v,w){return u.indexOf(v,w)}:function(u,x,y){for(var w=(y||0),v=u.length;w=0&&c.GetMenuNode(w).menuItem!==v[u].menuItem){v[u].menuItem.posted=false;v[u].parentNode.removeChild(v[u]);u--}},Touchstart:function(u,v){return this.TouchEvent(u,v,"Mousedown")},Touchend:function(u,v){return this.TouchEvent(u,v,"Mouseup")},TouchEvent:function(v,w,u){if(this!==c.lastItem){if(c.lastMenu){g.Event(v,c.lastMenu,"Mouseout")}g.Event(v,w,"Mouseover",true);c.lastItem=this;c.lastMenu=w}if(this.nativeTouch){return null}g.Event(v,w,u);return false},Remove:function(u,v){v=v.parentNode.menuItem;return v.Remove(u,v)},With:function(u){if(u){f.Insert(this,u)}return this},isRTL:function(){return g.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}},{GetMenuNode:function(u){return u.parentNode}});g.ENTRY=g.ITEM.Subclass({role:"menuitem",Attributes:function(u){u=f.Insert({onmouseover:g.Mouseover,onmouseout:g.Mouseout,onmousedown:g.Mousedown,onkeydown:g.Keydown,"aria-disabled":!!this.disabled},u);u=this.SUPER(arguments).Attributes.call(this,u);if(this.disabled){u.className+=" MathJax_MenuDisabled"}return u},MoveVertical:function(u,E,w){var x=c.GetMenuNode(E);var D=[];for(var z=0,C=x.menuItem.items,y;y=C[z];z++){if(!y.hidden){D.push(y)}}var B=g.IndexOf(D,this);if(B===-1){return}var A=D.length;var v=x.childNodes;do{B=g.Mod(w(B),A)}while(D[B].hidden||!v[B].role||v[B].role==="separator");this.Deactivate(E);D[B].Activate(u,v[B])},Up:function(v,u){this.MoveVertical(v,u,function(w){return w-1})},Down:function(v,u){this.MoveVertical(v,u,function(w){return w+1})},Right:function(v,u){this.MoveHorizontal(v,u,g.Right,!this.isRTL())},Left:function(v,u){this.MoveHorizontal(v,u,g.Left,this.isRTL())},MoveHorizontal:function(A,z,u,B){var x=c.GetMenuNode(z);if(x.menuItem===g.menu&&A.shiftKey){u(A,z)}if(B){return}if(x.menuItem!==g.menu){this.Deactivate(z)}var v=x.previousSibling.childNodes;var y=v.length;while(y--){var w=v[y];if(w.menuItem.submenu&&w.menuItem.submenu===x.menuItem){g.Focus(w);break}}this.RemoveSubmenus(z)},Space:function(u,v){this.Mouseup(u,v)},Activate:function(u,v){this.Deactivate(v);if(!this.disabled){v.className+=" MathJax_MenuActive"}this.DeactivateSubmenus(v);g.Focus(v)},Deactivate:function(u){u.className=u.className.replace(/ MathJax_MenuActive/,"")}});g.ITEM.COMMAND=g.ENTRY.Subclass({action:function(){},Init:function(u,w,v){if(!i(u)){u=[u,u]}this.name=u;this.action=w;this.With(v)},Label:function(u,v){return[this.Name()]},Mouseup:function(u,v){if(!this.disabled){this.Remove(u,v);d.Post(["command",this]);this.action.call(this,u)}return n(u)}});g.ITEM.SUBMENU=g.ENTRY.Subclass({submenu:null,marker:"\u25BA",markerRTL:"\u25C4",Attributes:function(u){u=f.Insert({"aria-haspopup":"true"},u);u=this.SUPER(arguments).Attributes.call(this,u);return u},Init:function(u,w){if(!i(u)){u=[u,u]}this.name=u;var v=1;if(!(w instanceof g.ITEM)){this.With(w),v++}this.submenu=g.apply(g,[].slice.call(arguments,v))},Label:function(u,v){this.submenu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(u,v){this.ClearTimer();u={type:u.type,clientX:u.clientX,clientY:u.clientY};this.timer=setTimeout(e(["Mouseup",this,u,v]),s.delay)},ClearTimer:function(){if(this.timer){clearTimeout(this.timer)}},Touchend:function(v,x){var w=this.submenu.posted;var u=this.SUPER(arguments).Touchend.apply(this,arguments);if(w){this.Deactivate(x);delete c.lastItem;delete c.lastMenu}return u},Mouseout:function(u,v){if(!this.submenu.posted){this.Deactivate(v)}this.ClearTimer()},Mouseover:function(u,v){this.Activate(u,v)},Mouseup:function(u,v){if(!this.disabled){if(!this.submenu.posted){this.ClearTimer();this.submenu.Post(u,v,this.ltr);g.Focus(v)}else{this.DeactivateSubmenus(v)}}return n(u)},Activate:function(u,v){if(!this.disabled){this.Deactivate(v);v.className+=" MathJax_MenuActive"}if(!this.submenu.posted){this.DeactivateSubmenus(v);if(!g.isMobile){this.Timer(u,v)}}g.Focus(v)},MoveVertical:function(w,v,u){this.ClearTimer();this.SUPER(arguments).MoveVertical.apply(this,arguments)},MoveHorizontal:function(w,y,v,x){if(!x){this.SUPER(arguments).MoveHorizontal.apply(this,arguments);return}if(this.disabled){return}if(!this.submenu.posted){this.Activate(w,y);return}var u=c.GetMenuNode(y).nextSibling.childNodes;if(u.length>0){this.submenu.items[0].Activate(w,u[0])}}});g.ITEM.RADIO=g.ENTRY.Subclass({variable:null,marker:(a?"\u25CF":"\u2713"),role:"menuitemradio",Attributes:function(v){var u=s.settings[this.variable]===this.value?"true":"false";v=f.Insert({"aria-checked":u},v);v=this.SUPER(arguments).Attributes.call(this,v);return v},Init:function(v,u,w){if(!i(v)){v=[v,v]}this.name=v;this.variable=u;this.With(w);if(this.value==null){this.value=this.name[0]}},Label:function(v,w){var u={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(s.settings[this.variable]!==this.value){u={style:{display:"none"}}}return[["span",u,[this.marker]]," "+this.Name()]},Mouseup:function(x,y){if(!this.disabled){var z=y.parentNode.childNodes;for(var v=0,u=z.length;v/g,">");var y=t("EqSource","MathJax Equation Source");if(g.isMobile){u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("
");u.document.write("");u.document.close()}else{u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("");u.document.close();var v=u.document.body.firstChild;setTimeout(function(){var B=(u.outerHeight-u.innerHeight)||30,A=(u.outerWidth-u.innerWidth)||30,w,E;A=Math.max(140,Math.min(Math.floor(0.5*screen.width),v.offsetWidth+A+25));B=Math.max(40,Math.min(Math.floor(0.5*screen.height),v.offsetHeight+B+25));if(g.prototype.msieHeightBug){B+=35}u.resizeTo(A,B);var D;try{D=x.screenX}catch(C){}if(x&&D!=null){w=Math.max(0,Math.min(x.screenX-Math.floor(A/2),screen.width-A-20));E=Math.max(0,Math.min(x.screenY-Math.floor(B/2),screen.height-B-20));u.moveTo(w,E)}},50)}};g.Scale=function(){var z=["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"],u=z.length,y=100,w,v;for(w=0;w7;g.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(v||!w),msieAboutBug:v,msieHeightBug:((document.documentMode||0)<9)});if(m){delete s.styles["#MathJax_About"].filter;delete s.styles[".MathJax_Menu"].filter}},Firefox:function(u){g.skipMouseover=u.isMobile&&u.versionAtLeast("6.0");g.skipMousedown=u.isMobile}});g.isMobile=f.Browser.isMobile;g.noContextMenu=f.Browser.noContextMenu;g.CreateLocaleMenu=function(){if(!g.menu){return}var z=g.menu.Find("Language").submenu,w=z.items;var v=[],B=MathJax.Localization.strings;for(var A in B){if(B.hasOwnProperty(A)){v.push(A)}}v=v.sort();z.items=[];for(var x=0,u=v.length;x0||this.Get("scriptlevel")>0)&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},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(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},childIndex:function(g){if(g==null){return}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir: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:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,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(g,n){var l=this.def;if(!l){if(g==="form"){this.useMMLspacing&=~this.SPACE_ATTR.form;return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}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(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);g=null;for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}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:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){var e=this.Get("scriptlevel",null,true);f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},getRemoved:{fontfamily:"fontFamily",fontweight:"fontWeight",fontstyle:"fontStyle",fontsize:"fontSize"},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,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:true,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:","},addFakeNodes:function(){var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}));this.data.open.useMMLspacing=0}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}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(e){if(e%2===1){return true}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"],linebreakContainer:true,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(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}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:true,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:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},adjustChild_displaystyle:function(){return(this.displaystyle!=null?this.displaystyle:this.defaults.displaystyle)},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,displaystyle:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+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 f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); +MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var c="2.7.0";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("")+""}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+""},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||!this.attr.xmlns)){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{">":">","<":"<","&":"&"}[i]});j.push(d+' '+l+"");j.push(d+" ")}return d+"<"+p+k+">\n"+j.join("\n")+"\n"+d+""}});a.msubsup.Augment({toMathML:function(j){var f=this.type;if(this.data[this.sup]==null){f="msub"}if(this.data[this.sub]==null){f="msup"}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+j+""}});a.munderover.Augment({toMathML:function(k){var f=this.type;var j=this.data[this.base];if(j&&j.isa(a.TeXAtom)&&j.movablelimits&&!j.Get("displaystyle")){type="msubsup";if(this.data[this.under]==null){f="msup"}if(this.data[this.over]==null){f="msub"}}else{if(this.data[this.under]==null){f="mover"}if(this.data[this.over]==null){f="munder"}}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+k+""}});a.TeXAtom.Augment({toMathML:function(e){var d=this.toMathMLattributes();if(!d&&this.data[0].data.length===1){return e.substr(2)+this.data[0].toMathML(e)}return e+"\n"+this.data[0].toMathML(e+" ")+"\n"+e+""}});a.chars.Augment({toMathML:function(d){return(d||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(d){return(d||"")+"&"+this.data[0]+";"}});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("[MathJax]/extensions/toMathML.js"); +(function(b,e){var d="2.7.0";var a=b.CombineConfig("TeX.noErrors",{disabled:false,multiLine:true,inlineDelimiters:["",""],style:{"font-size":"90%","text-align":"left",color:"black",padding:"1px 3px",border:"1px solid"}});var c="\u00A0";MathJax.Extension["TeX/noErrors"]={version:d,config:a};b.Register.StartupHook("TeX Jax Ready",function(){var f=MathJax.InputJax.TeX.formatError;MathJax.InputJax.TeX.Augment({formatError:function(j,i,k,g){if(a.disabled){return f.apply(this,arguments)}var h=j.message.replace(/\n.*/,"");b.signal.Post(["TeX Jax - parse error",h,i,k,g]);var m=a.inlineDelimiters;var l=(k||a.multiLine);if(!k){i=m[0]+i+m[1]}if(l){i=i.replace(/ /g,c)}else{i=i.replace(/\n/g," ")}return MathJax.ElementJax.mml.merror(i).With({isError:true,multiLine:l})}})});b.Register.StartupHook("HTML-CSS Jax Config",function(){b.Config({"HTML-CSS":{styles:{".MathJax .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("HTML-CSS Jax Ready",function(){var g=MathJax.ElementJax.mml;var h=MathJax.OutputJax["HTML-CSS"];var f=g.math.prototype.toHTML,i=g.merror.prototype.toHTML;g.math.Augment({toHTML:function(j,k){var l=this.data[0];if(l&&l.data[0]&&l.data[0].isError){j.style.fontSize="";j=this.HTMLcreateSpan(j);j.bbox=l.data[0].toHTML(j).bbox}else{j=f.apply(this,arguments)}return j}});g.merror.Augment({toHTML:function(p){if(!this.isError){return i.apply(this,arguments)}p=this.HTMLcreateSpan(p);p.className="noError";if(this.multiLine){p.style.display="inline-block"}var r=this.data[0].data[0].data.join("").split(/\n/);for(var o=0,l=r.length;o1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.apply(this,arguments)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.apply(this,arguments)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.apply(this,arguments)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.apply(this,arguments)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Register.StartupHook("PreviewHTML Jax Config",function(){b.Config({PreviewHTML:{styles:{".MathJax_PHTML .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("PreviewHTML Jax Ready",function(){var f=MathJax.ElementJax.mml;var h=MathJax.HTML;var g=f.merror.prototype.toPreviewHTML;f.merror.Augment({toPreviewHTML:function(l){if(!this.isError){return g.apply(this,arguments)}l=this.PHTMLcreateSpan(l);l.className="noError";if(this.multiLine){l.style.display="inline-block"}var n=this.data[0].data[0].data.join("").split(/\n/);for(var k=0,j=n.length;k1){var l=1.2*j/2;o.h=l+0.25;o.d=l-0.25;n.style.verticalAlign=g.Em(0.45-l)}else{o.h=1;o.d=0.2+2/g.em}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); +MathJax.Extension["TeX/noUndefined"]={version:"2.7.0",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); +(function(d,c,j){var i,h="\u00A0";var k=function(m){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var f=MathJax.Object.isArray;var e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var o,n,p,q;for(o=0,n=arguments.length;o":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:i.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2016",{texClass:i.TEXCLASS.ORD}],"\\|":["2016",{texClass:i.TEXCLASS.ORD}],"\\vert":["|",{texClass:i.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",i.VARIANT.NORMAL],mit:["SetFont",i.VARIANT.ITALIC],oldstyle:["SetFont",i.VARIANT.OLDSTYLE],cal:["SetFont",i.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",i.VARIANT.BOLD],bbFont:["SetFont",i.VARIANT.DOUBLESTRUCK],scr:["SetFont",i.VARIANT.SCRIPT],frak:["SetFont",i.VARIANT.FRAKTUR],sf:["SetFont",i.VARIANT.SANSSERIF],tt:["SetFont",i.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF",null,1],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",i.LENGTH.THINMATHSPACE],":":["Spacer",i.LENGTH.MEDIUMMATHSPACE],">":["Spacer",i.LENGTH.MEDIUMMATHSPACE],";":["Spacer",i.LENGTH.THICKMATHSPACE],"!":["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",i.LENGTH.THINMATHSPACE],negthinspace:["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",i.TEXCLASS.ORD,0.85],Big:["MakeBig",i.TEXCLASS.ORD,1.15],bigg:["MakeBig",i.TEXCLASS.ORD,1.45],Bigg:["MakeBig",i.TEXCLASS.ORD,1.75],bigl:["MakeBig",i.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",i.TEXCLASS.OPEN,1.15],biggl:["MakeBig",i.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",i.TEXCLASS.OPEN,1.75],bigr:["MakeBig",i.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",i.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",i.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",i.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",i.TEXCLASS.REL,0.85],Bigm:["MakeBig",i.TEXCLASS.REL,1.15],biggm:["MakeBig",i.TEXCLASS.REL,1.45],Biggm:["MakeBig",i.TEXCLASS.REL,1.75],mathord:["TeXAtom",i.TEXCLASS.ORD],mathop:["TeXAtom",i.TEXCLASS.OP],mathopen:["TeXAtom",i.TEXCLASS.OPEN],mathclose:["TeXAtom",i.TEXCLASS.CLOSE],mathbin:["TeXAtom",i.TEXCLASS.BIN],mathrel:["TeXAtom",i.TEXCLASS.REL],mathpunct:["TeXAtom",i.TEXCLASS.PUNCT],mathinner:["TeXAtom",i.TEXCLASS.INNER],vcenter:["TeXAtom",i.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var m=this.config.Macros;for(var n in m){if(m.hasOwnProperty(n)){if(typeof(m[n])==="string"){g.macros[n]=["Macro",m[n]]}else{g.macros[n]=["Macro"].concat(m[n])}g.macros[n].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(n,o){this.string=n;this.i=0;this.macroCount=0;var m;if(o){m={};for(var p in o){if(o.hasOwnProperty(p)){m[p]=o[p]}}}this.stack=d.Stack(m,!!o);this.Parse();this.Push(b.stop())},Parse:function(){var o,m;while(this.i=55296&&m<56320){o+=this.string.charAt(this.i++)}if(g.special[o]){this[g.special[o]](o)}else{if(g.letter.test(o)){this.Variable(o)}else{if(g.digit.test(o)){this.Number(o)}else{this.Other(o)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(m){return m},ControlSequence:function(p){var m=this.GetCS(),o=this.csFindMacro(m);if(o){if(!f(o)){o=[o]}var n=o[0];if(!(n instanceof Function)){n=this[n]}n.apply(this,[p+m].concat(o.slice(1)))}else{if(g.mathchar0mi[m]){this.csMathchar0mi(m,g.mathchar0mi[m])}else{if(g.mathchar0mo[m]){this.csMathchar0mo(m,g.mathchar0mo[m])}else{if(g.mathchar7[m]){this.csMathchar7(m,g.mathchar7[m])}else{if(g.delimiter["\\"+m]!=null){this.csDelimiter(m,g.delimiter["\\"+m])}else{this.csUndefined(p+m)}}}}}},csFindMacro:function(m){return g.macros[m]},csMathchar0mi:function(m,o){var n={mathvariant:i.VARIANT.ITALIC};if(f(o)){n=o[1];o=o[0]}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csMathchar0mo:function(m,o){var n={stretchy:false};if(f(o)){n=o[1];n.stretchy=false;o=o[0]}this.Push(this.mmlToken(i.mo(i.entity("#x"+o)).With(n)))},csMathchar7:function(m,o){var n={mathvariant:i.VARIANT.NORMAL};if(f(o)){n=o[1];o=o[0]}if(this.stack.env.font){n.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csDelimiter:function(m,o){var n={};if(f(o)){n=o[1];o=o[0]}if(o.length===4){o=i.entity("#x"+o)}else{o=i.chars(o)}this.Push(this.mmlToken(i.mo(o).With({fence:false,stretchy:false}).With(n)))},csUndefined:function(m){d.Error(["UndefinedControlSequence","Undefined control sequence %1",m])},Variable:function(n){var m={};if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.chars(n)).With(m)))},Number:function(p){var m,o=this.string.slice(this.i-1).match(g.number);if(o){m=i.mn(o[0].replace(/[{}]/g,""));this.i+=o[0].length-1}else{m=i.mo(i.chars(p))}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(m))},Open:function(m){this.Push(b.open())},Close:function(m){this.Push(b.close())},Tilde:function(m){this.Push(i.mtext(i.chars(h)))},Space:function(m){},Superscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sup;if((o.type==="msubsup"&&o.data[o.sup])||(o.type==="munderover"&&o.data[o.over]&&!o.subsupOK)){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.over]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.over}else{o=i.msubsup(o,null,null);m=o.sup}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},Subscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sub;if((o.type==="msubsup"&&o.data[o.sub])||(o.type==="munderover"&&o.data[o.under]&&!o.subsupOK)){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.under]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.under}else{o=i.msubsup(o,null,null);m=o.sub}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(o){var n=this.stack.Prev();if(!n){n=i.mi()}if(n.type==="msubsup"&&n.data[n.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var m="";this.i--;do{m+=this.PRIME;this.i++,o=this.GetNext()}while(o==="'"||o===this.SMARTQUOTE);m=["","\u2032","\u2033","\u2034","\u2057"][m.length]||m;this.Push(b.prime(n,this.mmlToken(i.mo(m))))},mi2mo:function(m){var n=i.mo();n.Append.apply(n,m.data);var o;for(o in n.defaults){if(n.defaults.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}for(o in i.copyAttributes){if(i.copyAttributes.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}n.lspace=n.rspace="0";n.useMMLspacing&=~(n.SPACE_ATTR.lspace|n.SPACE_ATTR.rspace);return n},Comment:function(m){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(n,p,v,r,u,o,m,w,t){var s=this.GetNext();if(s===""){d.Error(["MissingArgFor","Missing argument for %1",n])}if(s==="{"){this.i++}else{this.string=s+"}"+this.string.slice(this.i+1);this.i=0}var q=b.array().With({requireClose:true,arraydef:{rowspacing:(o||"4pt"),columnspacing:(u||"1em")}});if(w){q.isCases=true}if(t){q.isNumbered=true;q.arraydef.side=t}if(p||v){q.open=p;q.close=v}if(m==="D"){q.arraydef.displaystyle=true}if(r!=null){q.arraydef.columnalign=r}this.Push(q)},Entry:function(p){this.Push(b.cell().With({isEntry:true,name:p}));if(this.stack.Top().isCases){var o=this.string;var s=0,q=this.i,n=o.length;while(qd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(q[0]&&this[q[0]]){n=this[q[0]].apply(this,[n].concat(q.slice(2)))}}this.Push(n)},envFindName:function(m){return g.environment[m]},Equation:function(m,n){return n},ExtensionEnv:function(n,m){this.Extension(n.name,m,"environment")},Array:function(n,p,u,s,t,o,m,q){if(!s){s=this.GetArgument("\\begin{"+n.name+"}")}var v=("c"+s).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");s=s.replace(/[^clr]/g,"").split("").join(" ");s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var r=b.array().With({arraydef:{columnalign:s,columnspacing:(t||"1em"),rowspacing:(o||"4pt")}});if(v.match(/[|:]/)){if(v.charAt(0).match(/[|:]/)){r.frame.push("left");r.frame.dashed=v.charAt(0)===":"}if(v.charAt(v.length-1).match(/[|:]/)){r.frame.push("right")}v=v.substr(1,v.length-2);r.arraydef.columnlines=v.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(p){r.open=this.convertDelimiter(p)}if(u){r.close=this.convertDelimiter(u)}if(m==="D"){r.arraydef.displaystyle=true}else{if(m){r.arraydef.displaystyle=false}}if(m==="S"){r.arraydef.scriptlevel=1}if(q){r.arraydef.useHeight=false}this.Push(n);return r},AlignedArray:function(m){var n=this.GetBrackets("\\begin{"+m.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),n)},setArrayAlign:function(n,m){m=this.trimSpaces(m||"");if(m==="t"){n.arraydef.align="baseline 1"}else{if(m==="b"){n.arraydef.align="baseline -1"}else{if(m==="c"){n.arraydef.align="center"}else{if(m){n.arraydef.align=m}}}}return n},convertDelimiter:function(m){if(m){m=g.delimiter[m]}if(m==null){return null}if(f(m)){m=m[0]}if(m.length===4){m=String.fromCharCode(parseInt(m,16))}return m},trimSpaces:function(n){if(typeof(n)!="string"){return n}var m=n.replace(/^\s+|\s+$/g,"");if(m.match(/\\$/)&&n.match(/ $/)){m+=" "}return m},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var m=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(m){this.i+=m[1].length;return m[1]}else{this.i++;return" "}},GetArgument:function(n,o){switch(this.GetNext()){case"":if(!o){d.Error(["MissingArgFor","Missing argument for %1",n])}return null;case"}":if(!o){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var m=++this.i,p=1;while(this.i1){n=[i.mrow.apply(i,n)]}}return n},InternalText:function(n,m){n=n.replace(/^\s+/,h).replace(/\s+$/,h);return i.mtext(i.chars(n)).With(m)},SubstituteArgs:function(n,m){var q="";var p="";var r;var o=0;while(on.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}p=this.AddArgs(this.AddArgs(p,q),n[r-1]);q=""}}else{q+=r}}}return this.AddArgs(p,q)},AddArgs:function(n,m){if(m.match(/^[a-z]/i)&&n.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){n+=" "}if(n.length+m.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return n+m}});d.Augment({Stack:e,Parse:a,Definitions:g,Startup:l,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(m){var n,o=false,q=MathJax.HTML.getScript(m);var s=(m.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var r={math:q,display:s,script:m};var t=this.prefilterHooks.Execute(r);if(t){return t}q=r.math;try{n=d.Parse(q).mml()}catch(p){if(!p.texError){throw p}n=this.formatError(p,q,s,m);o=true}if(n.isa(i.mtable)&&n.displaystyle==="inherit"){n.displaystyle=s}if(n.inferred){n=i.apply(MathJax.ElementJax,n.data)}else{n=i(n)}if(s){n.root.display="block"}if(o){n.texError=true}r.math=n;return this.postfilterHooks.Execute(r)||r.math},prefilterMath:function(n,o,m){return n},postfilterMath:function(n,o,m){this.combineRelations(n.root);return n},formatError:function(p,o,q,m){var n=p.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",n,o,q,m]);return i.Error(n)},Error:function(m){if(f(m)){m=k.apply(k,m)}throw c.Insert(Error(m),{texError:true})},Macro:function(m,n,o){g.macros[m]=["Macro"].concat([].slice.call(arguments,1));g.macros[m].isUser=true},fenced:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.INNER});m.Append(i.mo(o).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.OPEN}),n,i.mo(p).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.CLOSE}));return m},fixedFence:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.ORD});if(o){m.Append(this.mathPalette(o,"l"))}if(n.type==="mrow"){m.Append.apply(m,n.data)}else{m.Append(n)}if(p){m.Append(this.mathPalette(p,"r"))}return m},mathPalette:function(p,n){if(p==="{"||p==="}"){p="\\"+p}var o="{\\bigg"+n+" "+p+"}",m="{\\big"+n+" "+p+"}";return d.Parse("\\mathchoice"+o+m+m+m,{}).mml()},combineRelations:function(q){var r,n,p,o;for(r=0,n=q.data.length;r0){p+="rl";o.push("0em 0em");q--}o=o.join(" ");if(i){return this.AMSarray(l,j,i,p,o)}var m=this.AMSarray(l,j,i,p,o);return this.setArrayAlign(m,k)},EquationBegin:function(i,j){this.checkEqnEnv();this.stack.global.forcetag=(j&&a.autoNumber!=="none");return i},EquationStar:function(i,j){this.stack.global.tagged=true;return j},checkEqnEnv:function(){if(this.stack.global.eqnenv){h.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(j,m){var l=this.GetNext();if(l==="\\"){var k=this.i;l=this.GetArgument(j);this.i=k;if(l==="\\limits"){if(j==="\\idotsint"){m="\\!\\!\\mathop{\\,\\,"+m+"}"}else{m="\\!\\!\\!\\mathop{\\,\\,\\,"+m+"}"}}}this.string=m+" "+this.string.slice(this.i);this.i=0},xArrow:function(k,o,n,i){var m={width:"+"+(n+i)+"mu",lspace:n+"mu"};var p=this.GetBrackets(k),q=this.ParseArg(k);var s=b.mo(b.chars(String.fromCharCode(o))).With({stretchy:true,texClass:b.TEXCLASS.REL});var j=b.munderover(s);j.SetData(j.over,b.mpadded(q).With(m).With({voffset:".15em"}));if(p){p=h.Parse(p,this.stack.env).mml();j.SetData(j.under,b.mpadded(p).With(m).With({voffset:"-.24em"}))}this.Push(j.With({subsupOK:true}))},GetDelimiterArg:function(i){var j=this.trimSpaces(this.GetArgument(i));if(j==""){return null}if(j in d.delimiter){return j}h.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",i])},GetStar:function(){var i=(this.GetNext()==="*");if(i){this.i++}return i}});f.Augment({autoTag:function(){var j=this.global;if(!j.notag){g.number++;j.tagID=a.formatNumber(g.number.toString());var i=h.Parse("\\text{"+a.formatTag(j.tagID)+"}",{}).mml();j.tag=b.mtd(i).With({id:a.formatID(j.tagID)})}},getTag:function(){var m=this.global,k=m.tag;m.tagged=true;if(m.label){if(a.useLabelIds){k.id=a.formatID(m.label)}g.eqlabels[m.label]={tag:m.tagID,id:k.id}}if(document.getElementById(k.id)||g.IDs[k.id]||g.eqIDs[k.id]){var l=0,j;do{l++;j=k.id+"_"+l}while(document.getElementById(j)||g.IDs[j]||g.eqIDs[j]);k.id=j;if(m.label){g.eqlabels[m.label].id=j}}g.eqIDs[k.id]=1;this.clearTag();return k},clearTag:function(){var i=this.global;delete i.tag;delete i.tagID;delete i.label},fixInitialMO:function(l){for(var k=0,j=l.length;k=r.HTMLCSSlast+r.HTMLCSSchunk){this.postTranslate(r,true);r.HTMLCSSchunk=Math.floor(r.HTMLCSSchunk*this.config.EqnChunkFactor);r.HTMLCSSdelay=true}return false},savePreview:function(m){var n=m.MathJax.preview;if(n){m.MathJax.tmpPreview=document.createElement("span");n.parentNode.replaceChild(m.MathJax.tmpPreview,n)}},restorePreview:function(m){var n=m.MathJax.tmpPreview;if(n){n.parentNode.replaceChild(m.MathJax.preview,n);delete m.MathJax.tmpPreview}},getMetrics:function(m){var n=m.HTMLCSS;this.em=i.mbase.prototype.em=n.em*n.scale;this.outerEm=n.em;this.scale=n.scale;this.cwidth=n.cwidth;this.linebreakWidth=n.lineWidth},postTranslate:function(o,u){var r=o.jax[this.id],v,p,s,q;for(s=o.HTMLCSSlast,q=o.HTMLCSSeqn;sm){y.style.width=(u+100)+"px"}}}r=y.firstChild.firstChild.style;if(z.H!=null&&z.H>z.h){r.marginTop=d.Em(z.H-Math.max(z.h,d.FONTDATA.lineH))}if(z.D!=null&&z.D>z.d){r.marginBottom=d.Em(z.D-Math.max(z.d,d.FONTDATA.lineD))}if(z.lw<0){r.paddingLeft=d.Em(-z.lw)}if(z.rw>z.w){r.marginRight=d.Em(z.rw-z.w)}y.style.position="absolute";if(!p){x.style.position="absolute"}var w=y.offsetWidth,t=y.offsetHeight,A=x.offsetHeight,s=x.offsetWidth;y.style.position=x.style.position="";return{Y:-l.getBBox(y).h,mW:s,mH:A,zW:w,zH:t}},initImg:function(m){},initHTML:function(n,m){},initFont:function(m){var o=d.FONTDATA.FONTS,n=d.config.availableFonts;if(n&&n.length&&d.Font.testFont(o[m])){o[m].available=true;if(o[m].familyFixed){o[m].family=o[m].familyFixed;delete o[m].familyFixed}return null}if(!this.allowWebFonts){return null}o[m].isWebFont=true;if(d.FontFaceBug){o[m].family=m;if(d.msieFontCSSBug){o[m].family+="-Web"}}return j.Styles({"@font-face":this.Font.fontFace(m)})},Remove:function(m){var n=document.getElementById(m.inputID+"-Frame");if(n){if(m.HTMLCSS.display){n=n.parentNode}n.parentNode.removeChild(n)}delete m.HTMLCSS},getHD:function(n,o){if(n.bbox&&this.config.noReflows&&!o){return{h:n.bbox.h,d:n.bbox.d}}var m=n.style.position;n.style.position="absolute";this.HDimg.style.height="0px";n.appendChild(this.HDspan);var p={h:n.offsetHeight};this.HDimg.style.height=p.h+"px";p.d=n.offsetHeight-p.h;p.h-=p.d;p.h/=this.em;p.d/=this.em;n.removeChild(this.HDspan);n.style.position=m;return p},getW:function(q){var n,p,o=(q.bbox||{}).w,r=q;if(q.bbox&&this.config.noReflows&&q.bbox.exactW!==false){if(!q.bbox.exactW){if(q.style.paddingLeft){o+=this.unEm(q.style.paddingLeft)*(q.scale||1)}if(q.style.paddingRight){o+=this.unEm(q.style.paddingRight)*(q.scale||1)}}return o}if(q.bbox&&q.bbox.exactW){return o}if((q.bbox&&o>=0&&!this.initialSkipBug&&!this.msieItalicWidthBug)||this.negativeBBoxes||!q.firstChild){n=q.offsetWidth;p=q.parentNode.offsetHeight}else{if(q.bbox&&o<0&&this.msieNegativeBBoxBug){n=-q.offsetWidth,p=q.parentNode.offsetHeight}else{var m=q.style.position;q.style.position="absolute";r=this.startMarker;q.insertBefore(r,q.firstChild);q.appendChild(this.endMarker);n=this.endMarker.offsetLeft-r.offsetLeft;q.removeChild(this.endMarker);q.removeChild(r);q.style.position=m}}if(p!=null){q.parentNode.HH=p/this.em}return n/this.em},Measured:function(o,n){var p=o.bbox;if(p.width==null&&p.w&&!p.isMultiline){var m=this.getW(o);p.rw+=m-p.w;p.w=m;p.exactW=true}if(!n){n=o.parentNode}if(!n.bbox){n.bbox=p}return o},Remeasured:function(n,m){m.bbox=this.Measured(n,m).bbox},MeasureSpans:function(q){var t=[],v,s,p,w,n,r,o,u;for(s=0,p=q.length;s=0&&!this.initialSkipBug)||(w.w<0&&this.msieNegativeBBoxBug)){t.push([v])}else{if(this.initialSkipBug){n=this.startMarker.cloneNode(true);r=this.endMarker.cloneNode(true);v.insertBefore(n,v.firstChild);v.appendChild(r);t.push([v,n,r,v.style.position]);v.style.position="absolute"}else{r=this.endMarker.cloneNode(true);v.appendChild(r);t.push([v,null,r])}}}for(s=0,p=t.length;s=0&&!this.initialSkipBug)||this.negativeBBoxes||!v.firstChild){o=v.offsetWidth;u.HH=u.offsetHeight/this.em}else{if(w.w<0&&this.msieNegativeBBoxBug){o=-v.offsetWidth,u.HH=u.offsetHeight/this.em}else{o=t[s][2].offsetLeft-((t[s][1]||{}).offsetLeft||0)}}o/=this.em;w.rw+=o-w.w;w.w=o;w.exactW=true;if(!u.bbox){u.bbox=w}}for(s=0,p=t.length;s=0){r.style.width=this.Em(s);r.style.display="inline-block";r.style.overflow="hidden"}else{if(this.msieNegativeSpaceBug){r.style.height=""}r.style.marginLeft=this.Em(s);if(d.safariNegativeSpaceBug&&r.parentNode.firstChild==r){this.createBlank(r,0,true)}}if(o&&o!==i.COLOR.TRANSPARENT){r.style.backgroundColor=o;r.style.position="relative"}return r},createRule:function(t,p,r,u,n){if(p<-r){r=-p}var o=d.TeX.min_rule_thickness,q=1;if(u>0&&u*this.em0&&(p+r)*this.emp+r){m.borderTop=this.Px(p+r)+" "+n;m.width=this.Em(u);m.height=(this.msieRuleBug&&p+r>0?this.Em(p+r):0)}else{m.borderLeft=this.Px(u)+" "+n;m.width=(this.msieRuleBug&&u>0?this.Em(u):0);m.height=this.Em(p+r)}var s=this.addElement(t,"span",{style:m,noAdjust:true,HH:p+r,isMathJax:true,bbox:{h:p,d:r,w:u,rw:u,lw:0,exactW:true}});if(t.isBox||t.className=="mspace"){t.bbox=s.bbox,t.HH=p+r}return s},createFrame:function(v,s,u,x,z,n){if(s<-u){u=-s}var r=2*z;if(this.msieFrameSizeBug){if(xE.w){d.createBlank(v,E.rw-E.w+0.1)}}if(!this.msieClipRectBug&&!E.noclip&&!p){var C=3/this.em;var B=(E.H==null?E.h:E.H),n=(E.D==null?E.d:E.D);var F=z-B-C,q=z+n+C,o=-1000,m=E.rw+1000;v.style.clip="rect("+this.Em(F)+" "+this.Em(m)+" "+this.Em(q)+" "+this.Em(o)+")"}}v.style.top=this.Em(-s-z);v.style.left=this.Em(u+G);if(E&&A){if(E.H!=null&&(A.H==null||E.H+s>A.H)){A.H=E.H+s}if(E.D!=null&&(A.D==null||E.D-s>A.D)){A.D=E.D-s}if(E.h+s>A.h){A.h=E.h+s}if(E.d-s>A.d){A.d=E.d-s}if(A.H!=null&&A.H<=A.h){delete A.H}if(A.D!=null&&A.D<=A.d){delete A.D}if(E.w+u>A.w){A.w=E.w+u;if(A.width==null){w.style.width=this.Em(A.w)}}if(E.rw+u>A.rw){A.rw=E.rw+u}if(E.lw+u=p-0.01||(u==r-1&&!o.stretch)){if(o.HW[u][2]){s*=o.HW[u][2]}if(o.HW[u][3]){n=o.HW[u][3]}var t=this.addElement(w,"span");this.createChar(t,[n,o.HW[u][1]],s,q);w.bbox=t.bbox;w.offset=0.65*w.bbox.w;w.scale=s;return}}if(o.stretch){this["extendDelimiter"+o.dir](w,v,o.stretch,s,q)}},extendDelimiterV:function(B,u,F,G,x){var p=this.createStack(B,true);var w=this.createBox(p),v=this.createBox(p);this.createChar(w,(F.top||F.ext),G,x);this.createChar(v,(F.bot||F.ext),G,x);var o={bbox:{w:0,lw:0,rw:0}},E=o,q;var C=w.bbox.h+w.bbox.d+v.bbox.h+v.bbox.d;var s=-w.bbox.h;this.placeBox(w,0,s,true);s-=w.bbox.d;if(F.mid){E=this.createBox(p);this.createChar(E,F.mid,G,x);C+=E.bbox.h+E.bbox.d}if(F.min&&uC){o=this.Element("span");this.createChar(o,F.ext,G,x);var D=o.bbox.h+o.bbox.d,m=D-0.05,z,r,A=(F.mid?2:1);r=z=Math.min(Math.ceil((u-C)/(A*m)),this.maxStretchyParts);if(!F.fullExtenders){m=(u-C)/(A*z)}var t=(z/(z+1))*(D-m);m=D-t;s+=t+m-o.bbox.h;while(A-->0){while(z-->0){if(!this.msieCloneNodeBug){q=o.cloneNode(true)}else{q=this.Element("span");this.createChar(q,F.ext,G,x)}q.bbox=o.bbox;s-=m;this.placeBox(this.addBox(p,q),0,s,true)}s+=t-o.bbox.d;if(F.mid&&A){this.placeBox(E,0,s-E.bbox.h,true);z=r;s+=-(E.bbox.h+E.bbox.d)+t+m-o.bbox.h}}}else{s+=(C-u)/2;if(F.mid){this.placeBox(E,0,s-E.bbox.h,true);s+=-(E.bbox.h+E.bbox.d)}s+=(C-u)/2}this.placeBox(v,0,s-v.bbox.h,true);s-=v.bbox.h+v.bbox.d;B.bbox={w:Math.max(w.bbox.w,o.bbox.w,v.bbox.w,E.bbox.w),lw:Math.min(w.bbox.lw,o.bbox.lw,v.bbox.lw,E.bbox.lw),rw:Math.max(w.bbox.rw,o.bbox.rw,v.bbox.rw,E.bbox.rw),h:0,d:-s,exactW:true};B.scale=G;B.offset=0.55*B.bbox.w;B.isMultiChar=true;this.setStackWidth(p,B.bbox.w)},extendDelimiterH:function(C,p,F,H,z){var s=this.createStack(C,true);var q=this.createBox(s),D=this.createBox(s);this.createChar(q,(F.left||F.rep),H,z);this.createChar(D,(F.right||F.rep),H,z);var m=this.Element("span");this.createChar(m,F.rep,H,z);var E={bbox:{h:-this.BIGDIMEN,d:-this.BIGDIMEN}},o;this.placeBox(q,-q.bbox.lw,0,true);var v=(q.bbox.rw-q.bbox.lw)+(D.bbox.rw-D.bbox.lw)-0.05,u=q.bbox.rw-q.bbox.lw-0.025,y;if(F.mid){E=this.createBox(s);this.createChar(E,F.mid,H,z);v+=E.bbox.w}if(F.min&&pv){var G=m.bbox.rw-m.bbox.lw,r=G-0.05,A,t,B=(F.mid?2:1);t=A=Math.min(Math.ceil((p-v)/(B*r)),this.maxStretchyParts);if(!F.fillExtenders){r=(p-v)/(B*A)}y=(A/(A+1))*(G-r);r=G-y;u-=m.bbox.lw+y;while(B-->0){while(A-->0){if(!this.cloneNodeBug){o=m.cloneNode(true)}else{o=this.Element("span");this.createChar(o,F.rep,H,z)}o.bbox=m.bbox;this.placeBox(this.addBox(s,o),u,0,true);u+=r}if(F.mid&&B){this.placeBox(E,u,0,true);u+=E.bbox.w-y;A=t}}}else{u-=(v-p)/2;if(F.mid){this.placeBox(E,u,0,true);u+=E.bbox.w}u-=(v-p)/2}this.placeBox(D,u,0,true);C.bbox={w:u+D.bbox.rw,lw:0,rw:u+D.bbox.rw,h:Math.max(q.bbox.h,m.bbox.h,D.bbox.h,E.bbox.h),d:Math.max(q.bbox.d,m.bbox.d,D.bbox.d,E.bbox.d),exactW:true};C.scale=H;C.isMultiChar=true;this.setStackWidth(s,C.bbox.w)},createChar:function(u,r,p,n){u.isMathJax=true;var t=u,v="",q={fonts:[r[1]],noRemap:true};if(n&&n===i.VARIANT.BOLD){q.fonts=[r[1]+"-bold",r[1]]}if(typeof(r[1])!=="string"){q=r[1]}if(r[0] instanceof Array){for(var s=0,o=r[0].length;s=55296&&y<56319){C++;y=(((y-55296)<<10)+(t.charCodeAt(C)-56320))+65536;if(this.FONTDATA.RemapPlane1){var F=this.FONTDATA.RemapPlane1(y,q);y=F.n;q=F.variant}}else{var v,s,w=this.FONTDATA.RANGES;for(v=0,s=w.length;v=w[v].low&&y<=w[v].high){if(w[v].remap&&w[v].remap[y]){y=r+w[v].remap[y]}else{y=y-w[v].low+r;if(w[v].add){y+=w[v].add}}if(q["variant"+w[v].offset]){q=this.FONTDATA.VARIANT[q["variant"+w[v].offset]]}break}}}if(q.remap&&q.remap[y]){y=q.remap[y];if(q.remap.variant){q=this.FONTDATA.VARIANT[q.remap.variant]}}else{if(this.FONTDATA.REMAP[y]&&!q.noRemap){y=this.FONTDATA.REMAP[y]}}if(h(y)){q=this.FONTDATA.VARIANT[y[1]];y=y[0]}if(typeof(y)==="string"){t=y+t.substr(C+1);z=t.length;C=-1;continue}u=this.lookupChar(q,y);D=u[y];if(p||(!this.checkFont(u,o.style)&&!D[5].img)){if(A.length){this.addText(o,A);A=""}var x=!!o.style.fontFamily||!!B.style.fontStyle||!!B.style.fontWeight||!u.directory||p;p=false;if(o!==B){x=!this.checkFont(u,B.style);o=B}if(x){o=this.addElement(B,"span",{isMathJax:true,subSpan:true})}this.handleFont(o,u,o!==B)}A=this.handleChar(o,u,D,y,A);if(!(D[5]||{}).space){if(D[0]/1000>B.bbox.h){B.bbox.h=D[0]/1000}if(D[1]/1000>B.bbox.d){B.bbox.d=D[1]/1000}}if(B.bbox.w+D[3]/1000B.bbox.rw){B.bbox.rw=B.bbox.w+D[4]/1000}B.bbox.w+=D[2]/1000;if((D[5]||{}).isUnknown){B.bbox.exactW=false}}if(A.length){this.addText(o,A)}if(B.scale&&B.scale!==1){B.bbox.h*=B.scale;B.bbox.d*=B.scale;B.bbox.w*=B.scale;B.bbox.lw*=B.scale;B.bbox.rw*=B.scale}if(t.length==1&&u.skew&&u.skew[y]){B.bbox.skew=u.skew[y]}},checkFont:function(m,n){var o=(n.fontWeight||"normal");if(o.match(/^\d+$/)){o=(parseInt(o)>=600?"bold":"normal")}return(m.family.replace(/'/g,"")===n.fontFamily.replace(/'/g,"")&&(m.style||"normal")===(n.fontStyle||"normal")&&(m.weight||"normal")===o)},handleFont:function(o,m,q){o.style.fontFamily=m.family;if(!m.directory){o.style.fontSize=Math.floor(d.config.scale/d.scale+0.5)+"%"}if(!(d.FontFaceBug&&m.isWebFont)){var n=m.style||"normal",p=m.weight||"normal";if(n!=="normal"||q){o.style.fontStyle=n}if(p!=="normal"||q){o.style.fontWeight=p}}},handleChar:function(o,m,u,t,s){var r=u[5];if(r.space){if(s.length){this.addText(o,s)}d.createShift(o,u[2]/1000);return""}if(r.img){return this.handleImg(o,m,u,t,s)}if(r.isUnknown&&this.FONTDATA.DELIMITERS[t]){if(s.length){this.addText(o,s)}var q=o.scale;d.createDelimiter(o,t,0,1,m);if(this.FONTDATA.DELIMITERS[t].dir==="V"){o.style.verticalAlign=this.Em(o.bbox.d);o.bbox.h+=o.bbox.d;o.bbox.d=0}o.scale=q;u[0]=o.bbox.h*1000;u[1]=o.bbox.d*1000;u[2]=o.bbox.w*1000;u[3]=o.bbox.lw*1000;u[4]=o.bbox.rw*1000;return""}if(r.c==null){if(t<=65535){r.c=String.fromCharCode(t)}else{var p=t-65536;r.c=String.fromCharCode((p>>10)+55296)+String.fromCharCode((p&1023)+56320)}}if(d.ffFontOptimizationBug&&u[4]-u[2]>125){o.style.textRendering="optimizeLegibility"}if(r.rfix){this.addText(o,s+r.c);d.createShift(o,r.rfix/1000);return""}if(u[2]||!this.msieAccentBug||s.length){return s+r.c}d.createShift(o,u[3]/1000);d.createShift(o,(u[4]-u[3])/1000);this.addText(o,r.c);d.createShift(o,-u[4]/1000);return""},handleImg:function(o,m,r,q,p){return p},lookupChar:function(r,u){var q,o;if(!r.FONTS){var t=this.FONTDATA.FONTS;var s=(r.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(s instanceof Array)){s=[s]}if(r.fonts!=s){r.fonts=s}r.FONTS=[];for(q=0,o=s.length;q=0;p--){if(o.Ranges[p][2]==q){o.Ranges.splice(p,1)}}this.loadFont(o.directory+"/"+q+".js")}}}},loadFont:function(n){var m=MathJax.Callback.Queue();m.Push(["Require",j,this.fontDir+"/"+n]);if(this.imgFonts){if(!MathJax.isPacked){n=n.replace(/\/([^\/]*)$/,d.imgPacked+"/$1")}m.Push(["Require",j,this.webfontDir+"/png/"+n])}b.RestartAfter(m.Push({}))},loadWebFont:function(m){m.available=m.isWebFont=true;if(d.FontFaceBug){m.family=m.name;if(d.msieFontCSSBug){m.family+="-Web"}}b.RestartAfter(this.Font.loadWebFont(m))},loadWebFontError:function(n,m){b.Startup.signal.Post("HTML-CSS Jax - disable web fonts");n.isWebFont=false;if(this.config.imageFont&&this.config.imageFont===this.fontInUse){this.imgFonts=true;b.Startup.signal.Post("HTML-CSS Jax - switch to image fonts");b.Startup.signal.Post("HTML-CSS Jax - using image fonts");e(["WebFontNotAvailable","Web-Fonts not available -- using image fonts instead"],null,3000);j.Require(this.directory+"/imageFonts.js",m)}else{this.allowWebFonts=false;m()}},Element:MathJax.HTML.Element,addElement:MathJax.HTML.addElement,TextNode:MathJax.HTML.TextNode,addText:MathJax.HTML.addText,ucMatch:MathJax.HTML.ucMatch,BIGDIMEN:10000000,ID:0,idPostfix:"",GetID:function(){this.ID++;return this.ID},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,rule_thickness:0.06,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,scriptspace:0.1,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.3,min_rule_thickness:1.25},NBSP:"\u00A0",rfuzz:0});MathJax.Hub.Register.StartupHook("mml Jax Ready",function(){i=MathJax.ElementJax.mml;i.mbase.Augment({toHTML:function(q){q=this.HTMLcreateSpan(q);if(this.type!="mrow"){q=this.HTMLhandleSize(q)}for(var o=0,n=this.data.length;on.d){n.d=o.d}if(o.h>n.h){n.h=o.h}if(o.D!=null&&o.D>n.D){n.D=o.D}if(o.H!=null&&o.H>n.H){n.H=o.H}if(p.style.paddingLeft){n.w+=d.unEm(p.style.paddingLeft)*(p.scale||1)}if(n.w+o.lwn.rw){n.rw=n.w+o.rw}n.w+=o.w;if(p.style.paddingRight){n.w+=d.unEm(p.style.paddingRight)*(p.scale||1)}if(o.width){n.width=o.width;n.minWidth=o.minWidth}if(o.tw){n.tw=o.tw}if(o.ic){n.ic=o.ic}else{delete n.ic}if(n.exactW&&!o.exactW){n.exactW=o.exactW}},HTMLemptyBBox:function(m){m.h=m.d=m.H=m.D=m.rw=-d.BIGDIMEN;m.w=0;m.lw=d.BIGDIMEN;return m},HTMLcleanBBox:function(m){if(m.h===this.BIGDIMEN){m.h=m.d=m.H=m.D=m.w=m.rw=m.lw=0}if(m.D<=m.d){delete m.D}if(m.H<=m.h){delete m.H}},HTMLzeroBBox:function(){return{h:0,d:0,w:0,lw:0,rw:0}},HTMLcanStretch:function(n){if(this.isEmbellished()){var m=this.Core();if(m&&m!==this){return m.HTMLcanStretch(n)}}return false},HTMLstretchH:function(n,m){return this.HTMLspanElement()},HTMLstretchV:function(n,m,o){return this.HTMLspanElement()},HTMLnotEmpty:function(m){while(m){if((m.type!=="mrow"&&m.type!=="texatom")||m.data.length>1){return true}m=m.data[0]}return false},HTMLmeasureChild:function(o,m){if(this.data[o]){d.Measured(this.data[o].toHTML(m),m)}else{m.bbox=this.HTMLzeroBBox()}},HTMLboxChild:function(o,m){if(!this.data[o]){this.SetData(o,i.mrow())}return this.data[o].toHTML(m)},HTMLcreateSpan:function(m){if(this.spanID){var n=this.HTMLspanElement();if(n&&(n.parentNode===m||(n.parentNode||{}).parentNode===m)){while(n.firstChild){n.removeChild(n.firstChild)}n.bbox=this.HTMLzeroBBox();n.scale=1;n.isMultChar=n.HH=null;n.style.cssText="";return n}}if(this.href){m=d.addElement(m,"a",{href:this.href,isMathJax:true})}m=d.addElement(m,"span",{className:this.type,isMathJax:true});if(d.imgHeightBug){m.style.display="inline-block"}if(this["class"]){m.className+=" "+this["class"]}if(!this.spanID){this.spanID=d.GetID()}m.id=(this.id||"MathJax-Span-"+this.spanID)+d.idPostfix;m.bbox=this.HTMLzeroBBox();this.styles={};if(this.style){m.style.cssText=this.style;if(m.style.fontSize){this.mathsize=m.style.fontSize;m.style.fontSize=""}this.styles={border:d.getBorders(m),padding:d.getPadding(m)};if(this.styles.border){m.style.border=""}if(this.styles.padding){m.style.padding=""}}if(this.href){m.parentNode.bbox=m.bbox}this.HTMLaddAttributes(m);return m},HTMLaddAttributes:function(p){if(this.attrNames){var u=this.attrNames,q=i.nocopyAttributes,t=b.config.ignoreMMLattributes;var r=(this.type==="mstyle"?i.math.prototype.defaults:this.defaults);for(var o=0,n=u.length;o0){q+=2*B;w-=B}if(z>0){z+=2*B;m-=B}u=-q-w;if(v){u-=v.right;m-=v.bottom;t+=v.left;r+=v.right;C.h+=v.top;C.d+=v.bottom;C.w+=v.left+v.right;C.lw-=v.left;C.rw+=v.right}if(x){z+=x.top+x.bottom;q+=x.left+x.right;u-=x.right;m-=x.bottom;t+=x.left;r+=x.right;C.h+=x.top;C.d+=x.bottom;C.w+=x.left+x.right;C.lw-=x.left;C.rw+=x.right}if(r){y.style.paddingRight=d.Em(r)}var p=d.Element("span",{id:"MathJax-Color-"+this.spanID+d.idPostfix,isMathJax:true,style:{display:"inline-block",backgroundColor:A.mathbackground,width:d.Em(q),height:d.Em(z),verticalAlign:d.Em(m),marginLeft:d.Em(w),marginRight:d.Em(u)}});d.setBorders(p,v);if(C.width){p.style.width=C.width;p.style.marginRight="-"+C.width}if(d.msieInlineBlockAlignBug){p.style.position="relative";p.style.width=p.style.height=0;p.style.verticalAlign=p.style.marginLeft=p.style.marginRight="";p.style.border=p.style.padding="";if(v&&d.msieBorderWidthBug){z+=v.top+v.bottom;q+=v.left+v.right}p.style.width=d.Em(t+B);d.placeBox(d.addElement(p,"span",{noAdjust:true,isMathJax:true,style:{display:"inline-block",position:"absolute",overflow:"hidden",background:(A.mathbackground||"transparent"),width:d.Em(q),height:d.Em(z)}}),w,C.h+B);d.setBorders(p.firstChild,v)}y.parentNode.insertBefore(p,y);if(d.msieColorPositionBug){y.style.position="relative"}return p}return null},HTMLremoveColor:function(){var m=document.getElementById("MathJax-Color-"+this.spanID+d.idPostfix);if(m){m.parentNode.removeChild(m)}},HTMLhandleSpace:function(q){if(this.useMMLspacing){if(this.type!=="mo"){return}var o=this.getValues("scriptlevel","lspace","rspace");if(o.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var n=this.HTMLgetMu(q);o.lspace=Math.max(0,d.length2em(o.lspace,n));o.rspace=Math.max(0,d.length2em(o.rspace,n));var m=this,p=this.Parent();while(p&&p.isEmbellished()&&p.Core()===m){m=p;p=p.Parent();q=m.HTMLspanElement()}if(o.lspace){q.style.paddingLeft=d.Em(o.lspace)}if(o.rspace){q.style.paddingRight=d.Em(o.rspace)}}}else{var r=this.texSpacing();if(r!==""){this.HTMLgetScale();r=d.length2em(r,this.scale)/(q.scale||1)*this.mscale;if(q.style.paddingLeft){r+=d.unEm(q.style.paddingLeft)}q.style.paddingLeft=d.Em(r)}}},HTMLgetScale:function(){if(this.scale){return this.scale*this.mscale}var o=1,m=this.getValues("scriptlevel","fontsize");m.mathsize=(this.isToken?this:this.Parent()).Get("mathsize");if(this.style){var n=this.HTMLspanElement();if(n.style.fontSize!=""){m.fontsize=n.style.fontSize}}if(m.fontsize&&!this.mathsize){m.mathsize=m.fontsize}if(m.scriptlevel!==0){if(m.scriptlevel>2){m.scriptlevel=2}o=Math.pow(this.Get("scriptsizemultiplier"),m.scriptlevel);m.scriptminsize=d.length2em(this.Get("scriptminsize"));if(o2){n.scriptlevel=2}m=Math.sqrt(Math.pow(n.scriptsizemultiplier,n.scriptlevel))}return m},HTMLgetVariant:function(){var m=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");m.hasVariant=this.Get("mathvariant",true);if(!m.hasVariant){m.family=m.fontfamily;m.weight=m.fontweight;m.style=m.fontstyle}if(this.style){var o=this.HTMLspanElement();if(!m.family&&o.style.fontFamily){m.family=o.style.fontFamily}if(!m.weight&&o.style.fontWeight){m.weight=o.style.fontWeight}if(!m.style&&o.style.fontStyle){m.style=o.style.fontStyle}}if(m.weight&&m.weight.match(/^\d+$/)){m.weight=(parseInt(m.weight)>600?"bold":"normal")}var n=m.mathvariant;if(this.variantForm){n="-"+d.fontInUse+"-variant"}if(m.family&&!m.hasVariant){if(!m.weight&&m.mathvariant.match(/bold/)){m.weight="bold"}if(!m.style&&m.mathvariant.match(/italic/)){m.style="italic"}return{FONTS:[],fonts:[],noRemap:true,defaultFont:{family:m.family,style:m.style,weight:m.weight}}}if(m.weight==="bold"){n={normal:i.VARIANT.BOLD,italic:i.VARIANT.BOLDITALIC,fraktur:i.VARIANT.BOLDFRAKTUR,script:i.VARIANT.BOLDSCRIPT,"sans-serif":i.VARIANT.BOLDSANSSERIF,"sans-serif-italic":i.VARIANT.SANSSERIFBOLDITALIC}[n]||n}else{if(m.weight==="normal"){n={bold:i.VARIANT.normal,"bold-italic":i.VARIANT.ITALIC,"bold-fraktur":i.VARIANT.FRAKTUR,"bold-script":i.VARIANT.SCRIPT,"bold-sans-serif":i.VARIANT.SANSSERIF,"sans-serif-bold-italic":i.VARIANT.SANSSERIFITALIC}[n]||n}}if(m.style==="italic"){n={normal:i.VARIANT.ITALIC,bold:i.VARIANT.BOLDITALIC,"sans-serif":i.VARIANT.SANSSERIFITALIC,"bold-sans-serif":i.VARIANT.SANSSERIFBOLDITALIC}[n]||n}else{if(m.style==="normal"){n={italic:i.VARIANT.NORMAL,"bold-italic":i.VARIANT.BOLD,"sans-serif-italic":i.VARIANT.SANSSERIF,"sans-serif-bold-italic":i.VARIANT.BOLDSANSSERIF}[n]||n}}if(!(n in d.FONTDATA.VARIANT)){n="normal"}return d.FONTDATA.VARIANT[n]},HTMLdrawBBox:function(m){var o=m.bbox;var n=d.Element("span",{style:{"font-size":m.style.fontSize,display:"inline-block",opacity:0.25,"margin-left":d.Em(-o.w)}},[["span",{style:{height:d.Em(o.h),width:d.Em(o.w),"background-color":"red",display:"inline-block"}}],["span",{style:{height:d.Em(o.d),width:d.Em(o.w),"margin-left":d.Em(-o.w),"vertical-align":d.Em(-o.d),"background-color":"green",display:"inline-block"}}]]);if(m.nextSibling){m.parentNode.insertBefore(n,m.nextSibling)}else{m.parentNode.appendChild(n)}}},{HTMLautoload:function(){var m=d.autoloadDir+"/"+this.type+".js";b.RestartAfter(j.Require(m))},HTMLautoloadFile:function(m){var n=d.autoloadDir+"/"+m+".js";b.RestartAfter(j.Require(n))},HTMLstretchH:function(n,m){this.HTMLremoveColor();return this.toHTML(n,m)},HTMLstretchV:function(n,m,o){this.HTMLremoveColor();return this.toHTML(n,m,o)}});i.chars.Augment({toHTML:function(p,o,n,q){var t=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(n){t=n(t,q)}if(o.fontInherit){var s=Math.floor(d.config.scale/d.scale+0.5)+"%";d.addElement(p,"span",{style:{"font-size":s}},[t]);if(o.bold){p.lastChild.style.fontWeight="bold"}if(o.italic){p.lastChild.style.fontStyle="italic"}p.bbox=null;var r=d.getHD(p),m=d.getW(p);p.bbox={h:r.h,d:r.d,w:m,lw:0,rw:m,exactW:true}}else{this.HTMLhandleVariant(p,o,t)}}});i.entity.Augment({toHTML:function(p,o,n,q){var t=this.toString().replace(/[\u2061-\u2064]/g,"");if(n){t=n(t,q)}if(o.fontInherit){var s=Math.floor(d.config.scale/d.scale+0.5)+"%";d.addElement(p,"span",{style:{"font-size":s}},[t]);if(o.bold){p.lastChild.style.fontWeight="bold"}if(o.italic){p.lastChild.style.fontStyle="italic"}delete p.bbox;var r=d.getHD(p),m=d.getW(p);p.bbox={h:r.h,d:r.d,w:m,lw:0,rw:m,exactW:true}}else{this.HTMLhandleVariant(p,o,t)}}});i.mi.Augment({toHTML:function(q){q=this.HTMLhandleSize(this.HTMLcreateSpan(q));q.bbox=null;var p=this.HTMLgetVariant();for(var o=0,n=this.data.length;or.w&&s.length===1&&!p.noIC){r.ic=r.rw-r.w;d.createBlank(q,r.ic/this.mscale);r.w=r.rw}this.HTMLhandleSpace(q);this.HTMLhandleColor(q);this.HTMLhandleDir(q);return q}});i.mn.Augment({HTMLremapMinus:function(m){return m.replace(/^-/,"\u2212")},toHTML:function(r){r=this.HTMLhandleSize(this.HTMLcreateSpan(r));r.bbox=null;var q=this.HTMLgetVariant();var p=this.HTMLremapMinus;for(var o=0,n=this.data.length;ox.bbox.w){x.bbox.ic=x.bbox.rw-x.bbox.w;d.createBlank(x,x.bbox.ic/this.mscale);x.bbox.w=x.bbox.rw}}this.HTMLhandleSpace(x);this.HTMLhandleColor(x);this.HTMLhandleDir(x);return x},HTMLcanStretch:function(q){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}var o=this.CoreParent();if(o&&o.isa(i.munderover)&&this.CoreText(o.data[o.base]).length===1){var p=o.data[o.over],n=o.data[o.under];if(p&&this===p.CoreMO()&&o.Get("accent")){r=d.FONTDATA.REMAPACCENT[r]||r}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=d.FONTDATA.REMAPACCENTUNDER[r]||r}}}r=d.FONTDATA.DELIMITERS[r.charCodeAt(0)];var m=(r&&r.dir===q.substr(0,1));this.forceStretch=(m&&(this.Get("minsize",true)||this.Get("maxsize",true)));return m},HTMLstretchV:function(o,p,q){this.HTMLremoveColor();var t=this.getValues("symmetric","maxsize","minsize");var r=this.HTMLspanElement(),u=this.HTMLgetMu(r),s;var n=this.HTMLgetScale(),m=d.TeX.axis_height*n;if(t.symmetric){s=2*Math.max(p-m,q+m)}else{s=p+q}t.maxsize=d.length2em(t.maxsize,u,r.bbox.h+r.bbox.d);t.minsize=d.length2em(t.minsize,u,r.bbox.h+r.bbox.d);s=Math.max(t.minsize,Math.min(t.maxsize,s));if(s!=t.minsize){s=[Math.max(s*d.TeX.delimiterfactor/1000,s-d.TeX.delimitershortfall),s]}r=this.HTMLcreateSpan(o);d.createDelimiter(r,this.data.join("").charCodeAt(0),s,n);if(t.symmetric){s=(r.bbox.h+r.bbox.d)/2+m}else{s=(r.bbox.h+r.bbox.d)*p/(p+q)}d.positionDelimiter(r,s);this.HTMLhandleSpace(r);this.HTMLhandleColor(r);return r},HTMLstretchH:function(q,m){this.HTMLremoveColor();var o=this.getValues("maxsize","minsize","mathvariant","fontweight");if((o.fontweight==="bold"||parseInt(o.fontweight)>=600)&&!this.Get("mathvariant",true)){o.mathvariant=i.VARIANT.BOLD}var p=this.HTMLspanElement(),n=this.HTMLgetMu(p),r=p.scale;o.maxsize=d.length2em(o.maxsize,n,p.bbox.w);o.minsize=d.length2em(o.minsize,n,p.bbox.w);m=Math.max(o.minsize,Math.min(o.maxsize,m));p=this.HTMLcreateSpan(q);d.createDelimiter(p,this.data.join("").charCodeAt(0),m,r,o.mathvariant);this.HTMLhandleSpace(p);this.HTMLhandleColor(p);return p}});i.mtext.Augment({toHTML:function(q){q=this.HTMLhandleSize(this.HTMLcreateSpan(q));var p=this.HTMLgetVariant();if(d.config.mtextFontInherit||this.Parent().type==="merror"){var r=this.Get("mathvariant");if(r==="monospace"){q.className+=" MJX-monospace"}else{if(r.match(/sans-serif/)){q.className+=" MJX-sans-serif"}}p={bold:p.bold,italic:p.italic,fontInherit:true}}for(var o=0,n=this.data.length;od.linebreakWidth)||this.hasNewline()},HTMLstretchH:function(o,m){this.HTMLremoveColor();var n=this.HTMLspanElement();this.data[this.core].HTMLstretchH(n,m);this.HTMLcomputeBBox(n,true);this.HTMLhandleColor(n);return n},HTMLstretchV:function(o,n,p){this.HTMLremoveColor();var m=this.HTMLspanElement();this.data[this.core].HTMLstretchV(m,n,p);this.HTMLcomputeBBox(m,true);this.HTMLhandleColor(m);return m}});i.mstyle.Augment({toHTML:function(n,m,o){n=this.HTMLcreateSpan(n);if(this.data[0]!=null){var p=this.data[0].toHTML(n);if(o!=null){this.data[0].HTMLstretchV(n,m,o)}else{if(m!=null){this.data[0].HTMLstretchH(n,m)}}n.bbox=p.bbox}this.HTMLhandleSpace(n);this.HTMLhandleColor(n);return n},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.mfrac.Augment({toHTML:function(F){F=this.HTMLcreateSpan(F);var o=d.createStack(F);var w=d.createBox(o),s=d.createBox(o);d.MeasureSpans([this.HTMLboxChild(0,w),this.HTMLboxChild(1,s)]);var m=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var K=this.HTMLgetScale(),E=m.displaystyle;var J=d.TeX.axis_height*K;if(m.bevelled){var I=(E?0.4:0.15);var x=Math.max(w.bbox.h+w.bbox.d,s.bbox.h+s.bbox.d)+2*I;var G=d.createBox(o);d.createDelimiter(G,47,x);d.placeBox(w,0,(w.bbox.d-w.bbox.h)/2+J+I);d.placeBox(G,w.bbox.w-I/2,(G.bbox.d-G.bbox.h)/2+J);d.placeBox(s,w.bbox.w+G.bbox.w-I,(s.bbox.d-s.bbox.h)/2+J-I)}else{var n=Math.max(w.bbox.w,s.bbox.w);var A=d.thickness2em(m.linethickness,this.scale)*this.mscale,C,B,z,y;var D=d.TeX.min_rule_thickness/this.em;if(E){z=d.TeX.num1;y=d.TeX.denom1}else{z=(A===0?d.TeX.num3:d.TeX.num2);y=d.TeX.denom2}z*=K;y*=K;if(A===0){C=Math.max((E?7:3)*d.TeX.rule_thickness,2*D);B=(z-w.bbox.d)-(s.bbox.h-y);if(BA){n=((v.bbox.h+v.bbox.d)-(A-C))/2}var D=d.FONTDATA.DELIMITERS[d.FONTDATA.RULECHAR];if(!D||s<(D.HW[0]||[0])[0]*u||u<0.75){d.createRule(w,0,C,s);w.bbox.h=-C}else{d.createDelimiter(w,d.FONTDATA.RULECHAR,s,u)}A=m.bbox.h+n+C;n=A*d.rfuzz;if(v.isMultiChar){n=d.rfuzz}y=this.HTMLaddRoot(B,v,y,v.bbox.h+v.bbox.d-A,u);d.placeBox(v,y,A-v.bbox.h);d.placeBox(w,y+v.bbox.w,A-w.bbox.h+n);d.placeBox(r,y+v.bbox.w,0);this.HTMLhandleSpace(z);this.HTMLhandleColor(z);return z},HTMLaddRoot:function(o,n,m,q,p){return m}});i.mroot.Augment({toHTML:i.msqrt.prototype.toHTML,HTMLaddRoot:function(u,n,s,q,m){var o=d.createBox(u);if(this.data[1]){var r=this.data[1].toHTML(o);r.style.paddingRight=r.style.paddingLeft="";d.Measured(r,o)}else{o.bbox=this.HTMLzeroBBox()}var p=this.HTMLrootHeight(n.bbox.h+n.bbox.d,m,o)-q;var t=Math.min(o.bbox.w,o.bbox.rw);s=Math.max(t,n.offset);d.placeBox(o,s-t,p);return s-n.offset},HTMLrootHeight:function(o,n,m){return 0.45*(o-0.9*n)+0.6*n+Math.max(0,m.bbox.d-0.075)}});i.mfenced.Augment({toHTML:function(q){q=this.HTMLcreateSpan(q);if(this.data.open){this.data.open.toHTML(q)}if(this.data[0]!=null){this.data[0].toHTML(q)}for(var o=1,n=this.data.length;oL){L=s[N].bbox.w}if(!O[N]&&L>o){o=L}}}if(G==null&&I!=null){o=I}else{if(o==-d.BIGDIMEN){o=L}}for(N=L=0,J=this.data.length;NL){L=z.bbox.w}}}var F=d.TeX.rule_thickness*this.mscale,H=d.FONTDATA.TeX_factor;var w,u,B,A,v,E,K,P=0;q=s[this.base]||{bbox:this.HTMLzeroBBox()};if(q.bbox.ic){P=1.3*q.bbox.ic+0.05}for(N=0,J=this.data.length;NL){M.bbox.skew+=(L-z.bbox.w-w)/2}}}else{B=d.TeX.big_op_spacing1*Q*H;A=d.TeX.big_op_spacing3*Q*H;K=Math.max(B,A-Math.max(0,z.bbox.d))}K=Math.max(K,1.5/this.em);w+=P/2;u=q.bbox.h+z.bbox.d+K;z.bbox.h+=v}else{if(N==this.under){if(C){K=3*F*Q*H;v=0}else{B=d.TeX.big_op_spacing2*Q*H;A=d.TeX.big_op_spacing4*Q*H;K=Math.max(B,A-z.bbox.h)}K=Math.max(K,1.5/this.em);w-=P/2;u=-(q.bbox.d+z.bbox.h+K);z.bbox.d+=v}}d.placeBox(z,w,u)}}this.HTMLhandleSpace(M);this.HTMLhandleColor(M);return M},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.msubsup.Augment({toHTML:function(M,K,F){M=this.HTMLcreateSpan(M);var P=this.HTMLgetScale(),J=this.HTMLgetMu(M);var y=d.createStack(M),n,w=[];var x=d.createBox(y);if(this.data[this.base]){w.push(this.data[this.base].toHTML(x));if(F!=null){this.data[this.base].HTMLstretchV(x,K,F)}else{if(K!=null){this.data[this.base].HTMLstretchH(x,K)}}}else{x.bbox=this.HTMLzeroBBox()}var N=d.TeX.x_height*P,E=d.TeX.scriptspace*P*0.75;var m,z;if(this.HTMLnotEmpty(this.data[this.sup])){m=d.createBox(y);w.push(this.data[this.sup].toHTML(m))}if(this.HTMLnotEmpty(this.data[this.sub])){z=d.createBox(y);w.push(this.data[this.sub].toHTML(z))}d.MeasureSpans(w);if(m){m.bbox.w+=E;m.bbox.rw=Math.max(m.bbox.w,m.bbox.rw)}if(z){z.bbox.w+=E;z.bbox.rw=Math.max(z.bbox.w,z.bbox.rw)}d.placeBox(x,0,0);var o=P;if(m){o=this.data[this.sup].HTMLgetScale()}else{if(z){o=this.data[this.sub].HTMLgetScale()}}var H=d.TeX.sup_drop*o,G=d.TeX.sub_drop*o;var B=x.bbox.h-H,A=x.bbox.d+G,O=0,I;if(x.bbox.ic){x.bbox.w-=x.bbox.ic;O=1.3*x.bbox.ic+0.05}if(this.data[this.base]&&K==null&&F==null&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&w[0].scale===1&&!this.data[this.base].Get("largeop")){B=A=0}}var L=this.getValues("subscriptshift","superscriptshift");L.subscriptshift=(L.subscriptshift===""?0:d.length2em(L.subscriptshift,J));L.superscriptshift=(L.superscriptshift===""?0:d.length2em(L.superscriptshift,J));if(!m){if(z){A=Math.max(A,d.TeX.sub1*P,z.bbox.h-(4/5)*N,L.subscriptshift);d.placeBox(z,x.bbox.w,-A,z.bbox)}}else{if(!z){n=this.getValues("displaystyle","texprimestyle");I=d.TeX[(n.displaystyle?"sup1":(n.texprimestyle?"sup3":"sup2"))];B=Math.max(B,I*P,m.bbox.d+(1/4)*N,L.superscriptshift);d.placeBox(m,x.bbox.w+O,B,m.bbox)}else{A=Math.max(A,d.TeX.sub2*P);var C=d.TeX.rule_thickness*P;if((B-m.bbox.d)-(z.bbox.h-A)<3*C){A=3*C-B+m.bbox.d+z.bbox.h;H=(4/5)*N-(B-m.bbox.d);if(H>0){B+=H;A-=H}}d.placeBox(m,x.bbox.w+O,Math.max(B,L.superscriptshift));d.placeBox(z,x.bbox.w,-Math.max(A,L.subscriptshift))}}this.HTMLhandleSpace(M);this.HTMLhandleColor(M);return M},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.mmultiscripts.Augment({toHTML:i.mbase.HTMLautoload});i.mtable.Augment({toHTML:i.mbase.HTMLautoload});i["annotation-xml"].Augment({toHTML:i.mbase.HTMLautoload});i.annotation.Augment({toHTML:function(m){return this.HTMLcreateSpan(m)}});i.math.Augment({toHTML:function(E,B,t){var u,w,x,r,m=E;if(!t||t===d.PHASE.I){var C=d.addElement(E,"nobr",{isMathJax:true});E=this.HTMLcreateSpan(C);var n=this.Get("alttext");if(n&&!E.getAttribute("aria-label")){E.setAttribute("aria-label",n)}u=d.createStack(E);w=d.createBox(u);u.style.fontSize=C.parentNode.style.fontSize;C.parentNode.style.fontSize="";if(this.data[0]!=null){i.mbase.prototype.displayAlign=b.config.displayAlign;i.mbase.prototype.displayIndent=b.config.displayIndent;if(String(b.config.displayIndent).match(/^0($|[a-z%])/i)){i.mbase.prototype.displayIndent="0"}x=this.data[0].toHTML(w);x.bbox.exactW=false}}else{E=E.firstChild.firstChild;if(this.href){E=E.firstChild}u=E.firstChild;if(u.style.position!=="relative"){u=u.nextSibling}w=u.firstChild;x=w.firstChild}r=((!t||t===d.PHASE.II)?d.Measured(x,w):x);if(!t||t===d.PHASE.III){d.placeBox(w,0,0);var q=r.bbox.w;q=Math.abs(q)<0.006?0:Math.max(0,Math.round(q*this.em)+0.25);E.style.width=d.EmRounded(q/d.outerEm);E.style.display="inline-block";var A=1/d.em,G=d.em/d.outerEm;d.em/=G;E.bbox.h*=G;E.bbox.d*=G;E.bbox.w*=G;E.bbox.lw*=G;E.bbox.rw*=G;if(E.bbox.H){E.bbox.H*=G}if(E.bbox.D){E.bbox.D*=G}if(r&&r.bbox.width!=null){E.style.minWidth=(r.bbox.minWidth||E.style.width);E.style.width=r.bbox.width;w.style.width=u.style.width="100%";m.className+=" MathJax_FullWidth"}var D=this.HTMLhandleColor(E);if(r){d.createRule(E,(r.bbox.h+A)*G,(r.bbox.d+A)*G,0)}if(!this.isMultiline&&this.Get("display")==="block"&&E.bbox.width==null){var o=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(o.indentalignfirst!==i.INDENTALIGN.INDENTALIGN){o.indentalign=o.indentalignfirst}if(o.indentalign===i.INDENTALIGN.AUTO){o.indentalign=this.displayAlign}if(o.indentshiftfirst!==i.INDENTSHIFT.INDENTSHIFT){o.indentshift=o.indentshiftfirst}if(o.indentshift==="auto"){o.indentshift="0"}var F=d.length2em(o.indentshift,1,d.scale*d.cwidth);if(this.displayIndent!=="0"){var y=d.length2em(this.displayIndent,1,d.scale*d.cwidth);F+=(o.indentalign===i.INDENTALIGN.RIGHT?-y:y)}m.style.textAlign=B.style.textAlign=o.indentalign;if(F){b.Insert(E.style,({left:{marginLeft:d.Em(F)},right:{marginRight:d.Em(-F)},center:{marginLeft:d.Em(F),marginRight:d.Em(-F)}})[o.indentalign]);if(D){var v=parseFloat(D.style.marginLeft||"0")+F,s=parseFloat(D.style.marginRight||"0")-F;D.style.marginLeft=d.Em(v);D.style.marginRight=d.Em(s+(o.indentalign==="right"?E.bbox.w+F-E.bbox.w:0));if(d.msieColorBug&&o.indentalign==="right"){if(parseFloat(D.style.marginLeft)>0){var z=MathJax.HTML.addElement(D.parentNode,"span");z.style.marginLeft=d.Em(s+Math.min(0,E.bbox.w+F));D.nextSibling.style.marginRight="0em"}D.nextSibling.style.marginLeft="0em";D.style.marginRight=D.style.marginLeft="0em"}}}}}return E},HTMLspanElement:i.mbase.prototype.HTMLspanElement});i.TeXAtom.Augment({toHTML:function(q,o,s){q=this.HTMLcreateSpan(q);if(this.data[0]!=null){if(this.texClass===i.TEXCLASS.VCENTER){var m=d.createStack(q);var r=d.createBox(m);var t=this.data[0].toHTML(r);if(s!=null){d.Remeasured(this.data[0].HTMLstretchV(r,o,s),r)}else{if(o!=null){d.Remeasured(this.data[0].HTMLstretchH(r,o),r)}else{d.Measured(t,r)}}var n=d.TeX.axis_height*this.HTMLgetScale();d.placeBox(r,0,n-(r.bbox.h+r.bbox.d)/2+r.bbox.d)}else{var p=this.data[0].toHTML(q,o,s);if(s!=null){p=this.data[0].HTMLstretchV(r,o,s)}else{if(o!=null){p=this.data[0].HTMLstretchH(r,o)}}q.bbox=p.bbox}}this.HTMLhandleSpace(q);this.HTMLhandleColor(q);return q},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});b.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",d,"jax.js"]),0)})});b.Register.StartupHook("End Config",function(){b.Browser.Select({MSIE:function(m){var q=(document.documentMode||0);var p=m.versionAtLeast("7.0");var o=m.versionAtLeast("8.0")&&q>7;var n=(document.compatMode==="BackCompat");if(q<9){d.config.styles[".MathJax .MathJax_HitBox"]["background-color"]="white";d.config.styles[".MathJax .MathJax_HitBox"].opacity=0;d.config.styles[".MathJax .MathJax_HitBox"].filter="alpha(opacity=0)"}d.Augment({PaddingWidthBug:true,msieAccentBug:true,msieColorBug:(q<8),msieColorPositionBug:true,msieRelativeWidthBug:n,msieDisappearingBug:(q>=8),msieMarginScaleBug:(q<8),msiePaddingWidthBug:true,msieBorderWidthBug:n,msieFrameSizeBug:(q<=8),msieInlineBlockAlignBug:(!o||n),msiePlaceBoxBug:(o&&!n),msieClipRectBug:!o,msieNegativeSpaceBug:n,msieRuleBug:(q<7),cloneNodeBug:(o&&m.version==="8.0"),msieItalicWidthBug:true,initialSkipBug:(q<8),msieNegativeBBoxBug:(q>=8),msieIE6:!p,msieItalicWidthBug:true,FontFaceBug:(q<9),msieFontCSSBug:m.isIE9,allowWebFonts:(q>=9?"woff":"eot")})},Firefox:function(n){var o=false;if(n.versionAtLeast("3.5")){var m=String(document.location).replace(/[^\/]*$/,"");if(document.location.protocol!=="file:"||b.config.root.match(/^https?:\/\//)||(b.config.root+"/").substr(0,m.length)===m){o="otf"}}d.Augment({ffVerticalAlignBug:!n.versionAtLeast("20.0"),AccentBug:true,allowWebFonts:o,ffFontOptimizationBug:true})},Safari:function(r){var p=r.versionAtLeast("3.0");var o=r.versionAtLeast("3.1");var m=navigator.appVersion.match(/ Safari\/\d/)&&navigator.appVersion.match(/ Version\/\d/)&&navigator.vendor.match(/Apple/);var n=(navigator.appVersion.match(/ Android (\d+)\.(\d+)/));var s=(o&&r.isMobile&&((navigator.platform.match(/iPad|iPod|iPhone/)&&!r.versionAtLeast("5.0"))||(n!=null&&(n[1]<2||(n[1]==2&&n[2]<2)))));d.Augment({config:{styles:{".MathJax img, .MathJax nobr, .MathJax a":{"max-width":"5000em","max-height":"5000em"}}},Em:((r.webkit||0)>=538?d.EmRounded:d.Em),rfuzz:0.011,AccentBug:true,AdjustSurd:true,negativeBBoxes:true,safariNegativeSpaceBug:true,safariVerticalAlignBug:!o,safariTextNodeBug:!p,forceReflow:true,FontFaceBug:true,allowWebFonts:(o&&!s?"otf":false)});if(m){d.Augment({webFontDefault:(r.isMobile?"sans-serif":"serif")})}if(r.isPC){d.Augment({adjustAvailableFonts:d.removeSTIXfonts,checkWebFontsTwice:true})}if(s){var q=b.config["HTML-CSS"];if(q){q.availableFonts=[];q.preferredFont=null}else{b.config["HTML-CSS"]={availableFonts:[],preferredFont:null}}}},Chrome:function(m){d.Augment({Em:d.EmRounded,cloneNodeBug:true,rfuzz:-0.02,AccentBug:true,AdjustSurd:true,FontFaceBug:m.versionAtLeast("32.0"),negativeBBoxes:true,safariNegativeSpaceBug:true,safariWebFontSerif:[""],forceReflow:true,allowWebFonts:(m.versionAtLeast("4.0")?"otf":"svg")})},Opera:function(m){m.isMini=(navigator.appVersion.match("Opera Mini")!=null);d.config.styles[".MathJax .merror"]["vertical-align"]=null;d.config.styles[".MathJax span"]["z-index"]=0;d.Augment({operaHeightBug:true,operaVerticalAlignBug:true,operaFontSizeBug:m.versionAtLeast("10.61"),initialSkipBug:true,FontFaceBug:true,PaddingWidthBug:true,allowWebFonts:(m.versionAtLeast("10.0")&&!m.isMini?"otf":false),adjustAvailableFonts:d.removeSTIXfonts})},Konqueror:function(m){d.Augment({konquerorVerticalAlignBug:true})}})});MathJax.Hub.Register.StartupHook("End Cookie",function(){if(b.config.menuSettings.zoom!=="None"){j.Require("[MathJax]/extensions/MathZoom.js")}})})(MathJax.Ajax,MathJax.Hub,MathJax.OutputJax["HTML-CSS"]); +MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mtable.Augment({toHTML:function(r){r=this.HTMLcreateSpan(r);if(this.data.length===0){return r}var I=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");var aM=I.width.match(/%$/);var ay=b.createStack(r);var aJ=this.HTMLgetScale(),aB=this.HTMLgetMu(r),aC=-1;var aq=[],au=[],aj=[],aw=[],av=[],ae,ad,ap=-1,ac,ao,X,aH,Q,aE,aR=[],aW;var G=b.FONTDATA.lineH*aJ*I.useHeight,N=b.FONTDATA.lineD*aJ*I.useHeight;for(ae=0,ac=this.data.length;aeap){ap=ad}av[ad]=b.createStack(b.createBox(ay));aj[ad]=-b.BIGDIMEN}aw[ae][ad]=b.createBox(av[ad]);aR.push(aH.data[ad-X].toHTML(aw[ae][ad]))}}b.MeasureSpans(aR);for(ae=0,ac=this.data.length;aeaq[ae]){aq[ae]=aV*aO.h/aW}if(aV*aO.d/aW>au[ae]){au[ae]=aV*aO.d/aW}}}else{if(aE.HTMLcanStretch("Horizontal")){aV=b.length2em(aV,aB,aO.w);if(aV>aj[ad]){aj[ad]=aV}}}}}if(aw[ae][ad].bbox.h>aq[ae]){aq[ae]=aw[ae][ad].bbox.h}if(aw[ae][ad].bbox.d>au[ae]){au[ae]=aw[ae][ad].bbox.d}if(aw[ae][ad].bbox.w>aj[ad]){aj[ad]=aw[ae][ad].bbox.w}}}var aG=MathJax.Hub.SplitList;var aA=aG(I.columnspacing),aT=aG(I.rowspacing),e=aG(I.columnalign),B=aG(I.rowalign),d=aG(I.columnlines),w=aG(I.rowlines),aP=aG(I.columnwidth),U=[];for(ae=0,ac=aA.length;aeaw.length){aa=aw.length}}ai=0;aY=-(aW+aK)+aq[0];for(ae=0,ac=aa-1;ae0.98){R=0.98/af;af=0.98}}else{if(I.width==="auto"){if(af>0.98){R=K/(z+K);ab=z+K}else{ab=z/(1-af)}}else{ab=b.length2em(I.width,aB);for(ae=0,ac=Math.min(ap,aA.length);ae0.01){if(ag&&ab>z){ab=(ab-z)/ag;for(ae=0,ac=at.length;aeaq[ae]){aw[ae][ad].bbox.H=aw[ae][ad].bbox.h;aw[ae][ad].bbox.h=aq[ae]}if(aw[ae][ad].bbox.d>au[ae]){aw[ae][ad].bbox.D=aw[ae][ad].bbox.d;aw[ae][ad].bbox.d=au[ae]}aE.symmetric=aN}}aU=Q.rowalign||this.data[ae].rowalign||B[ae];o=({top:aq[ae]-aw[ae][ad].bbox.h,bottom:aw[ae][ad].bbox.d-au[ae],center:((aq[ae]-au[ae])-(aw[ae][ad].bbox.h-aw[ae][ad].bbox.d))/2,baseline:0,axis:0})[aU]||0;aU=(Q.columnalign||U[ae][ad]||e[ad]);b.alignBox(aw[ae][ad],aU,S+o)}if(aeX*an){an=X*aX}an+=az;ak+=X*an}else{ak+=aX-X*an+aI;an-=X*aI}}var aQ=b.createStack(r,false,"100%");b.addBox(aQ,ay);b.alignBox(ay,ar.indentalign,0,an);av[aC].parentNode.parentNode.removeChild(av[aC].parentNode);b.addBox(aQ,av[aC]);b.alignBox(av[aC],e[aC],0);if(b.msieRelativeWidthBug){ay.style.top=av[aC].style.top=""}if(aM){ay.style.width=I.width;r.bbox.width="100%"}av[aC].style[X===1?"marginLeft":"marginRight"]=b.Em(X*az);r.bbox.tw=ak;r.style.minWidth=r.bbox.minWidth=b.Em(ak);aQ.style.minWidth=aQ.bbox.minWidth=b.Em(ak/aJ)}if(!aM){this.HTMLhandleSpace(r)}var u=this.HTMLhandleColor(r);if(u&&aM){if(!ah){ah=b.createFrame(ay,g,0,aZ,0,"none");b.addBox(ay,ah);b.placeBox(ah,0,aY,true);ah.style.width="100%"}ah.style.backgroundColor=u.style.backgroundColor;ah.parentNode.insertBefore(ah,ah.parentNode.firstChild);u.parentNode.removeChild(u)}return r},HTMLhandleSpace:function(d){d.bbox.keepPadding=true;d.bbox.exact=true;if(!this.hasFrame&&d.bbox.width==null){d.style.paddingLeft=d.style.paddingRight=b.Em(1/6)}this.SUPER(arguments).HTMLhandleSpace.call(this,d)}});a.mtd.Augment({toHTML:function(e,d,g){e=this.HTMLcreateSpan(e);if(this.data[0]){var f=this.data[0].toHTML(e);if(g!=null){f=this.data[0].HTMLstretchV(e,d,g)}else{if(d!=null){f=this.data[0].HTMLstretchH(e,d)}}e.bbox=f.bbox}this.HTMLhandleSpace(e);this.HTMLhandleColor(e);return e},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mtable Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mtable.js")}); +(function(i,b,e,g){var h;var j,a,d;var f="'Times New Roman',Times,STIXGeneral,serif";var m={".MJXp-script":{"font-size":".8em"},".MJXp-right":{"-webkit-transform-origin":"right","-moz-transform-origin":"right","-ms-transform-origin":"right","-o-transform-origin":"right","transform-origin":"right"},".MJXp-bold":{"font-weight":"bold"},".MJXp-italic":{"font-style":"italic"},".MJXp-scr":{"font-family":"MathJax_Script,"+f},".MJXp-frak":{"font-family":"MathJax_Fraktur,"+f},".MJXp-sf":{"font-family":"MathJax_SansSerif,"+f},".MJXp-cal":{"font-family":"MathJax_Caligraphic,"+f},".MJXp-mono":{"font-family":"MathJax_Typewriter,"+f},".MJXp-largeop":{"font-size":"150%"},".MJXp-largeop.MJXp-int":{"vertical-align":"-.2em"},".MJXp-math":{display:"inline-block","line-height":"1.2","text-indent":"0","font-family":f,"white-space":"nowrap","border-collapse":"collapse"},".MJXp-display":{display:"block","text-align":"center",margin:"1em 0"},".MJXp-math span":{display:"inline-block"},".MJXp-box":{display:"block!important","text-align":"center"},".MJXp-box:after":{content:'" "'},".MJXp-rule":{display:"block!important","margin-top":".1em"},".MJXp-char":{display:"block!important"},".MJXp-mo":{margin:"0 .15em"},".MJXp-mfrac":{margin:"0 .125em","vertical-align":".25em"},".MJXp-denom":{display:"inline-table!important",width:"100%"},".MJXp-denom > *":{display:"table-row!important"},".MJXp-surd":{"vertical-align":"top"},".MJXp-surd > *":{display:"block!important"},".MJXp-script-box > * ":{display:"table!important",height:"50%"},".MJXp-script-box > * > *":{display:"table-cell!important","vertical-align":"top"},".MJXp-script-box > *:last-child > *":{"vertical-align":"bottom"},".MJXp-script-box > * > * > *":{display:"block!important"},".MJXp-mphantom":{visibility:"hidden"},".MJXp-munderover":{display:"inline-table!important"},".MJXp-over":{display:"inline-block!important","text-align":"center"},".MJXp-over > *":{display:"block!important"},".MJXp-munderover > *":{display:"table-row!important"},".MJXp-mtable":{"vertical-align":".25em",margin:"0 .125em"},".MJXp-mtable > *":{display:"inline-table!important","vertical-align":"middle"},".MJXp-mtr":{display:"table-row!important"},".MJXp-mtd":{display:"table-cell!important","text-align":"center",padding:".5em 0 0 .5em"},".MJXp-mtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-mlabeledtr":{display:"table-row!important"},".MJXp-mlabeledtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mlabeledtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"}};(function(){for(var n=0;n<10;n++){var o="scaleX(."+n+")";m[".MJXp-scale"+n]={"-webkit-transform":o,"-moz-transform":o,"-ms-transform":o,"-o-transform":o,transform:o}}})();var k=1000000;var c="V",l="H";g.Augment({settings:b.config.menuSettings,config:{styles:m},hideProcessedMath:false,maxStretchyParts:1000,Config:function(){if(!this.require){this.require=[]}this.SUPER(arguments).Config.call(this);var n=this.settings;if(n.scale){this.config.scale=n.scale}this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){j=MathJax.Extension.MathEvents.Event;a=MathJax.Extension.MathEvents.Touch;d=MathJax.Extension.MathEvents.Hover;this.ContextMenu=j.ContextMenu;this.Mousedown=j.AltContextMenu;this.Mouseover=d.Mouseover;this.Mouseout=d.Mouseout;this.Mousemove=d.Mousemove;var n=e.addElement(document.body,"div",{style:{width:"5in"}});this.pxPerInch=n.offsetWidth/5;n.parentNode.removeChild(n);return i.Styles(this.config.styles,["InitializePHTML",this])},InitializePHTML:function(){},preTranslate:function(p){var s=p.jax[this.id],t,q=s.length,u,r,v,o,n;for(t=0;tthis.PHTML.h){this.PHTML.h=q.PHTML.h}if(q.PHTML.d>this.PHTML.d){this.PHTML.d=q.PHTML.d}if(q.PHTML.t>this.PHTML.t){this.PHTML.t=q.PHTML.t}if(q.PHTML.b>this.PHTML.b){this.PHTML.b=q.PHTML.b}}}else{if(n.forceChild){e.addElement(p,"span")}}},PHTMLstretchChild:function(q,p,s){var r=this.data[q];if(r&&r.PHTMLcanStretch("Vertical",p,s)){var t=this.PHTML,o=r.PHTML,n=o.w;r.PHTMLstretchV(p,s);t.w+=o.w-n;if(o.h>t.h){t.h=o.h}if(o.d>t.d){t.d=o.d}}},PHTMLcreateSpan:function(n){if(!this.PHTML){this.PHTML={}}this.PHTML={w:0,h:0,d:0,l:0,r:0,t:0,b:0};if(this.inferred){return n}if(this.type==="mo"&&this.data.join("")==="\u222B"){g.lastIsInt=true}else{if(this.type!=="mspace"||this.width!=="negativethinmathspace"){g.lastIsInt=false}}if(!this.PHTMLspanID){this.PHTMLspanID=g.GetID()}var o=(this.id||"MJXp-Span-"+this.PHTMLspanID);return e.addElement(n,"span",{className:"MJXp-"+this.type,id:o})},PHTMLspanElement:function(){if(!this.PHTMLspanID){return null}return document.getElementById(this.id||"MJXp-Span-"+this.PHTMLspanID)},PHTMLhandleToken:function(o){var n=this.getValues("mathvariant");if(n.mathvariant!==h.VARIANT.NORMAL){o.className+=" "+g.VARIANT[n.mathvariant]}},PHTMLhandleStyle:function(n){if(this.style){n.style.cssText=this.style}},PHTMLhandleColor:function(n){if(this.mathcolor){n.style.color=this.mathcolor}if(this.mathbackground){n.style.backgroundColor=this.mathbackground}},PHTMLhandleScriptlevel:function(n){var o=this.Get("scriptlevel");if(o){n.className+=" MJXp-script"}},PHTMLhandleText:function(y,A){var v,p;var z=0,o=0,q=0;for(var s=0,r=A.length;s=55296&&p<56319){s++;p=(((p-55296)<<10)+(A.charCodeAt(s)-56320))+65536}var t=0.7,u=0.22,x=0.5;if(p<127){if(v.match(/[A-Za-ehik-or-xz0-9]/)){u=0}if(v.match(/[A-HK-Z]/)){x=0.67}else{if(v.match(/[IJ]/)){x=0.36}}if(v.match(/[acegm-su-z]/)){t=0.45}else{if(v.match(/[ij]/)){t=0.75}}if(v.match(/[ijlt]/)){x=0.28}}if(g.DELIMITERS[v]){x=g.DELIMITERS[v].w||0.4}if(t>z){z=t}if(u>o){o=u}q+=x}if(!this.CHML){this.PHTML={}}this.PHTML={h:0.9,d:0.3,w:q,l:0,r:0,t:z,b:o};e.addText(y,A)},PHTMLbboxFor:function(o){if(this.data[o]&&this.data[o].PHTML){return this.data[o].PHTML}return{w:0,h:0,d:0,l:0,r:0,t:0,b:0}},PHTMLcanStretch:function(q,o,p){if(this.isEmbellished()){var n=this.Core();if(n&&n!==this){return n.PHTMLcanStretch(q,o,p)}}return false},PHTMLstretchV:function(n,o){},PHTMLstretchH:function(n){},CoreParent:function(){var n=this;while(n&&n.isEmbellished()&&n.CoreMO()===this&&!n.isa(h.math)){n=n.Parent()}return n},CoreText:function(n){if(!n){return""}if(n.isEmbellished()){return n.CoreMO().data.join("")}while((n.isa(h.mrow)||n.isa(h.TeXAtom)||n.isa(h.mstyle)||n.isa(h.mphantom))&&n.data.length===1&&n.data[0]){n=n.data[0]}if(!n.isToken){return""}else{return n.data.join("")}}});h.chars.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.entity.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.math.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n);if(this.Get("display")==="block"){n.className+=" MJXp-display"}return n}});h.mo.Augment({toPreviewHTML:function(o){o=this.PHTMLdefaultSpan(o);this.PHTMLadjustAccent(o);var n=this.getValues("lspace","rspace","scriptlevel","displaystyle","largeop");if(n.scriptlevel===0){this.PHTML.l=g.length2em(n.lspace);this.PHTML.r=g.length2em(n.rspace);o.style.marginLeft=g.Em(this.PHTML.l);o.style.marginRight=g.Em(this.PHTML.r)}else{this.PHTML.l=0.15;this.PHTML.r=0.1}if(n.displaystyle&&n.largeop){var p=e.Element("span",{className:"MJXp-largeop"});p.appendChild(o.firstChild);o.appendChild(p);this.PHTML.h*=1.2;this.PHTML.d*=1.2;if(this.data.join("")==="\u222B"){p.className+=" MJXp-int"}}return o},PHTMLadjustAccent:function(p){var o=this.CoreParent();if(o&&o.isa(h.munderover)&&this.CoreText(o.data[o.base]).length===1){var q=o.data[o.over],n=o.data[o.under];var s=this.data.join(""),r;if(q&&this===q.CoreMO()&&o.Get("accent")){r=g.REMAPACCENT[s]}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=g.REMAPACCENTUNDER[s]}}if(r){s=p.innerHTML=r}if(s.match(/[\u02C6-\u02DC\u00A8]/)){this.PHTML.acc=-0.52}else{if(s==="\u2192"){this.PHTML.acc=-0.15;this.PHTML.vec=true}}}},PHTMLcanStretch:function(q,o,p){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}r=g.DELIMITERS[r];var n=(r&&r.dir===q.substr(0,1));if(n){n=(this.PHTML.h!==o||this.PHTML.d!==p||(this.Get("minsize",true)||this.Get("maxsize",true)))}return n},PHTMLstretchV:function(p,u){var o=this.PHTMLspanElement(),t=this.PHTML;var n=this.getValues("symmetric","maxsize","minsize");if(n.symmetric){l=2*Math.max(p-0.25,u+0.25)}else{l=p+u}n.maxsize=g.length2em(n.maxsize,t.h+t.d);n.minsize=g.length2em(n.minsize,t.h+t.d);l=Math.max(n.minsize,Math.min(n.maxsize,l));var s=l/(t.h+t.d-0.3);var q=e.Element("span",{style:{"font-size":g.Em(s)}});if(s>1.25){var r=Math.ceil(1.25/s*10);q.className="MJXp-right MJXp-scale"+r;q.style.marginLeft=g.Em(t.w*(r/10-1)+0.07);t.w*=s*r/10}q.appendChild(o.firstChild);o.appendChild(q);if(n.symmetric){o.style.verticalAlign=g.Em(0.25*(1-s))}}});h.mspace.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q);var o=this.getValues("height","depth","width");var n=g.length2em(o.width),p=g.length2em(o.height),s=g.length2em(o.depth);var r=this.PHTML;r.w=n;r.h=p;r.d=s;if(n<0){if(!g.lastIsInt){q.style.marginLeft=g.Em(n)}n=0}q.style.width=g.Em(n);q.style.height=g.Em(p+s);if(s){q.style.verticalAlign=g.Em(-s)}return q}});h.mpadded.Augment({toPreviewHTML:function(u){u=this.PHTMLdefaultSpan(u,{childSpans:true,className:"MJXp-box",forceChild:true});var o=u.firstChild;var v=this.getValues("width","height","depth","lspace","voffset");var s=this.PHTMLdimen(v.lspace);var q=0,n=0,t=s.len,r=-s.len,p=0;if(v.width!==""){s=this.PHTMLdimen(v.width,"w",0);if(s.pm){r+=s.len}else{u.style.width=g.Em(s.len)}}if(v.height!==""){s=this.PHTMLdimen(v.height,"h",0);if(!s.pm){q+=-this.PHTMLbboxFor(0).h}q+=s.len}if(v.depth!==""){s=this.PHTMLdimen(v.depth,"d",0);if(!s.pm){n+=-this.PHTMLbboxFor(0).d;p+=-s.len}n+=s.len}if(v.voffset!==""){s=this.PHTMLdimen(v.voffset);q-=s.len;n+=s.len;p+=s.len}if(q){o.style.marginTop=g.Em(q)}if(n){o.style.marginBottom=g.Em(n)}if(t){o.style.marginLeft=g.Em(t)}if(r){o.style.marginRight=g.Em(r)}if(p){u.style.verticalAlign=g.Em(p)}return u},PHTMLdimen:function(q,r,n){if(n==null){n=-k}q=String(q);var o=q.match(/width|height|depth/);var p=(o?this.PHTML[o[0].charAt(0)]:(r?this.PHTML[r]:0));return{len:g.length2em(q,p)||0,pm:!!q.match(/^[-+]/)}}});h.munderover.Augment({toPreviewHTML:function(r){var t=this.getValues("displaystyle","accent","accentunder","align");var n=this.data[this.base];if(!t.displaystyle&&n!=null&&(n.movablelimits||n.CoreMO().Get("movablelimits"))){r=h.msubsup.prototype.toPreviewHTML.call(this,r);r.className=r.className.replace(/munderover/,"msubsup");return r}r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"",noBBox:true});var p=this.PHTMLbboxFor(this.over),v=this.PHTMLbboxFor(this.under),u=this.PHTMLbboxFor(this.base),s=this.PHTML,o=p.acc;if(this.data[this.over]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=p.l=r.lastChild.firstChild.style.marginRight=p.r=0}var q=e.Element("span",{},[["span",{className:"MJXp-over"}]]);q.firstChild.appendChild(r.lastChild);if(r.childNodes.length>(this.data[this.under]?1:0)){q.firstChild.appendChild(r.firstChild)}this.data[this.over].PHTMLhandleScriptlevel(q.firstChild.firstChild);if(o!=null){if(p.vec){q.firstChild.firstChild.firstChild.style.fontSize="60%";p.h*=0.6;p.d*=0.6;p.w*=0.6}o=o-p.d+0.1;if(u.t!=null){o+=u.t-u.h}q.firstChild.firstChild.style.marginBottom=g.Em(o)}if(r.firstChild){r.insertBefore(q,r.firstChild)}else{r.appendChild(q)}}if(this.data[this.under]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=v.l=r.lastChild.firstChild.marginRight=v.r=0}this.data[this.under].PHTMLhandleScriptlevel(r.lastChild)}s.w=Math.max(0.8*p.w,0.8*v.w,u.w);s.h=0.8*(p.h+p.d+(o||0))+u.h;s.d=u.d+0.8*(v.h+v.d);return r}});h.msubsup.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{noBBox:true});if(!this.data[this.base]){if(q.firstChild){q.insertBefore(e.Element("span"),q.firstChild)}else{q.appendChild(e.Element("span"))}}var s=this.data[this.base],p=this.data[this.sub],n=this.data[this.sup];if(!s){s={bbox:{h:0.8,d:0.2}}}q.firstChild.style.marginRight=".05em";var o=Math.max(0.4,s.PHTML.h-0.4),u=Math.max(0.2,s.PHTML.d+0.1);var t=this.PHTML;if(n&&p){var r=e.Element("span",{className:"MJXp-script-box",style:{height:g.Em(o+n.PHTML.h*0.8+u+p.PHTML.d*0.8),"vertical-align":g.Em(-u-p.PHTML.d*0.8)}},[["span",{},[["span",{},[["span",{style:{"margin-bottom":g.Em(-(n.PHTML.d-0.05))}}]]]]],["span",{},[["span",{},[["span",{style:{"margin-top":g.Em(-(n.PHTML.h-0.05))}}]]]]]]);p.PHTMLhandleScriptlevel(r.firstChild);n.PHTMLhandleScriptlevel(r.lastChild);r.firstChild.firstChild.firstChild.appendChild(q.lastChild);r.lastChild.firstChild.firstChild.appendChild(q.lastChild);q.appendChild(r);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+Math.max(n.PHTML.w,p.PHTML.w)+0.07}else{if(n){q.lastChild.style.verticalAlign=g.Em(o);n.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,n.PHTML.d*0.8-o);t.w=s.PHTML.w+n.PHTML.w+0.07}else{if(p){q.lastChild.style.verticalAlign=g.Em(-u);p.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,p.PHTML.h*0.8-u);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+p.PHTML.w+0.07}}}return q}});h.mfrac.Augment({toPreviewHTML:function(r){r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var o=this.getValues("linethickness","displaystyle");if(!o.displaystyle){if(this.data[0]){this.data[0].PHTMLhandleScriptlevel(r.firstChild)}if(this.data[1]){this.data[1].PHTMLhandleScriptlevel(r.lastChild)}}var n=e.Element("span",{className:"MJXp-box"},[["span",{className:"MJXp-denom"},[["span",{},[["span",{className:"MJXp-rule",style:{height:"1em"}}]]],["span"]]]]);n.firstChild.lastChild.appendChild(r.lastChild);r.appendChild(n);var s=this.PHTMLbboxFor(0),p=this.PHTMLbboxFor(1),v=this.PHTML;v.w=Math.max(s.w,p.w)*0.8;v.h=s.h+s.d+0.1+0.25;v.d=p.h+p.d-0.25;v.l=v.r=0.125;o.linethickness=Math.max(0,g.length2em(o.linethickness||"0",0));if(o.linethickness){var u=n.firstChild.firstChild.firstChild;var q=g.Em(o.linethickness);u.style.borderTop="none";u.style.borderBottom=(o.linethickness<0.15?"1px":q)+" solid";u.style.margin=q+" 0";q=o.linethickness;n.style.marginTop=g.Em(3*q-1.2);r.style.verticalAlign=g.Em(1.5*q+0.1);v.h+=1.5*q-0.1;v.d+=1.5*q}else{n.style.marginTop="-.7em"}return r}});h.msqrt.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});this.PHTMLlayoutRoot(n,n.firstChild);return n},PHTMLlayoutRoot:function(u,n){var v=this.PHTMLbboxFor(0);var q=Math.ceil((v.h+v.d+0.14)*100),w=g.Em(14/q);var r=e.Element("span",{className:"MJXp-surd"},[["span",{style:{"font-size":q+"%","margin-top":w}},["\u221A"]]]);var s=e.Element("span",{className:"MJXp-root"},[["span",{className:"MJXp-rule",style:{"border-top":".08em solid"}}]]);var p=(1.2/2.2)*q/100;if(q>150){var o=Math.ceil(150/q*10);r.firstChild.className="MJXp-right MJXp-scale"+o;r.firstChild.style.marginLeft=g.Em(p*(o/10-1)/q*100);p=p*o/10;s.firstChild.style.borderTopWidth=g.Em(0.08/Math.sqrt(o/10))}s.appendChild(n);u.appendChild(r);u.appendChild(s);this.PHTML.h=v.h+0.18;this.PHTML.d=v.d;this.PHTML.w=v.w+p;return u}});h.mroot.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var p=this.PHTMLbboxFor(1),n=q.removeChild(q.lastChild);var t=this.PHTMLlayoutRoot(e.Element("span"),q.firstChild);n.className="MJXp-script";var u=parseInt(t.firstChild.firstChild.style.fontSize);var o=0.55*(u/120)+p.d*0.8,s=-0.6*(u/120);if(u>150){s*=0.95*Math.ceil(150/u*10)/10}n.style.marginRight=g.Em(s);n.style.verticalAlign=g.Em(o);if(-s>p.w*0.8){n.style.marginLeft=g.Em(-s-p.w*0.8)}q.appendChild(n);q.appendChild(t);this.PHTML.w+=Math.max(0,p.w*0.8+s);this.PHTML.h=Math.max(this.PHTML.h,p.h*0.8+o);return q},PHTMLlayoutRoot:h.msqrt.prototype.PHTMLlayoutRoot});h.mfenced.Augment({toPreviewHTML:function(q){q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);this.addFakeNodes();this.PHTMLaddChild(q,"open",{});for(var p=0,n=this.data.length;ps){s=x.w}}}var o=this.PHTML;o.w=s;o.h=y/2+0.25;o.d=y/2-0.25;o.l=o.r=0.125;return E}});h.mlabeledtr.Augment({PHTMLdefaultSpan:function(q,o){if(!o){o={}}q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);if(this.isToken){this.PHTMLhandleToken(q)}for(var p=1,n=this.data.length;p/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])}); +MathJax.Ajax.loadComplete("[MathJax]/config/TeX-AMS_HTML-full.js"); diff --git a/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML.js b/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/config/TeX-AMS_HTML.js @@ -0,0 +1,56 @@ +/* + * /MathJax/config/TeX-AMS_HTML.js + * + * Copyright (c) 2010-2016 The MathJax Consortium + * + * 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.Ajax.Preloading( + "[MathJax]/jax/input/TeX/config.js", + "[MathJax]/jax/output/HTML-CSS/config.js", + "[MathJax]/jax/output/PreviewHTML/config.js", + "[MathJax]/extensions/tex2jax.js", + "[MathJax]/extensions/MathEvents.js", + "[MathJax]/extensions/MathZoom.js", + "[MathJax]/extensions/MathMenu.js", + "[MathJax]/jax/element/mml/jax.js", + "[MathJax]/extensions/toMathML.js", + "[MathJax]/extensions/TeX/noErrors.js", + "[MathJax]/extensions/TeX/noUndefined.js", + "[MathJax]/jax/input/TeX/jax.js", + "[MathJax]/extensions/TeX/AMSmath.js", + "[MathJax]/extensions/TeX/AMSsymbols.js", + "[MathJax]/jax/output/PreviewHTML/jax.js", + "[MathJax]/extensions/fast-preview.js", + "[MathJax]/extensions/AssistiveMML.js" +); + +MathJax.Hub.Config({ + extensions: ['[Contrib]/a11y/accessibility-menu.js'] +}); + +MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.0",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(b,a){return a+"#"+escape(b)},useLabelIds:true}},resetEquationNumbers:function(){}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); +MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.7.0",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px","z-index":401}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.lastt){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); +(function(f,o,q,e,r){var p="2.7.0";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var j=(a?null:"5px");var s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},"#MathJax_About.MathJax_MousePost":{outline:"none"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(a?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":j,"-webkit-border-radius":j,"-moz-border-radius":j,"-khtml-border-radius":j,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(a?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em","padding-top":".25em",color:"#666666","font-family":(l?"'Arial unicode MS'":null),"font-size":".75em"},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(a?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(a?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(a?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(a?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(a?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(a?"Highlight":"#606872"),color:(a?"HighlightText":"white")},".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus":{"background-color":"#E8E8E8"},".MathJax_ContextMenu:focus":{outline:"none"},".MathJax_ContextMenu .MathJax_MenuItem:focus":{outline:"none"},"#MathJax_AboutClose":{top:".2em",right:".2em"},".MathJax_Menu .MathJax_MenuClose":{top:"-10px",left:"-10px"},".MathJax_MenuClose":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","font-family":"'Courier New',Courier","font-size":"24px",color:"#F0F0F0"},".MathJax_MenuClose span":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","line-height":0,padding:"8px 0 6px"},".MathJax_MenuClose:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_MenuClose:hover span":{"background-color":"#CCC!important"},".MathJax_MenuClose:hover:focus":{outline:"none"}}});var n,k,b;f.Register.StartupHook("MathEvents Ready",function(){n=MathJax.Extension.MathEvents.Event.False;k=MathJax.Extension.MathEvents.Hover;b=MathJax.Extension.MathEvents.Event.KEY});var h=MathJax.Object.Subclass({Keydown:function(u,v){switch(u.keyCode){case b.ESCAPE:this.Remove(u,v);break;case b.RIGHT:this.Right(u,v);break;case b.LEFT:this.Left(u,v);break;case b.UP:this.Up(u,v);break;case b.DOWN:this.Down(u,v);break;case b.RETURN:case b.SPACE:this.Space(u,v);break;default:return;break}return n(u)},Escape:function(u,v){},Right:function(u,v){},Left:function(u,v){},Up:function(u,v){},Down:function(u,v){},Space:function(u,v){}},{});var g=MathJax.Menu=h.Subclass({version:p,items:[],posted:false,title:null,margin:5,Init:function(u){this.items=[].slice.call(arguments,0)},With:function(u){if(u){f.Insert(this,u)}return this},Post:function(M,E,B){if(!M){M=window.event||{}}var I=document.getElementById("MathJax_MenuFrame");if(!I){I=g.Background(this);delete c.lastItem;delete c.lastMenu;delete g.skipUp;d.Post(["post",g.jax]);g.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var v=o.Element("div",{onmouseup:g.Mouseup,ondblclick:n,ondragstart:n,onselectstart:n,oncontextmenu:n,menuItem:this,className:"MathJax_Menu",onkeydown:g.Keydown,role:"menu"});if(M.type==="contextmenu"||M.type==="mouseover"){v.className+=" MathJax_ContextMenu"}if(!B){MathJax.Localization.setCSS(v)}for(var N=0,K=this.items.length;NA-this.margin){H=A-v.offsetWidth-this.margin}if(g.isMobile){H=Math.max(5,H-Math.floor(v.offsetWidth/2));F-=20}g.skipUp=M.isContextMenu}else{var z="left",J=E.offsetWidth;H=(g.isMobile?30:J-2);F=0;while(E&&E!==I){H+=E.offsetLeft;F+=E.offsetTop;E=E.parentNode}if(!g.isMobile){if((g.isRTL&&H-J-v.offsetWidth>this.margin)||(!g.isRTL&&H+v.offsetWidth>A-this.margin)){z="right";H=Math.max(this.margin,H-J-v.offsetWidth+6)}}if(!a){v.style["borderRadiusTop"+z]=0;v.style["WebkitBorderRadiusTop"+z]=0;v.style["MozBorderRadiusTop"+z]=0;v.style["KhtmlBorderRadiusTop"+z]=0}}v.style.left=H+"px";v.style.top=F+"px";if(document.selection&&document.selection.empty){document.selection.empty()}var G=window.pageXOffset||document.documentElement.scrollLeft;var D=window.pageYOffset||document.documentElement.scrollTop;g.Focus(v);if(M.type==="keydown"){g.skipMouseoverFromKey=true;setTimeout(function(){delete g.skipMouseoverFromKey},s.delay)}window.scrollTo(G,D);return n(M)},Remove:function(u,v){d.Post(["unpost",g.jax]);var w=document.getElementById("MathJax_MenuFrame");if(w){w.parentNode.removeChild(w);if(this.msieFixedPositionBug){detachEvent("onresize",g.Resize)}}if(g.jax.hover){delete g.jax.hover.nofade;k.UnHover(g.jax)}g.Unfocus(v);if(u.type==="mousedown"){g.CurrentNode().blur()}return n(u)},Find:function(u){return this.FindN(1,u,[].slice.call(arguments,1))},FindId:function(u){return this.FindN(0,u,[].slice.call(arguments,1))},FindN:function(y,v,x){for(var w=0,u=this.items.length;w0){u.oldTabIndex=u.tabIndex}u.tabIndex=-1}},SetTabIndex:function(){var v=g.AllNodes();for(var w=0,u;u=v[w];w++){if(u.oldTabIndex!==undefined){u.tabIndex=u.oldTabIndex;delete u.oldTabIndex}else{u.tabIndex=f.getTabOrder(u)}}},Mod:function(u,v){return((u%v)+v)%v},IndexOf:(Array.prototype.indexOf?function(u,v,w){return u.indexOf(v,w)}:function(u,x,y){for(var w=(y||0),v=u.length;w=0&&c.GetMenuNode(w).menuItem!==v[u].menuItem){v[u].menuItem.posted=false;v[u].parentNode.removeChild(v[u]);u--}},Touchstart:function(u,v){return this.TouchEvent(u,v,"Mousedown")},Touchend:function(u,v){return this.TouchEvent(u,v,"Mouseup")},TouchEvent:function(v,w,u){if(this!==c.lastItem){if(c.lastMenu){g.Event(v,c.lastMenu,"Mouseout")}g.Event(v,w,"Mouseover",true);c.lastItem=this;c.lastMenu=w}if(this.nativeTouch){return null}g.Event(v,w,u);return false},Remove:function(u,v){v=v.parentNode.menuItem;return v.Remove(u,v)},With:function(u){if(u){f.Insert(this,u)}return this},isRTL:function(){return g.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}},{GetMenuNode:function(u){return u.parentNode}});g.ENTRY=g.ITEM.Subclass({role:"menuitem",Attributes:function(u){u=f.Insert({onmouseover:g.Mouseover,onmouseout:g.Mouseout,onmousedown:g.Mousedown,onkeydown:g.Keydown,"aria-disabled":!!this.disabled},u);u=this.SUPER(arguments).Attributes.call(this,u);if(this.disabled){u.className+=" MathJax_MenuDisabled"}return u},MoveVertical:function(u,E,w){var x=c.GetMenuNode(E);var D=[];for(var z=0,C=x.menuItem.items,y;y=C[z];z++){if(!y.hidden){D.push(y)}}var B=g.IndexOf(D,this);if(B===-1){return}var A=D.length;var v=x.childNodes;do{B=g.Mod(w(B),A)}while(D[B].hidden||!v[B].role||v[B].role==="separator");this.Deactivate(E);D[B].Activate(u,v[B])},Up:function(v,u){this.MoveVertical(v,u,function(w){return w-1})},Down:function(v,u){this.MoveVertical(v,u,function(w){return w+1})},Right:function(v,u){this.MoveHorizontal(v,u,g.Right,!this.isRTL())},Left:function(v,u){this.MoveHorizontal(v,u,g.Left,this.isRTL())},MoveHorizontal:function(A,z,u,B){var x=c.GetMenuNode(z);if(x.menuItem===g.menu&&A.shiftKey){u(A,z)}if(B){return}if(x.menuItem!==g.menu){this.Deactivate(z)}var v=x.previousSibling.childNodes;var y=v.length;while(y--){var w=v[y];if(w.menuItem.submenu&&w.menuItem.submenu===x.menuItem){g.Focus(w);break}}this.RemoveSubmenus(z)},Space:function(u,v){this.Mouseup(u,v)},Activate:function(u,v){this.Deactivate(v);if(!this.disabled){v.className+=" MathJax_MenuActive"}this.DeactivateSubmenus(v);g.Focus(v)},Deactivate:function(u){u.className=u.className.replace(/ MathJax_MenuActive/,"")}});g.ITEM.COMMAND=g.ENTRY.Subclass({action:function(){},Init:function(u,w,v){if(!i(u)){u=[u,u]}this.name=u;this.action=w;this.With(v)},Label:function(u,v){return[this.Name()]},Mouseup:function(u,v){if(!this.disabled){this.Remove(u,v);d.Post(["command",this]);this.action.call(this,u)}return n(u)}});g.ITEM.SUBMENU=g.ENTRY.Subclass({submenu:null,marker:"\u25BA",markerRTL:"\u25C4",Attributes:function(u){u=f.Insert({"aria-haspopup":"true"},u);u=this.SUPER(arguments).Attributes.call(this,u);return u},Init:function(u,w){if(!i(u)){u=[u,u]}this.name=u;var v=1;if(!(w instanceof g.ITEM)){this.With(w),v++}this.submenu=g.apply(g,[].slice.call(arguments,v))},Label:function(u,v){this.submenu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(u,v){this.ClearTimer();u={type:u.type,clientX:u.clientX,clientY:u.clientY};this.timer=setTimeout(e(["Mouseup",this,u,v]),s.delay)},ClearTimer:function(){if(this.timer){clearTimeout(this.timer)}},Touchend:function(v,x){var w=this.submenu.posted;var u=this.SUPER(arguments).Touchend.apply(this,arguments);if(w){this.Deactivate(x);delete c.lastItem;delete c.lastMenu}return u},Mouseout:function(u,v){if(!this.submenu.posted){this.Deactivate(v)}this.ClearTimer()},Mouseover:function(u,v){this.Activate(u,v)},Mouseup:function(u,v){if(!this.disabled){if(!this.submenu.posted){this.ClearTimer();this.submenu.Post(u,v,this.ltr);g.Focus(v)}else{this.DeactivateSubmenus(v)}}return n(u)},Activate:function(u,v){if(!this.disabled){this.Deactivate(v);v.className+=" MathJax_MenuActive"}if(!this.submenu.posted){this.DeactivateSubmenus(v);if(!g.isMobile){this.Timer(u,v)}}g.Focus(v)},MoveVertical:function(w,v,u){this.ClearTimer();this.SUPER(arguments).MoveVertical.apply(this,arguments)},MoveHorizontal:function(w,y,v,x){if(!x){this.SUPER(arguments).MoveHorizontal.apply(this,arguments);return}if(this.disabled){return}if(!this.submenu.posted){this.Activate(w,y);return}var u=c.GetMenuNode(y).nextSibling.childNodes;if(u.length>0){this.submenu.items[0].Activate(w,u[0])}}});g.ITEM.RADIO=g.ENTRY.Subclass({variable:null,marker:(a?"\u25CF":"\u2713"),role:"menuitemradio",Attributes:function(v){var u=s.settings[this.variable]===this.value?"true":"false";v=f.Insert({"aria-checked":u},v);v=this.SUPER(arguments).Attributes.call(this,v);return v},Init:function(v,u,w){if(!i(v)){v=[v,v]}this.name=v;this.variable=u;this.With(w);if(this.value==null){this.value=this.name[0]}},Label:function(v,w){var u={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(s.settings[this.variable]!==this.value){u={style:{display:"none"}}}return[["span",u,[this.marker]]," "+this.Name()]},Mouseup:function(x,y){if(!this.disabled){var z=y.parentNode.childNodes;for(var v=0,u=z.length;v/g,">");var y=t("EqSource","MathJax Equation Source");if(g.isMobile){u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("
");u.document.write("");u.document.close()}else{u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("");u.document.close();var v=u.document.body.firstChild;setTimeout(function(){var B=(u.outerHeight-u.innerHeight)||30,A=(u.outerWidth-u.innerWidth)||30,w,E;A=Math.max(140,Math.min(Math.floor(0.5*screen.width),v.offsetWidth+A+25));B=Math.max(40,Math.min(Math.floor(0.5*screen.height),v.offsetHeight+B+25));if(g.prototype.msieHeightBug){B+=35}u.resizeTo(A,B);var D;try{D=x.screenX}catch(C){}if(x&&D!=null){w=Math.max(0,Math.min(x.screenX-Math.floor(A/2),screen.width-A-20));E=Math.max(0,Math.min(x.screenY-Math.floor(B/2),screen.height-B-20));u.moveTo(w,E)}},50)}};g.Scale=function(){var z=["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"],u=z.length,y=100,w,v;for(w=0;w7;g.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(v||!w),msieAboutBug:v,msieHeightBug:((document.documentMode||0)<9)});if(m){delete s.styles["#MathJax_About"].filter;delete s.styles[".MathJax_Menu"].filter}},Firefox:function(u){g.skipMouseover=u.isMobile&&u.versionAtLeast("6.0");g.skipMousedown=u.isMobile}});g.isMobile=f.Browser.isMobile;g.noContextMenu=f.Browser.noContextMenu;g.CreateLocaleMenu=function(){if(!g.menu){return}var z=g.menu.Find("Language").submenu,w=z.items;var v=[],B=MathJax.Localization.strings;for(var A in B){if(B.hasOwnProperty(A)){v.push(A)}}v=v.sort();z.items=[];for(var x=0,u=v.length;x0||this.Get("scriptlevel")>0)&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},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(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},childIndex:function(g){if(g==null){return}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir: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:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,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(g,n){var l=this.def;if(!l){if(g==="form"){this.useMMLspacing&=~this.SPACE_ATTR.form;return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}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(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);g=null;for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}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:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){var e=this.Get("scriptlevel",null,true);f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},getRemoved:{fontfamily:"fontFamily",fontweight:"fontWeight",fontstyle:"fontStyle",fontsize:"fontSize"},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,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:true,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:","},addFakeNodes:function(){var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}));this.data.open.useMMLspacing=0}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}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(e){if(e%2===1){return true}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"],linebreakContainer:true,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(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}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:true,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:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},adjustChild_displaystyle:function(){return(this.displaystyle!=null?this.displaystyle:this.defaults.displaystyle)},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,displaystyle:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+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 f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); +MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var c="2.7.0";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("")+""}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+""},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||!this.attr.xmlns)){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{">":">","<":"<","&":"&"}[i]});j.push(d+' '+l+"");j.push(d+" ")}return d+"<"+p+k+">\n"+j.join("\n")+"\n"+d+""}});a.msubsup.Augment({toMathML:function(j){var f=this.type;if(this.data[this.sup]==null){f="msub"}if(this.data[this.sub]==null){f="msup"}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+j+""}});a.munderover.Augment({toMathML:function(k){var f=this.type;var j=this.data[this.base];if(j&&j.isa(a.TeXAtom)&&j.movablelimits&&!j.Get("displaystyle")){type="msubsup";if(this.data[this.under]==null){f="msup"}if(this.data[this.over]==null){f="msub"}}else{if(this.data[this.under]==null){f="mover"}if(this.data[this.over]==null){f="munder"}}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+k+""}});a.TeXAtom.Augment({toMathML:function(e){var d=this.toMathMLattributes();if(!d&&this.data[0].data.length===1){return e.substr(2)+this.data[0].toMathML(e)}return e+"\n"+this.data[0].toMathML(e+" ")+"\n"+e+""}});a.chars.Augment({toMathML:function(d){return(d||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(d){return(d||"")+"&"+this.data[0]+";"}});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("[MathJax]/extensions/toMathML.js"); +(function(b,e){var d="2.7.0";var a=b.CombineConfig("TeX.noErrors",{disabled:false,multiLine:true,inlineDelimiters:["",""],style:{"font-size":"90%","text-align":"left",color:"black",padding:"1px 3px",border:"1px solid"}});var c="\u00A0";MathJax.Extension["TeX/noErrors"]={version:d,config:a};b.Register.StartupHook("TeX Jax Ready",function(){var f=MathJax.InputJax.TeX.formatError;MathJax.InputJax.TeX.Augment({formatError:function(j,i,k,g){if(a.disabled){return f.apply(this,arguments)}var h=j.message.replace(/\n.*/,"");b.signal.Post(["TeX Jax - parse error",h,i,k,g]);var m=a.inlineDelimiters;var l=(k||a.multiLine);if(!k){i=m[0]+i+m[1]}if(l){i=i.replace(/ /g,c)}else{i=i.replace(/\n/g," ")}return MathJax.ElementJax.mml.merror(i).With({isError:true,multiLine:l})}})});b.Register.StartupHook("HTML-CSS Jax Config",function(){b.Config({"HTML-CSS":{styles:{".MathJax .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("HTML-CSS Jax Ready",function(){var g=MathJax.ElementJax.mml;var h=MathJax.OutputJax["HTML-CSS"];var f=g.math.prototype.toHTML,i=g.merror.prototype.toHTML;g.math.Augment({toHTML:function(j,k){var l=this.data[0];if(l&&l.data[0]&&l.data[0].isError){j.style.fontSize="";j=this.HTMLcreateSpan(j);j.bbox=l.data[0].toHTML(j).bbox}else{j=f.apply(this,arguments)}return j}});g.merror.Augment({toHTML:function(p){if(!this.isError){return i.apply(this,arguments)}p=this.HTMLcreateSpan(p);p.className="noError";if(this.multiLine){p.style.display="inline-block"}var r=this.data[0].data[0].data.join("").split(/\n/);for(var o=0,l=r.length;o1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.apply(this,arguments)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.apply(this,arguments)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.apply(this,arguments)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.apply(this,arguments)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Register.StartupHook("PreviewHTML Jax Config",function(){b.Config({PreviewHTML:{styles:{".MathJax_PHTML .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("PreviewHTML Jax Ready",function(){var f=MathJax.ElementJax.mml;var h=MathJax.HTML;var g=f.merror.prototype.toPreviewHTML;f.merror.Augment({toPreviewHTML:function(l){if(!this.isError){return g.apply(this,arguments)}l=this.PHTMLcreateSpan(l);l.className="noError";if(this.multiLine){l.style.display="inline-block"}var n=this.data[0].data[0].data.join("").split(/\n/);for(var k=0,j=n.length;k1){var l=1.2*j/2;o.h=l+0.25;o.d=l-0.25;n.style.verticalAlign=g.Em(0.45-l)}else{o.h=1;o.d=0.2+2/g.em}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); +MathJax.Extension["TeX/noUndefined"]={version:"2.7.0",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); +(function(d,c,j){var i,h="\u00A0";var k=function(m){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var f=MathJax.Object.isArray;var e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var o,n,p,q;for(o=0,n=arguments.length;o":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:i.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2016",{texClass:i.TEXCLASS.ORD}],"\\|":["2016",{texClass:i.TEXCLASS.ORD}],"\\vert":["|",{texClass:i.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",i.VARIANT.NORMAL],mit:["SetFont",i.VARIANT.ITALIC],oldstyle:["SetFont",i.VARIANT.OLDSTYLE],cal:["SetFont",i.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",i.VARIANT.BOLD],bbFont:["SetFont",i.VARIANT.DOUBLESTRUCK],scr:["SetFont",i.VARIANT.SCRIPT],frak:["SetFont",i.VARIANT.FRAKTUR],sf:["SetFont",i.VARIANT.SANSSERIF],tt:["SetFont",i.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF",null,1],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",i.LENGTH.THINMATHSPACE],":":["Spacer",i.LENGTH.MEDIUMMATHSPACE],">":["Spacer",i.LENGTH.MEDIUMMATHSPACE],";":["Spacer",i.LENGTH.THICKMATHSPACE],"!":["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",i.LENGTH.THINMATHSPACE],negthinspace:["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",i.TEXCLASS.ORD,0.85],Big:["MakeBig",i.TEXCLASS.ORD,1.15],bigg:["MakeBig",i.TEXCLASS.ORD,1.45],Bigg:["MakeBig",i.TEXCLASS.ORD,1.75],bigl:["MakeBig",i.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",i.TEXCLASS.OPEN,1.15],biggl:["MakeBig",i.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",i.TEXCLASS.OPEN,1.75],bigr:["MakeBig",i.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",i.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",i.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",i.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",i.TEXCLASS.REL,0.85],Bigm:["MakeBig",i.TEXCLASS.REL,1.15],biggm:["MakeBig",i.TEXCLASS.REL,1.45],Biggm:["MakeBig",i.TEXCLASS.REL,1.75],mathord:["TeXAtom",i.TEXCLASS.ORD],mathop:["TeXAtom",i.TEXCLASS.OP],mathopen:["TeXAtom",i.TEXCLASS.OPEN],mathclose:["TeXAtom",i.TEXCLASS.CLOSE],mathbin:["TeXAtom",i.TEXCLASS.BIN],mathrel:["TeXAtom",i.TEXCLASS.REL],mathpunct:["TeXAtom",i.TEXCLASS.PUNCT],mathinner:["TeXAtom",i.TEXCLASS.INNER],vcenter:["TeXAtom",i.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var m=this.config.Macros;for(var n in m){if(m.hasOwnProperty(n)){if(typeof(m[n])==="string"){g.macros[n]=["Macro",m[n]]}else{g.macros[n]=["Macro"].concat(m[n])}g.macros[n].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(n,o){this.string=n;this.i=0;this.macroCount=0;var m;if(o){m={};for(var p in o){if(o.hasOwnProperty(p)){m[p]=o[p]}}}this.stack=d.Stack(m,!!o);this.Parse();this.Push(b.stop())},Parse:function(){var o,m;while(this.i=55296&&m<56320){o+=this.string.charAt(this.i++)}if(g.special[o]){this[g.special[o]](o)}else{if(g.letter.test(o)){this.Variable(o)}else{if(g.digit.test(o)){this.Number(o)}else{this.Other(o)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(m){return m},ControlSequence:function(p){var m=this.GetCS(),o=this.csFindMacro(m);if(o){if(!f(o)){o=[o]}var n=o[0];if(!(n instanceof Function)){n=this[n]}n.apply(this,[p+m].concat(o.slice(1)))}else{if(g.mathchar0mi[m]){this.csMathchar0mi(m,g.mathchar0mi[m])}else{if(g.mathchar0mo[m]){this.csMathchar0mo(m,g.mathchar0mo[m])}else{if(g.mathchar7[m]){this.csMathchar7(m,g.mathchar7[m])}else{if(g.delimiter["\\"+m]!=null){this.csDelimiter(m,g.delimiter["\\"+m])}else{this.csUndefined(p+m)}}}}}},csFindMacro:function(m){return g.macros[m]},csMathchar0mi:function(m,o){var n={mathvariant:i.VARIANT.ITALIC};if(f(o)){n=o[1];o=o[0]}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csMathchar0mo:function(m,o){var n={stretchy:false};if(f(o)){n=o[1];n.stretchy=false;o=o[0]}this.Push(this.mmlToken(i.mo(i.entity("#x"+o)).With(n)))},csMathchar7:function(m,o){var n={mathvariant:i.VARIANT.NORMAL};if(f(o)){n=o[1];o=o[0]}if(this.stack.env.font){n.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csDelimiter:function(m,o){var n={};if(f(o)){n=o[1];o=o[0]}if(o.length===4){o=i.entity("#x"+o)}else{o=i.chars(o)}this.Push(this.mmlToken(i.mo(o).With({fence:false,stretchy:false}).With(n)))},csUndefined:function(m){d.Error(["UndefinedControlSequence","Undefined control sequence %1",m])},Variable:function(n){var m={};if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.chars(n)).With(m)))},Number:function(p){var m,o=this.string.slice(this.i-1).match(g.number);if(o){m=i.mn(o[0].replace(/[{}]/g,""));this.i+=o[0].length-1}else{m=i.mo(i.chars(p))}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(m))},Open:function(m){this.Push(b.open())},Close:function(m){this.Push(b.close())},Tilde:function(m){this.Push(i.mtext(i.chars(h)))},Space:function(m){},Superscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sup;if((o.type==="msubsup"&&o.data[o.sup])||(o.type==="munderover"&&o.data[o.over]&&!o.subsupOK)){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.over]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.over}else{o=i.msubsup(o,null,null);m=o.sup}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},Subscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sub;if((o.type==="msubsup"&&o.data[o.sub])||(o.type==="munderover"&&o.data[o.under]&&!o.subsupOK)){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.under]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.under}else{o=i.msubsup(o,null,null);m=o.sub}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(o){var n=this.stack.Prev();if(!n){n=i.mi()}if(n.type==="msubsup"&&n.data[n.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var m="";this.i--;do{m+=this.PRIME;this.i++,o=this.GetNext()}while(o==="'"||o===this.SMARTQUOTE);m=["","\u2032","\u2033","\u2034","\u2057"][m.length]||m;this.Push(b.prime(n,this.mmlToken(i.mo(m))))},mi2mo:function(m){var n=i.mo();n.Append.apply(n,m.data);var o;for(o in n.defaults){if(n.defaults.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}for(o in i.copyAttributes){if(i.copyAttributes.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}n.lspace=n.rspace="0";n.useMMLspacing&=~(n.SPACE_ATTR.lspace|n.SPACE_ATTR.rspace);return n},Comment:function(m){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(n,p,v,r,u,o,m,w,t){var s=this.GetNext();if(s===""){d.Error(["MissingArgFor","Missing argument for %1",n])}if(s==="{"){this.i++}else{this.string=s+"}"+this.string.slice(this.i+1);this.i=0}var q=b.array().With({requireClose:true,arraydef:{rowspacing:(o||"4pt"),columnspacing:(u||"1em")}});if(w){q.isCases=true}if(t){q.isNumbered=true;q.arraydef.side=t}if(p||v){q.open=p;q.close=v}if(m==="D"){q.arraydef.displaystyle=true}if(r!=null){q.arraydef.columnalign=r}this.Push(q)},Entry:function(p){this.Push(b.cell().With({isEntry:true,name:p}));if(this.stack.Top().isCases){var o=this.string;var s=0,q=this.i,n=o.length;while(qd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(q[0]&&this[q[0]]){n=this[q[0]].apply(this,[n].concat(q.slice(2)))}}this.Push(n)},envFindName:function(m){return g.environment[m]},Equation:function(m,n){return n},ExtensionEnv:function(n,m){this.Extension(n.name,m,"environment")},Array:function(n,p,u,s,t,o,m,q){if(!s){s=this.GetArgument("\\begin{"+n.name+"}")}var v=("c"+s).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");s=s.replace(/[^clr]/g,"").split("").join(" ");s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var r=b.array().With({arraydef:{columnalign:s,columnspacing:(t||"1em"),rowspacing:(o||"4pt")}});if(v.match(/[|:]/)){if(v.charAt(0).match(/[|:]/)){r.frame.push("left");r.frame.dashed=v.charAt(0)===":"}if(v.charAt(v.length-1).match(/[|:]/)){r.frame.push("right")}v=v.substr(1,v.length-2);r.arraydef.columnlines=v.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(p){r.open=this.convertDelimiter(p)}if(u){r.close=this.convertDelimiter(u)}if(m==="D"){r.arraydef.displaystyle=true}else{if(m){r.arraydef.displaystyle=false}}if(m==="S"){r.arraydef.scriptlevel=1}if(q){r.arraydef.useHeight=false}this.Push(n);return r},AlignedArray:function(m){var n=this.GetBrackets("\\begin{"+m.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),n)},setArrayAlign:function(n,m){m=this.trimSpaces(m||"");if(m==="t"){n.arraydef.align="baseline 1"}else{if(m==="b"){n.arraydef.align="baseline -1"}else{if(m==="c"){n.arraydef.align="center"}else{if(m){n.arraydef.align=m}}}}return n},convertDelimiter:function(m){if(m){m=g.delimiter[m]}if(m==null){return null}if(f(m)){m=m[0]}if(m.length===4){m=String.fromCharCode(parseInt(m,16))}return m},trimSpaces:function(n){if(typeof(n)!="string"){return n}var m=n.replace(/^\s+|\s+$/g,"");if(m.match(/\\$/)&&n.match(/ $/)){m+=" "}return m},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var m=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(m){this.i+=m[1].length;return m[1]}else{this.i++;return" "}},GetArgument:function(n,o){switch(this.GetNext()){case"":if(!o){d.Error(["MissingArgFor","Missing argument for %1",n])}return null;case"}":if(!o){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var m=++this.i,p=1;while(this.i1){n=[i.mrow.apply(i,n)]}}return n},InternalText:function(n,m){n=n.replace(/^\s+/,h).replace(/\s+$/,h);return i.mtext(i.chars(n)).With(m)},SubstituteArgs:function(n,m){var q="";var p="";var r;var o=0;while(on.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}p=this.AddArgs(this.AddArgs(p,q),n[r-1]);q=""}}else{q+=r}}}return this.AddArgs(p,q)},AddArgs:function(n,m){if(m.match(/^[a-z]/i)&&n.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){n+=" "}if(n.length+m.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return n+m}});d.Augment({Stack:e,Parse:a,Definitions:g,Startup:l,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(m){var n,o=false,q=MathJax.HTML.getScript(m);var s=(m.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var r={math:q,display:s,script:m};var t=this.prefilterHooks.Execute(r);if(t){return t}q=r.math;try{n=d.Parse(q).mml()}catch(p){if(!p.texError){throw p}n=this.formatError(p,q,s,m);o=true}if(n.isa(i.mtable)&&n.displaystyle==="inherit"){n.displaystyle=s}if(n.inferred){n=i.apply(MathJax.ElementJax,n.data)}else{n=i(n)}if(s){n.root.display="block"}if(o){n.texError=true}r.math=n;return this.postfilterHooks.Execute(r)||r.math},prefilterMath:function(n,o,m){return n},postfilterMath:function(n,o,m){this.combineRelations(n.root);return n},formatError:function(p,o,q,m){var n=p.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",n,o,q,m]);return i.Error(n)},Error:function(m){if(f(m)){m=k.apply(k,m)}throw c.Insert(Error(m),{texError:true})},Macro:function(m,n,o){g.macros[m]=["Macro"].concat([].slice.call(arguments,1));g.macros[m].isUser=true},fenced:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.INNER});m.Append(i.mo(o).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.OPEN}),n,i.mo(p).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.CLOSE}));return m},fixedFence:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.ORD});if(o){m.Append(this.mathPalette(o,"l"))}if(n.type==="mrow"){m.Append.apply(m,n.data)}else{m.Append(n)}if(p){m.Append(this.mathPalette(p,"r"))}return m},mathPalette:function(p,n){if(p==="{"||p==="}"){p="\\"+p}var o="{\\bigg"+n+" "+p+"}",m="{\\big"+n+" "+p+"}";return d.Parse("\\mathchoice"+o+m+m+m,{}).mml()},combineRelations:function(q){var r,n,p,o;for(r=0,n=q.data.length;r0){p+="rl";o.push("0em 0em");q--}o=o.join(" ");if(i){return this.AMSarray(l,j,i,p,o)}var m=this.AMSarray(l,j,i,p,o);return this.setArrayAlign(m,k)},EquationBegin:function(i,j){this.checkEqnEnv();this.stack.global.forcetag=(j&&a.autoNumber!=="none");return i},EquationStar:function(i,j){this.stack.global.tagged=true;return j},checkEqnEnv:function(){if(this.stack.global.eqnenv){h.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(j,m){var l=this.GetNext();if(l==="\\"){var k=this.i;l=this.GetArgument(j);this.i=k;if(l==="\\limits"){if(j==="\\idotsint"){m="\\!\\!\\mathop{\\,\\,"+m+"}"}else{m="\\!\\!\\!\\mathop{\\,\\,\\,"+m+"}"}}}this.string=m+" "+this.string.slice(this.i);this.i=0},xArrow:function(k,o,n,i){var m={width:"+"+(n+i)+"mu",lspace:n+"mu"};var p=this.GetBrackets(k),q=this.ParseArg(k);var s=b.mo(b.chars(String.fromCharCode(o))).With({stretchy:true,texClass:b.TEXCLASS.REL});var j=b.munderover(s);j.SetData(j.over,b.mpadded(q).With(m).With({voffset:".15em"}));if(p){p=h.Parse(p,this.stack.env).mml();j.SetData(j.under,b.mpadded(p).With(m).With({voffset:"-.24em"}))}this.Push(j.With({subsupOK:true}))},GetDelimiterArg:function(i){var j=this.trimSpaces(this.GetArgument(i));if(j==""){return null}if(j in d.delimiter){return j}h.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",i])},GetStar:function(){var i=(this.GetNext()==="*");if(i){this.i++}return i}});f.Augment({autoTag:function(){var j=this.global;if(!j.notag){g.number++;j.tagID=a.formatNumber(g.number.toString());var i=h.Parse("\\text{"+a.formatTag(j.tagID)+"}",{}).mml();j.tag=b.mtd(i).With({id:a.formatID(j.tagID)})}},getTag:function(){var m=this.global,k=m.tag;m.tagged=true;if(m.label){if(a.useLabelIds){k.id=a.formatID(m.label)}g.eqlabels[m.label]={tag:m.tagID,id:k.id}}if(document.getElementById(k.id)||g.IDs[k.id]||g.eqIDs[k.id]){var l=0,j;do{l++;j=k.id+"_"+l}while(document.getElementById(j)||g.IDs[j]||g.eqIDs[j]);k.id=j;if(m.label){g.eqlabels[m.label].id=j}}g.eqIDs[k.id]=1;this.clearTag();return k},clearTag:function(){var i=this.global;delete i.tag;delete i.tagID;delete i.label},fixInitialMO:function(l){for(var k=0,j=l.length;k *":{display:"table-row!important"},".MJXp-surd":{"vertical-align":"top"},".MJXp-surd > *":{display:"block!important"},".MJXp-script-box > * ":{display:"table!important",height:"50%"},".MJXp-script-box > * > *":{display:"table-cell!important","vertical-align":"top"},".MJXp-script-box > *:last-child > *":{"vertical-align":"bottom"},".MJXp-script-box > * > * > *":{display:"block!important"},".MJXp-mphantom":{visibility:"hidden"},".MJXp-munderover":{display:"inline-table!important"},".MJXp-over":{display:"inline-block!important","text-align":"center"},".MJXp-over > *":{display:"block!important"},".MJXp-munderover > *":{display:"table-row!important"},".MJXp-mtable":{"vertical-align":".25em",margin:"0 .125em"},".MJXp-mtable > *":{display:"inline-table!important","vertical-align":"middle"},".MJXp-mtr":{display:"table-row!important"},".MJXp-mtd":{display:"table-cell!important","text-align":"center",padding:".5em 0 0 .5em"},".MJXp-mtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-mlabeledtr":{display:"table-row!important"},".MJXp-mlabeledtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mlabeledtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"}};(function(){for(var n=0;n<10;n++){var o="scaleX(."+n+")";m[".MJXp-scale"+n]={"-webkit-transform":o,"-moz-transform":o,"-ms-transform":o,"-o-transform":o,transform:o}}})();var k=1000000;var c="V",l="H";g.Augment({settings:b.config.menuSettings,config:{styles:m},hideProcessedMath:false,maxStretchyParts:1000,Config:function(){if(!this.require){this.require=[]}this.SUPER(arguments).Config.call(this);var n=this.settings;if(n.scale){this.config.scale=n.scale}this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){j=MathJax.Extension.MathEvents.Event;a=MathJax.Extension.MathEvents.Touch;d=MathJax.Extension.MathEvents.Hover;this.ContextMenu=j.ContextMenu;this.Mousedown=j.AltContextMenu;this.Mouseover=d.Mouseover;this.Mouseout=d.Mouseout;this.Mousemove=d.Mousemove;var n=e.addElement(document.body,"div",{style:{width:"5in"}});this.pxPerInch=n.offsetWidth/5;n.parentNode.removeChild(n);return i.Styles(this.config.styles,["InitializePHTML",this])},InitializePHTML:function(){},preTranslate:function(p){var s=p.jax[this.id],t,q=s.length,u,r,v,o,n;for(t=0;tthis.PHTML.h){this.PHTML.h=q.PHTML.h}if(q.PHTML.d>this.PHTML.d){this.PHTML.d=q.PHTML.d}if(q.PHTML.t>this.PHTML.t){this.PHTML.t=q.PHTML.t}if(q.PHTML.b>this.PHTML.b){this.PHTML.b=q.PHTML.b}}}else{if(n.forceChild){e.addElement(p,"span")}}},PHTMLstretchChild:function(q,p,s){var r=this.data[q];if(r&&r.PHTMLcanStretch("Vertical",p,s)){var t=this.PHTML,o=r.PHTML,n=o.w;r.PHTMLstretchV(p,s);t.w+=o.w-n;if(o.h>t.h){t.h=o.h}if(o.d>t.d){t.d=o.d}}},PHTMLcreateSpan:function(n){if(!this.PHTML){this.PHTML={}}this.PHTML={w:0,h:0,d:0,l:0,r:0,t:0,b:0};if(this.inferred){return n}if(this.type==="mo"&&this.data.join("")==="\u222B"){g.lastIsInt=true}else{if(this.type!=="mspace"||this.width!=="negativethinmathspace"){g.lastIsInt=false}}if(!this.PHTMLspanID){this.PHTMLspanID=g.GetID()}var o=(this.id||"MJXp-Span-"+this.PHTMLspanID);return e.addElement(n,"span",{className:"MJXp-"+this.type,id:o})},PHTMLspanElement:function(){if(!this.PHTMLspanID){return null}return document.getElementById(this.id||"MJXp-Span-"+this.PHTMLspanID)},PHTMLhandleToken:function(o){var n=this.getValues("mathvariant");if(n.mathvariant!==h.VARIANT.NORMAL){o.className+=" "+g.VARIANT[n.mathvariant]}},PHTMLhandleStyle:function(n){if(this.style){n.style.cssText=this.style}},PHTMLhandleColor:function(n){if(this.mathcolor){n.style.color=this.mathcolor}if(this.mathbackground){n.style.backgroundColor=this.mathbackground}},PHTMLhandleScriptlevel:function(n){var o=this.Get("scriptlevel");if(o){n.className+=" MJXp-script"}},PHTMLhandleText:function(y,A){var v,p;var z=0,o=0,q=0;for(var s=0,r=A.length;s=55296&&p<56319){s++;p=(((p-55296)<<10)+(A.charCodeAt(s)-56320))+65536}var t=0.7,u=0.22,x=0.5;if(p<127){if(v.match(/[A-Za-ehik-or-xz0-9]/)){u=0}if(v.match(/[A-HK-Z]/)){x=0.67}else{if(v.match(/[IJ]/)){x=0.36}}if(v.match(/[acegm-su-z]/)){t=0.45}else{if(v.match(/[ij]/)){t=0.75}}if(v.match(/[ijlt]/)){x=0.28}}if(g.DELIMITERS[v]){x=g.DELIMITERS[v].w||0.4}if(t>z){z=t}if(u>o){o=u}q+=x}if(!this.CHML){this.PHTML={}}this.PHTML={h:0.9,d:0.3,w:q,l:0,r:0,t:z,b:o};e.addText(y,A)},PHTMLbboxFor:function(o){if(this.data[o]&&this.data[o].PHTML){return this.data[o].PHTML}return{w:0,h:0,d:0,l:0,r:0,t:0,b:0}},PHTMLcanStretch:function(q,o,p){if(this.isEmbellished()){var n=this.Core();if(n&&n!==this){return n.PHTMLcanStretch(q,o,p)}}return false},PHTMLstretchV:function(n,o){},PHTMLstretchH:function(n){},CoreParent:function(){var n=this;while(n&&n.isEmbellished()&&n.CoreMO()===this&&!n.isa(h.math)){n=n.Parent()}return n},CoreText:function(n){if(!n){return""}if(n.isEmbellished()){return n.CoreMO().data.join("")}while((n.isa(h.mrow)||n.isa(h.TeXAtom)||n.isa(h.mstyle)||n.isa(h.mphantom))&&n.data.length===1&&n.data[0]){n=n.data[0]}if(!n.isToken){return""}else{return n.data.join("")}}});h.chars.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.entity.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.math.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n);if(this.Get("display")==="block"){n.className+=" MJXp-display"}return n}});h.mo.Augment({toPreviewHTML:function(o){o=this.PHTMLdefaultSpan(o);this.PHTMLadjustAccent(o);var n=this.getValues("lspace","rspace","scriptlevel","displaystyle","largeop");if(n.scriptlevel===0){this.PHTML.l=g.length2em(n.lspace);this.PHTML.r=g.length2em(n.rspace);o.style.marginLeft=g.Em(this.PHTML.l);o.style.marginRight=g.Em(this.PHTML.r)}else{this.PHTML.l=0.15;this.PHTML.r=0.1}if(n.displaystyle&&n.largeop){var p=e.Element("span",{className:"MJXp-largeop"});p.appendChild(o.firstChild);o.appendChild(p);this.PHTML.h*=1.2;this.PHTML.d*=1.2;if(this.data.join("")==="\u222B"){p.className+=" MJXp-int"}}return o},PHTMLadjustAccent:function(p){var o=this.CoreParent();if(o&&o.isa(h.munderover)&&this.CoreText(o.data[o.base]).length===1){var q=o.data[o.over],n=o.data[o.under];var s=this.data.join(""),r;if(q&&this===q.CoreMO()&&o.Get("accent")){r=g.REMAPACCENT[s]}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=g.REMAPACCENTUNDER[s]}}if(r){s=p.innerHTML=r}if(s.match(/[\u02C6-\u02DC\u00A8]/)){this.PHTML.acc=-0.52}else{if(s==="\u2192"){this.PHTML.acc=-0.15;this.PHTML.vec=true}}}},PHTMLcanStretch:function(q,o,p){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}r=g.DELIMITERS[r];var n=(r&&r.dir===q.substr(0,1));if(n){n=(this.PHTML.h!==o||this.PHTML.d!==p||(this.Get("minsize",true)||this.Get("maxsize",true)))}return n},PHTMLstretchV:function(p,u){var o=this.PHTMLspanElement(),t=this.PHTML;var n=this.getValues("symmetric","maxsize","minsize");if(n.symmetric){l=2*Math.max(p-0.25,u+0.25)}else{l=p+u}n.maxsize=g.length2em(n.maxsize,t.h+t.d);n.minsize=g.length2em(n.minsize,t.h+t.d);l=Math.max(n.minsize,Math.min(n.maxsize,l));var s=l/(t.h+t.d-0.3);var q=e.Element("span",{style:{"font-size":g.Em(s)}});if(s>1.25){var r=Math.ceil(1.25/s*10);q.className="MJXp-right MJXp-scale"+r;q.style.marginLeft=g.Em(t.w*(r/10-1)+0.07);t.w*=s*r/10}q.appendChild(o.firstChild);o.appendChild(q);if(n.symmetric){o.style.verticalAlign=g.Em(0.25*(1-s))}}});h.mspace.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q);var o=this.getValues("height","depth","width");var n=g.length2em(o.width),p=g.length2em(o.height),s=g.length2em(o.depth);var r=this.PHTML;r.w=n;r.h=p;r.d=s;if(n<0){if(!g.lastIsInt){q.style.marginLeft=g.Em(n)}n=0}q.style.width=g.Em(n);q.style.height=g.Em(p+s);if(s){q.style.verticalAlign=g.Em(-s)}return q}});h.mpadded.Augment({toPreviewHTML:function(u){u=this.PHTMLdefaultSpan(u,{childSpans:true,className:"MJXp-box",forceChild:true});var o=u.firstChild;var v=this.getValues("width","height","depth","lspace","voffset");var s=this.PHTMLdimen(v.lspace);var q=0,n=0,t=s.len,r=-s.len,p=0;if(v.width!==""){s=this.PHTMLdimen(v.width,"w",0);if(s.pm){r+=s.len}else{u.style.width=g.Em(s.len)}}if(v.height!==""){s=this.PHTMLdimen(v.height,"h",0);if(!s.pm){q+=-this.PHTMLbboxFor(0).h}q+=s.len}if(v.depth!==""){s=this.PHTMLdimen(v.depth,"d",0);if(!s.pm){n+=-this.PHTMLbboxFor(0).d;p+=-s.len}n+=s.len}if(v.voffset!==""){s=this.PHTMLdimen(v.voffset);q-=s.len;n+=s.len;p+=s.len}if(q){o.style.marginTop=g.Em(q)}if(n){o.style.marginBottom=g.Em(n)}if(t){o.style.marginLeft=g.Em(t)}if(r){o.style.marginRight=g.Em(r)}if(p){u.style.verticalAlign=g.Em(p)}return u},PHTMLdimen:function(q,r,n){if(n==null){n=-k}q=String(q);var o=q.match(/width|height|depth/);var p=(o?this.PHTML[o[0].charAt(0)]:(r?this.PHTML[r]:0));return{len:g.length2em(q,p)||0,pm:!!q.match(/^[-+]/)}}});h.munderover.Augment({toPreviewHTML:function(r){var t=this.getValues("displaystyle","accent","accentunder","align");var n=this.data[this.base];if(!t.displaystyle&&n!=null&&(n.movablelimits||n.CoreMO().Get("movablelimits"))){r=h.msubsup.prototype.toPreviewHTML.call(this,r);r.className=r.className.replace(/munderover/,"msubsup");return r}r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"",noBBox:true});var p=this.PHTMLbboxFor(this.over),v=this.PHTMLbboxFor(this.under),u=this.PHTMLbboxFor(this.base),s=this.PHTML,o=p.acc;if(this.data[this.over]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=p.l=r.lastChild.firstChild.style.marginRight=p.r=0}var q=e.Element("span",{},[["span",{className:"MJXp-over"}]]);q.firstChild.appendChild(r.lastChild);if(r.childNodes.length>(this.data[this.under]?1:0)){q.firstChild.appendChild(r.firstChild)}this.data[this.over].PHTMLhandleScriptlevel(q.firstChild.firstChild);if(o!=null){if(p.vec){q.firstChild.firstChild.firstChild.style.fontSize="60%";p.h*=0.6;p.d*=0.6;p.w*=0.6}o=o-p.d+0.1;if(u.t!=null){o+=u.t-u.h}q.firstChild.firstChild.style.marginBottom=g.Em(o)}if(r.firstChild){r.insertBefore(q,r.firstChild)}else{r.appendChild(q)}}if(this.data[this.under]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=v.l=r.lastChild.firstChild.marginRight=v.r=0}this.data[this.under].PHTMLhandleScriptlevel(r.lastChild)}s.w=Math.max(0.8*p.w,0.8*v.w,u.w);s.h=0.8*(p.h+p.d+(o||0))+u.h;s.d=u.d+0.8*(v.h+v.d);return r}});h.msubsup.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{noBBox:true});if(!this.data[this.base]){if(q.firstChild){q.insertBefore(e.Element("span"),q.firstChild)}else{q.appendChild(e.Element("span"))}}var s=this.data[this.base],p=this.data[this.sub],n=this.data[this.sup];if(!s){s={bbox:{h:0.8,d:0.2}}}q.firstChild.style.marginRight=".05em";var o=Math.max(0.4,s.PHTML.h-0.4),u=Math.max(0.2,s.PHTML.d+0.1);var t=this.PHTML;if(n&&p){var r=e.Element("span",{className:"MJXp-script-box",style:{height:g.Em(o+n.PHTML.h*0.8+u+p.PHTML.d*0.8),"vertical-align":g.Em(-u-p.PHTML.d*0.8)}},[["span",{},[["span",{},[["span",{style:{"margin-bottom":g.Em(-(n.PHTML.d-0.05))}}]]]]],["span",{},[["span",{},[["span",{style:{"margin-top":g.Em(-(n.PHTML.h-0.05))}}]]]]]]);p.PHTMLhandleScriptlevel(r.firstChild);n.PHTMLhandleScriptlevel(r.lastChild);r.firstChild.firstChild.firstChild.appendChild(q.lastChild);r.lastChild.firstChild.firstChild.appendChild(q.lastChild);q.appendChild(r);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+Math.max(n.PHTML.w,p.PHTML.w)+0.07}else{if(n){q.lastChild.style.verticalAlign=g.Em(o);n.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,n.PHTML.d*0.8-o);t.w=s.PHTML.w+n.PHTML.w+0.07}else{if(p){q.lastChild.style.verticalAlign=g.Em(-u);p.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,p.PHTML.h*0.8-u);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+p.PHTML.w+0.07}}}return q}});h.mfrac.Augment({toPreviewHTML:function(r){r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var o=this.getValues("linethickness","displaystyle");if(!o.displaystyle){if(this.data[0]){this.data[0].PHTMLhandleScriptlevel(r.firstChild)}if(this.data[1]){this.data[1].PHTMLhandleScriptlevel(r.lastChild)}}var n=e.Element("span",{className:"MJXp-box"},[["span",{className:"MJXp-denom"},[["span",{},[["span",{className:"MJXp-rule",style:{height:"1em"}}]]],["span"]]]]);n.firstChild.lastChild.appendChild(r.lastChild);r.appendChild(n);var s=this.PHTMLbboxFor(0),p=this.PHTMLbboxFor(1),v=this.PHTML;v.w=Math.max(s.w,p.w)*0.8;v.h=s.h+s.d+0.1+0.25;v.d=p.h+p.d-0.25;v.l=v.r=0.125;o.linethickness=Math.max(0,g.length2em(o.linethickness||"0",0));if(o.linethickness){var u=n.firstChild.firstChild.firstChild;var q=g.Em(o.linethickness);u.style.borderTop="none";u.style.borderBottom=(o.linethickness<0.15?"1px":q)+" solid";u.style.margin=q+" 0";q=o.linethickness;n.style.marginTop=g.Em(3*q-1.2);r.style.verticalAlign=g.Em(1.5*q+0.1);v.h+=1.5*q-0.1;v.d+=1.5*q}else{n.style.marginTop="-.7em"}return r}});h.msqrt.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});this.PHTMLlayoutRoot(n,n.firstChild);return n},PHTMLlayoutRoot:function(u,n){var v=this.PHTMLbboxFor(0);var q=Math.ceil((v.h+v.d+0.14)*100),w=g.Em(14/q);var r=e.Element("span",{className:"MJXp-surd"},[["span",{style:{"font-size":q+"%","margin-top":w}},["\u221A"]]]);var s=e.Element("span",{className:"MJXp-root"},[["span",{className:"MJXp-rule",style:{"border-top":".08em solid"}}]]);var p=(1.2/2.2)*q/100;if(q>150){var o=Math.ceil(150/q*10);r.firstChild.className="MJXp-right MJXp-scale"+o;r.firstChild.style.marginLeft=g.Em(p*(o/10-1)/q*100);p=p*o/10;s.firstChild.style.borderTopWidth=g.Em(0.08/Math.sqrt(o/10))}s.appendChild(n);u.appendChild(r);u.appendChild(s);this.PHTML.h=v.h+0.18;this.PHTML.d=v.d;this.PHTML.w=v.w+p;return u}});h.mroot.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var p=this.PHTMLbboxFor(1),n=q.removeChild(q.lastChild);var t=this.PHTMLlayoutRoot(e.Element("span"),q.firstChild);n.className="MJXp-script";var u=parseInt(t.firstChild.firstChild.style.fontSize);var o=0.55*(u/120)+p.d*0.8,s=-0.6*(u/120);if(u>150){s*=0.95*Math.ceil(150/u*10)/10}n.style.marginRight=g.Em(s);n.style.verticalAlign=g.Em(o);if(-s>p.w*0.8){n.style.marginLeft=g.Em(-s-p.w*0.8)}q.appendChild(n);q.appendChild(t);this.PHTML.w+=Math.max(0,p.w*0.8+s);this.PHTML.h=Math.max(this.PHTML.h,p.h*0.8+o);return q},PHTMLlayoutRoot:h.msqrt.prototype.PHTMLlayoutRoot});h.mfenced.Augment({toPreviewHTML:function(q){q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);this.addFakeNodes();this.PHTMLaddChild(q,"open",{});for(var p=0,n=this.data.length;ps){s=x.w}}}var o=this.PHTML;o.w=s;o.h=y/2+0.25;o.d=y/2-0.25;o.l=o.r=0.125;return E}});h.mlabeledtr.Augment({PHTMLdefaultSpan:function(q,o){if(!o){o={}}q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);if(this.isToken){this.PHTMLhandleToken(q)}for(var p=1,n=this.data.length;p/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])}); +MathJax.Ajax.loadComplete("[MathJax]/config/TeX-AMS_HTML.js"); diff --git a/rhodecode/public/js/src/math_jax/config/default.js b/rhodecode/public/js/src/math_jax/config/default.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/config/default.js @@ -0,0 +1,1117 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ + +/************************************************************* + * + * MathJax/config/default.js + * + * This configuration file is loaded when you load MathJax + * via + * + * Use it to customize the MathJax settings. See comments below. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2009-2016 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. + */ + + +/* + * This file lists most, but not all, of the options that can be set for + * MathJax and its various components. Some additional options are + * available, however, and are listed in the various links at: + * + * http://www.mathjax.org/resources/docs/?configuration.html#configuration-options-by-component + * + * You can add these to the configuration object below if you + * want to change them from their default values. + */ + +MathJax.Hub.Config({ + + // + // A comma-separated list of configuration files to load + // when MathJax starts up. E.g., to define local macros, etc. + // The default directory is the MathJax/config directory. + // + // Example: config: ["local/local.js"], + // Example: config: ["local/local.js","MMLtoHTML.js"], + // + config: [], + + // + // A comma-separated list of CSS stylesheet files to be loaded + // when MathJax starts up. The default directory is the + // MathJax/config directory. + // + // Example: styleSheets: ["MathJax.css"], + // + styleSheets: [], + + // + // Styles to be defined dynamically at startup time. + // + // Example: + // styles: { + // ".MathJax_Preview": { + // color: "#888" + // } + // }, + // + styles: {}, + + // + // A comma-separated list of input and output jax to initialize at startup. + // Their main code is loaded only when they are actually used, so it is not + // inefficient to include jax that may not actually be used on the page. These + // are found in the MathJax/jax directory. The choices include + // + // input/TeX + // input/MathML + // input/AsciiMath + // + // output/HTML-CSS + // output/NativeMML + // output/SVG + // + // If you change the input jax, you may need to include the appropriate + // preprocessor in the extensions array below. + // + jax: ["input/TeX", "output/HTML-CSS"], + + // + // A comma-separated list of extensions to load at startup. The default + // directory is MathJax/extensions. + // + // Example: extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"], + // + // You may wish to include "mml2jax.js" if you are using "input/MathML" in the + // jax array above, and "asciimath2jax.js" if you using "input/AsciiMath". + // Include "jsmath2jax.js" if you are converting from using jsMath to MathJax. + // + extensions: ["tex2jax.js"], + + // + // Patterns to remove from before and after math script tags. If you are not + // using one of the preprocessors (e.g., tex2jax), you need to insert something + // extra into your HTML file in order to avoid a bug in Internet Explorer. IE + // removes spaces from the DOM that it thinks are redundent, and since a SCRIPT + // tag usually doesn't add content to the page, if there is a space before and after + // a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts + // the typeset mathematics, this means there will be no space before it and the + // preceeding text. In order to avoid this, you should include some "guard characters" + // before or after the math SCRIPT tag; define the patterns you want to use below. + // Note that these are used as regular expressions, so you will need to quote + // special characters. Furthermore, since they are javascript strings, you must + // quote javascript special characters as well. So to obtain a backslash, you must + // use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the + // regular expression. That means that if you want an actual backslash in your + // guard characters, you need to use "\\\\" in order to get \\ in the regular + // expression, and \ in the actual text. If both preJax and postJax are defined, + // both must be present in order to be removed. + // + // See also the preRemoveClass comments below. + // + // Example: + // preJax: "\\\\\\\\", // makes a double backslash the preJax text + // or + // preJax: "\\[\\[", // jax scripts must be enclosed in double brackets + // postJax: "\\]\\]", + // + preJax: null, + postJax: null, + + // + // The CSS class for a math preview to be removed preceeding a MathJax + // SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this + // class, its contents are removed when MathJax processes the SCRIPT + // tag. This allows you to include a math preview in a form that will + // be displayed prior to MathJax performing its typesetting. It also + // avoids the Internet Explorer space-removal bug, and can be used in + // place of preJax and postJax if that is more convenient. + // + // For example + // + // [math] + // + // would display "[math]" in place of the math until MathJax is able to typeset it. + // + preRemoveClass: "MathJax_Preview", + + // + // This value controls whether the "Processing Math: nn%" message are displayed + // in the lower left-hand corner. Set to "false" to prevent those messages (though + // file loading and other messages will still be shown). + // + showProcessingMessages: true, + + // + // This value controls the verbosity of the messages in the lower left-hand corner. + // Set it to "none" to eliminate all messages, or set it to "simple" to show + // "Loading..." and "Processing..." rather than showing the full file name and the + // percentage of the mathematics processed. + // + messageStyle: "normal", + + // + // These two parameters control the alignment and shifting of displayed equations. + // The first can be "left", "center", or "right", and determines the alignment of + // displayed equations. When the alignment is not "center", the second determines + // an indentation from the left or right side for the displayed equations. When + // the alignment is "center", the indent allows you to shift the center to the right + // or left (negative is left). + // + displayAlign: "center", + displayIndent: "0", + + // + // Normally MathJax will perform its starup commands (loading of + // configuration, styles, jax, and so on) as soon as it can. If you + // expect to be doing additional configuration on the page, however, you + // may want to have it wait until the page's onload hander is called. If so, + // set this to "onload". + // + delayStartupUntil: "none", + + // + // Normally MathJax will typeset the mathematics on the page as soon as + // the page is loaded. If you want to delay that process, in which case + // you will need to call MathJax.Hub.Typeset() yourself by hand, set + // this value to true. + // + skipStartupTypeset: false, + + // + // A list of element ID's that are the ones to process for mathematics + // when any of the Hub typesetting calls (Typeset, Process, Update, etc) + // are called with no element specified. This lets you restrict the + // processing to particular containers rather than scanning the entire + // document for mathematics. If none are supplied, the entire document + // is processed. + // + elements: [], + + // + // Since typesetting usually changes the vertical dimensions of the + // page, if the URL contains an anchor position you may no longer be + // positioned at the correct position on the page, so MathJax can + // reposition to that location after it completes its initial + // typesetting of the page. This value controls whether MathJax will + // reposition the browser to the #hash location from the page URL after + // typesetting for the page. + // + positionToHash: true, + + // + // These control whether to attach the MathJax contextual menu to the + // expressions typeset by MathJax. Since the code for handling + // MathPlayer in Internet Explorer is somewhat delicate, it is + // controlled separately via (showMathMenuMSIE). The latter is now + // deprecated in favor of the MathJax contextual menu settings for + // MathPlayer. + // + // These values used to be listed in the separate output jax, but + // have been moved to this more central location since they are shared + // by all output jax. + // + showMathMenu: true, + showMathMenuMSIE: true, + + + // + // The default settings for the MathJax contextual menu (overridden by + // the MathJax cookie when users change the menu settings). + // + menuSettings: { + zoom: "None", // when to do MathZoom + CTRL: false, // require CTRL for MathZoom? + ALT: false, // require Alt or Option? + CMD: false, // require CMD? + Shift: false, // require Shift? + discoverable: false, // make math menu discoverable on hover? + zscale: "200%", // the scaling factor for MathZoom + renderer: null, // set when Jax are loaded + font: "Auto", // what font HTML-CSS should use + context: "MathJax", // or "Browser" for pass-through to browser menu + locale: null, // the language to use for messages + mpContext: false, // true means pass menu events to MathPlayer in IE + mpMouse: false, // true means pass mouse events to MathPlayer in IE + texHints: true, // include class names for TeXAtom elements + FastPreview: null, // use PreviewHTML output as preview? + assistiveMML: null, // include hidden MathML for screen readers? + inTabOrder: true, // set to true if math elements should be included in the tabindex + semantics: false // add semantics tag with original form in MathML output + }, + + // + // The message and style for when there is a processing error handling + // the mathematics (something has gone wrong with the input or output + // jax that prevents it from operating properly). + // + errorSettings: { + message: ["[",["MathProcessingError","Math Processing Error"],"]"], + style: {color: "#CC0000", "font-style":"italic"} // style for message + }, + + + //============================================================================ + // + // These parameters control the tex2jax preprocessor (when you have included + // "tex2jax.js" in the extensions list above). + // + tex2jax: { + + // + // The delimiters that surround in-line math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + inlineMath: [ +// ['$','$'], // uncomment this for standard TeX math delimiters + ['\\(','\\)'] + ], + + // + // The delimiters that surround displayed math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + displayMath: [ + ['$$','$$'], + ['\\[','\\]'] + ], + + // + // This value determines whether tex2jax requires braces to be + // balanced within math delimiters (which allows for nested dollar + // signs). Set to false to get pre-v2.0 compatibility. When true, + // + // $y = x^2 \hbox{ when $x > 2$}$. + // + // will be properly handled as a single expression. When false, it + // would be interpreted as two searpate expressions, each with + // improperly balanced braces. + // + balanceBraces: true, + + // + // This array lists the names of the tags whose contents should not be + // processed by tex2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by tex2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceeded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `tex2jax` from processing its contents. + // + ignoreClass: "tex2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by tex2jax. This is used to turn on processing within + // tags that have been marked as ignored or skipped above. Note that + // this is a regular expression, and so you need to be sure to quote + // any regexp special characters. The pattern is automatically + // preceeded by '(^| )(' and followed by ')( |$)', so your pattern + // will have to match full words in the class name. Use this to + // restart processing within an element that has been marked as + // ignored above. + // + processClass: "tex2jax_process", + + // + // Set to "true" to allow \$ to produce a dollar without starting in-line + // math mode. If you uncomment the ['$','$'] line above, you should change + // this to true so that you can insert plain dollar signs into your documents + // + processEscapes: false, + + // + // Controls whether tex2jax processes LaTeX environments outside of math + // mode. Set to "false" to prevent processing of environments except within + // math mode. + // + processEnvironments: true, + + // + // Controls whether tex2jax processes \ref{...} commands outside + // of math mode. Set to "false" to prevent processing of \ref + // except within math mode. + // + processRefs: true, + + // + // Controls whether tex2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "TeX", which + // means use the TeX code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the asciimath2jax preprocessor (when you have included + // "asciimath2jax.js" in the extensions list above). + // + asciimath2jax: { + + // + // The delimiters that surround asciimath expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // + delimiters: [ + ['`','`'] + ], + + // + // This array lists the names of the tags whose contents should not be + // processed by asciimath2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by asciimath2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceeded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `asciimath2jax` from processing its contents. + // + ignoreClass: "asciimath2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by asciimath2jax. This is used to turn on processing + // within tags that have been marked as ignored or skipped above. + // Note that this is a regular expression, and so you need to be sure + // to quote any regexp special characters. The pattern is + // automatically preceeded by '(^| )(' and followed by ')( |$)', so + // your pattern will have to match full words in the class name. Use + // this to restart processing within an element that has been marked + // as ignored above. + // + processClass: "asciimath2jax_process", + + // Controls whether asciimath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "AsciiMath", which + // means use the AsciiMath code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "AsciiMath" + + }, + + //============================================================================ + // + // These parameters control the mml2jax preprocessor (when you have included + // "mml2jax.js" in the extensions list above). + // + mml2jax: { + + // + // Controls whether mml2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "mathml" which means use + // the tag as the preview (until it is processed by MathJax). + // Set to "alttext", to use the tag's alttext attribute as the + // preview, if the tag has one. Set to "none" to + // prevent the previews from being inserted (the math will simply + // disappear until it is typeset). Set to "altimg" to use an image + // described by the altimg* attributes of the element. + // Set to an array containing the + // description of an HTML snippet in order to use the same preview for + // all equations on the page (e.g., you could have it say "[math]" or + // load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "mathml" + + }, + + //============================================================================ + // + // These parameters control the jsMath2jax preprocessor (when you have included + // "jsMath2jax.js" in the extensions list above). + // + jsMath2jax: { + + // + // Controls whether jsMath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "TeX", which means use the + // TeX code as the preview (until it is processed by MathJax). Set to + // "none" to prevent the previews from being inserted (the math will + // simply disappear until it is typeset). Set to an array containing + // the description of an HTML snippet in order to use the same preview + // for all equations on the page (e.g., you could have it say "[math]" + // or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the TeX input jax. + // + TeX: { + + // + // This specifies the side on which \tag{} macros will place the tags. + // Set to "left" to place on the left-hand side. + // + TagSide: "right", + + // + // This is the amound of indentation (from right or left) for the tags. + // + TagIndent: "0.8em", + + // + // This is the width to use for the multline environment + // + MultLineWidth: "85%", + + // + // List of macros to define. These are of the form + // name: value + // where 'value' is the replacement text for the macro \name. + // The 'value' can also be [value,n] where 'value' is the replacement + // text and 'n' is the number of parameters for the macro. + // Note that backslashes must be doubled in the replacement string. + // + // E.g., + // + // Macros: { + // RR: '{\\bf R}', + // bold: ['{\\bf #1}', 1] + // } + // + Macros: {}, + + // + // Equation numbering parameters. + // + equationNumbers: { + autoNumber: "none", // "AMS" for standard AMS environment numbering, + // or "all" to number all displayed equations +// formatNumber: function (n) {return n}, // format for equation number n +// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref +// formatID: function (n) {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")}, +// // element ID to use for reference +// formatURL: function (id,base) {return base+'#'+escape(id)}, +// // URL to use for references + useLabelIds: true // make element ID's use \label name rather than equation number + }, + + // + // Controls the TeX/noErrors extension + // + noErrors: { + disabled: false, // set to true to return to original error messages + multiLine: true, // false to not include original line breaks + inlineDelimiters: ["",""], // or use ["$","$"] or ["\\(","\\)"] to put back delimiters + style: { + "font-size": "90%", + "text-align": "left", + "color": "black", + "padding": "1px 3px", + "border": "1px solid" + } + }, + + // + // Controls the TeX/noUndefined extension + // + noUndefined: { + disabled: false, // set to true to return to original error messages + attributes: { // attributes to set for the undefined control sequence + mathcolor: "red" + } + }, + + // + // Controls the TeX/unicode extension + unicode: { + fonts: "STIXGeneral,'Arial Unicode MS'" // the default font list for unknown characters + } + + }, + + //============================================================================ + // + // These parameters control the AsciiMath input jax. + // + AsciiMath: { + // + // Determines whether the unicode positions for phi and varphi are + // to be swapped or not. (Unicode originally had these reversed, and + // many fonts have them reversed as well.) When set to true, phi + // and varphi will correspond to the LaTeX macros of the same name. + // + fixphi: true, + + // + // Determines whether the MathML should be marked so that the HTML-CSS + // and SVG output jax will use MathML spacing rules rather than TeX + // spacing rules. Since AsciiMath was designed for MathML output, the + // MathML rules are used by default. + // + useMathMLspacing: true, + + // + // Determines whether limits are placed above and below operators, + // or next to them. (AsciiMath doesn't have separate in-line and + // display modes like TeX and MathML do, so this is the only control + // you have over its output) + // + displaystyle: true, + + // + // The character to use for decimal places when scanning for a number. + // If you change it to ",", beware of things like "(1,2)" which would need + // to be changed to "(1, 2)" to be parsed correctly. + // + decimal: "." + }, + + //============================================================================ + // + // These parameters control the MathML input jax. + // + MathML: { + // + // This specifies whether to use TeX spacing or MathML spacing when the + // HTML-CSS output jax is used. + // + useMathMLspacing: false + }, + + //============================================================================ + // + // These parameters control the HTML-CSS output jax. + // + "HTML-CSS": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This is a list of the fonts to look for on a user's computer in + // preference to using MathJax's web-based fonts. These must + // correspond to directories available in the jax/output/HTML-CSS/fonts + // directory, where MathJax stores data about the characters available + // in the fonts. Set this to ["TeX"], for example, to prevent the + // use of the STIX fonts, or set it to an empty list, [], if + // you want to force MathJax to use web-based or image fonts. + // + availableFonts: ["STIX","TeX"], + + // + // This is the preferred font to use when more than one of those + // listed above is available. + // + preferredFont: "TeX", + + // + // This is the web-based font to use when none of the fonts listed + // above are available on the user's computer. Note that currently + // only the TeX font is available in a web-based form. Set this to + // + // webFont: null, + // + // if you want to prevent the use of web-based fonts. + // + webFont: "TeX", + + // + // This is the font to use for image fallback mode (when none of the + // fonts listed above are available and the browser doesn't support + // web-fonts via the @font-face CSS directive). Note that currently + // only the TeX font is available as an image font. Set this to + // + // imageFont: null, + // + // if you want to prevent the use of image fonts (e.g., you have not + // installed the image fonts on your server). In this case, only + // browsers that support web-based fonts will be able to view your pages + // without having the fonts installed on the client computer. The browsers + // that support web-based fonts include: IE6 and later, Chrome, Safari3.1 + // and above, Firefox3.5 and later, and Opera10 and later. Note that + // Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users + // will be required to to download and install either the STIX fonts or the + // MathJax TeX fonts. + // + imageFont: "TeX", + + // + // This is the font-family CSS value used for characters that are not + // in the selected font (e.g., for web-based fonts, this is where to + // look for characters not included in the MathJax_* fonts). IE will + // stop looking after the first font that exists on the system (even + // if it doesn't contain the needed character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + // + matchFontHeight: true, + + // + // When true, MathJax will not measure the widths or heights of the + // subexpressions as it creates its output, but instead will rely on + // its internal calculautions based on teh bounding boxes of the + // characters it uses, and will only take measurements when it + // absolutely has to. Since measurements cause display reflows, they + // slows down MathJax considerably, so without them MathJax runs + // faster, but can produce slightly less accurate character placements, + // especially in width fractions or roots. + // + noReflows: true, + + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js, + // which can be overriden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the NativeMML output jax. + // + NativeMML: { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax_MathML": { + // color: "red" // MathML is in red + // } + // } + // + styles: {} + }, + + //============================================================================ + // + // These parameters control the SVG output jax. + // + "SVG": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This specifies the font to use for SVG output (currently the only + // one available) + // + font: "TeX", + + // + // This is the stroke width to use for all character paths (1em = 1000 + // units). This is a cheap way of getting slightly lighter or darker + // characters + // + blacker: 10, + + // + // This is the font-family CSS value used for characters that are not + // in the selected font. IE will stop looking after the first font + // that exists on the system (even if it doesn't contain the needed + // character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // This controls whether the MathML structure is retained and CSS + // classes are added to mark the original MathML elements (as in the + // HTML-CSS output). By default, the SVG output jax removes unneeded + // nesting in order to produce a more efficient markup, but if you + // want to use CSS to style the elements as if they were MathML, you + // might need to set this to true. + // + addMMLclasses: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // These are the styles used for merror elements in SVG output. Note + // that only a limited number of style attributes are supported by + // SVG, but you can at least change the colors and borders. + // + // + merrorStyle: { + fontSize:"90%", color:"#C00", background:"#FF8", + border: "1px solid #C00", padding:"3px" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/SVG/config.js, + // which can be overriden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathMenu: { + // + // This is the hover delay for the display of submenus in the + // contextual menu. When the mouse is still over a submenu label for + // this long, the menu will appear. (The menu also will appear if you + // click on the label.) It is in milliseconds. + // + delay: 150, + + // + // This is the URL for the MathJax Help menu item. + // + helpURL: "http://www.mathjax.org/help-v2/user/", + + // + // These control whether the "Math Renderer", "MathPlayer", "Font + // Preferences", "Contextual Menu", and "Discoverable" menu items will + // be displayed or not. + // + showRenderer: true, + showMathPlayer: true, + showFontMenu: false, + showContext: false, + showDiscoverable: false, + + // + // These are the settings for the Annotation menu. If the root has + // a child that contains one of the following annotation + // formats, the source will be available via the "Show Math As" menu. + // Each format has a list of possible encodings. + // + semanticsAnnotations: { + "TeX": ["TeX", "LaTeX", "application/x-tex"], + "StarMath": ["StarMath 5.0"], + "Maple": ["Maple"], + "ContentMathML": ["MathML-Content", "application/mathml-content+xml"], + "OpenMath": ["OpenMath"] + }, + + // + // These are the settings for the Show Source window. The initial + // width and height will be reset after the source is shown in an + // attempt to make the window fit the output better. + // + windowSettings: { + status: "no", toolbar: "no", locationbar: "no", menubar: "no", + directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes", + width: 100, height: 50 + }, + + // + // This allows you to change the CSS that controls the menu + // appearance. See the extensions/MathMenu.js file for details + // of the default settings. + // + styles: {} + + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathEvents: { + // + // This is the time required for the mouse to be held still over a + // typeset equation in order for it to count as a hover (used when the + // zoom trigger is "Hover"). It is in milliseconds. + // + hover: 500 + }, + + //============================================================================ + // + // These parameters control the MMLorHTML configuration file. + // NOTE: if you add MMLorHTML.js to the config array above, + // you must REMOVE the output jax from the jax array. + // + MMLorHTML: { + // + // The output jax that is to be preferred when both are possible + // (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax). + // + prefer: { + MSIE: "MML", + Firefox: "HTML", + Opera: "HTML", + Safari: "HTML", + Chrome: "HTML", + other: "HTML" + } + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/config/default.js"); diff --git a/rhodecode/public/js/src/math_jax/config/local/local.js b/rhodecode/public/js/src/math_jax/config/local/local.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/config/local/local.js @@ -0,0 +1,40 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ + +/************************************************************* + * + * MathJax/config/local/local.js + * + * Include changes and configuration local to your installation + * in this file. For example, common macros can be defined here + * (see below). To use this file, add "local/local.js" to the + * config array in MathJax.js or your MathJax.Hub.Config() call. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2009-2016 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.StartupHook("TeX Jax Ready",function () { + var TEX = MathJax.InputJax.TeX; + + // place macros here. E.g.: + // TEX.Macro("R","{\\bf R}"); + // TEX.Macro("op","\\mathop{\\rm #1}",1); // a macro with 1 parameter + +}); + +MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/AssistiveMML.js b/rhodecode/public/js/src/math_jax/extensions/AssistiveMML.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/AssistiveMML.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/AssistiveMML.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a,e,b,f){var c=b.config.menuSettings;var d=MathJax.Extension.AssistiveMML={version:"2.7.0",config:b.CombineConfig("AssistiveMML",{disabled:false,styles:{".MJX_Assistive_MathML":{position:"absolute!important",top:0,left:0,clip:(b.Browser.isMSIE&&(document.documentMode||0)<8?"rect(1px 1px 1px 1px)":"rect(1px, 1px, 1px, 1px)"),padding:"1px 0 0 0!important",border:"0!important",height:"1px!important",width:"1px!important",overflow:"hidden!important",display:"block!important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},".MJX_Assistive_MathML.MJX_Assistive_MathML_Block":{width:"100%!important"}}}),Config:function(){if(!this.config.disabled&&c.assistiveMML==null){b.Config({menuSettings:{assistiveMML:true}})}a.Styles(this.config.styles);b.Register.MessageHook("End Math",function(g){if(c.assistiveMML){return d.AddAssistiveMathML(g[1])}})},AddAssistiveMathML:function(g){var h={jax:b.getAllJax(g),i:0,callback:MathJax.Callback({})};this.HandleMML(h);return h.callback},RemoveAssistiveMathML:function(k){var h=b.getAllJax(k),l;for(var j=0,g=h.length;j/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])}); diff --git a/rhodecode/public/js/src/math_jax/extensions/CHTML-preview.js b/rhodecode/public/js/src/math_jax/extensions/CHTML-preview.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/CHTML-preview.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/CHTML-preview.js + * + * Copyright (c) 2009-2016 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.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/fast-preview.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/CHTML-preview.js"]); diff --git a/rhodecode/public/js/src/math_jax/extensions/FontWarnings.js b/rhodecode/public/js/src/math_jax/extensions/FontWarnings.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/FontWarnings.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/FontWarnings.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(b,d){var i="2.7.0";var a="http://www.stixfonts.org/";var f="https://github.com/mathjax/MathJax/tree/master/fonts/HTML-CSS/TeX/otf";var h=b.CombineConfig("FontWarnings",{messageStyle:{position:"fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000","background-color":"#E0E0E0",color:"black",padding:"1em","font-size":"small","white-space":"normal","border-radius":".75em","-webkit-border-radius":".75em","-moz-border-radius":".75em","-khtml-border-radius":".75em","box-shadow":"4px 4px 10px #AAAAAA","-webkit-box-shadow":"4px 4px 10px #AAAAAA","-moz-box-shadow":"4px 4px 10px #AAAAAA","-khtml-box-shadow":"4px 4px 10px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')"},Message:{webFont:[["closeBox"],["webFont","MathJax is using web-based fonts to display the mathematics on this page. These take time to download, so the page would render faster if you installed math fonts directly in your system's font folder."],["fonts"]],imageFonts:[["closeBox"],["imageFonts","MathJax is using its image fonts rather than local or web-based fonts. This will render slower than usual, and the mathematics may not print at the full resolution of your printer."],["fonts"],["webFonts"]],noFonts:[["closeBox"],["noFonts","MathJax is unable to locate a font to use to display its mathematics, and image fonts are not available, so it is falling back on generic unicode characters in hopes that your browser will be able to display them. Some characters may not show up properly, or possibly not at all."],["fonts"],["webFonts"]]},HTML:{closeBox:[["div",{style:{position:"absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer","background-color":"#EEEEEE",color:"#606060","border-radius":".5em","-webkit-border-radius":".5em","-moz-border-radius":".5em","-khtml-border-radius":".5em"},onclick:function(){if(c.div&&c.fade===0){if(c.timer){clearTimeout(c.timer)}c.div.style.display="none"}}},[["span",{style:{position:"relative",bottom:".2em"}},["x"]]]]],webFonts:[["p"],["webFonts","Most modern browsers allow for fonts to be downloaded over the web. Updating to a more recent version of your browser (or changing browsers) could improve the quality of the mathematics on this page."]],fonts:[["p"],["fonts","MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2). Download and install one of those fonts to improve your MathJax experience.",a,f]],STIXfonts:[["p"],["STIXPage","This page is designed to use the [STIX fonts](%1). Download and install those fonts to improve your MathJax experience.",a]],TeXfonts:[["p"],["TeXPage","This page is designed to use the [MathJax TeX fonts](%1). Download and install those fonts to improve your MathJax experience.",f]]},removeAfter:12*1000,fadeoutSteps:10,fadeoutTime:1.5*1000});if(MathJax.Hub.Browser.isIE9&&document.documentMode>=9){delete h.messageStyle.filter}var c={div:null,fade:0};var e=function(m){if(c.div){return}var j=MathJax.OutputJax["HTML-CSS"],n=document.body;if(b.Browser.isMSIE){if(h.messageStyle.position==="fixed"){MathJax.Message.Init();n=document.getElementById("MathJax_MSIE_Frame")||n;if(n!==document.body){h.messageStyle.position="absolute"}}}else{delete h.messageStyle.filter}h.messageStyle.maxWidth=(document.body.clientWidth-75)+"px";var k=0;while(k1?z/h:1);C=Math.floor(Math.max(this.config.minScaleAdjust/100,C)*this.config.scale);if(C/100!==g.scale){o.push([v.style,C])}g.scale=C/100;g.fontScale=C+"%";g.ex=z;g.mex=h}if("scrollWidth" in g&&(r||g.scrollWidth!==k.firstChild.scrollWidth)){g.scrollWidth=k.firstChild.scrollWidth;t.push([k.parentNode.style,g.scrollWidth/g.ex/g.scale])}if(k.MathJaxMtds){for(var u=0,p=k.MathJaxMtds.length;u0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.last=0){h=a.cloneNode(h,true)}var i=a.cloneNode(h);for(var g=0,f=h.childNodes.length;g1){a.applyTransform(o,p[0],g)}a.appendToken(o,"mo",f);if(p.length>0){var q=p[(p.length===1)?0:1];a.applyTransform(o,q,g)}if(k){a.appendToken(o,"mo",")")}n.appendChild(o)}},infix:function(f,g){return function(r,k,o,t,i,p,h){var s=a.createElement("mrow");var n=h>g;if(n){a.appendToken(s,"mo","(")}for(var q=0,m=t.length;q0){a.appendToken(s,"mo",f)}a.applyTransform(s,t[q],g)}if(n){a.appendToken(s,"mo",")")}r.appendChild(s)}},iteration:function(f,g){return function(q,y,C,l,h,u,m){var t=a.createElement("mrow");var x=a.createElement("mo");a.setTextContent(x,f);var o=a.createElement("munderover");o.appendChild(x);var k=a.createElement("mrow");var A,w,v,B,n,s,z,r;for(A=0,v=u.length;A0){a.appendToken(y,"mo",",")}n=a.getChildren(t);if(n.length){a.applyTransform(y,n[0],0)}}var x=a.createElement("mrow");var A=false;for(v=0,p=s.length;v0){a.appendToken(n,"mo",",")}a.applyTransform(n,s[p],0)}if(o.length){a.appendToken(n,"mo","|");for(p=0,k=o.length;p",1),lt:a.transforms.infix("<",1),geq:a.transforms.infix("\u2265",1),leq:a.transforms.infix("\u2264",1),equivalent:a.transforms.infix("\u2261",1),approx:a.transforms.infix("\u2248",1),subset:a.transforms.infix("\u2286",2),prsubset:a.transforms.infix("\u2282",2),cartesianproduct:a.transforms.infix("\u00D7",2),cartesian_product:a.transforms.infix("\u00D7",2),vectorproduct:a.transforms.infix("\u00D7",2),scalarproduct:a.transforms.infix(".",2),outerproduct:a.transforms.infix("\u2297",2),sum:a.transforms.iteration("\u2211","="),product:a.transforms.iteration("\u220F","="),forall:a.transforms.bind("\u2200",".",","),exists:a.transforms.bind("\u2203",".",","),lambda:a.transforms.bind("\u03BB",".",","),limit:a.transforms.iteration("lim","\u2192"),sdev:a.transforms.fn("\u03c3"),determinant:a.transforms.fn("det"),max:a.transforms.minmax("max"),min:a.transforms.minmax("min"),real:a.transforms.fn("\u211b"),imaginary:a.transforms.fn("\u2111"),set:a.transforms.set("{","}"),list:a.transforms.set("(",")"),exp:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.appendToken(l,"mi","e");a.applyTransform(l,j[0],0);h.appendChild(l)},union:function(h,k,g,j,i,l,f){if(i.length){a.transforms.iteration("\u22C3","=")(h,k,g,j,i,l,f)}else{a.transforms.infix("\u222A",2)(h,k,g,j,i,l,f)}},intersect:function(q,i,n,s,g,o,f){if(g.length){a.transforms.iteration("\u22C2","=")(q,i,n,s,g,o,f)}else{var r=a.createElement("mrow");var m=f>2;if(m){a.appendToken(r,"mo","(")}for(var p=0,k=s.length;p0){a.appendToken(r,"mo","\u2229");if(s[p].nodeName==="apply"){var h=a.getChildren(s[p])[0];t=h.nodeName==="union"}}if(t){a.appendToken(r,"mo","(")}a.applyTransform(r,s[p],2);if(t){a.appendToken(r,"mo",")")}}if(m){a.appendToken(r,"mo",")")}q.appendChild(r)}},floor:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","\u230a");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u230b");h.appendChild(i)},conjugate:function(h,l,g,k,j,m,f){var i=a.createElement("mover");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u00af");h.appendChild(i)},abs:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","|");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","|");h.appendChild(i)},and:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("\u22c0","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("\u2227",2)(h,k,g,j,i,l,f)}},or:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("\u22c1","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("\u2228",2)(h,k,g,j,i,l,f)}},xor:function(h,k,g,j,i,l,f){if(i.length||l.length){a.transforms.iteration("xor","=")(h,k,g,j,i,l,4)}else{a.transforms.infix("xor",2)(h,k,g,j,i,l,f)}},card:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.appendToken(i,"mo","|");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","|");h.appendChild(i)},mean:function(h,l,g,k,j,m,f){if(k.length===1){var i=a.createElement("mover");a.applyTransform(i,k[0],0);a.appendToken(i,"mo","\u00af");h.appendChild(i)}else{h.appendChild(a.createmfenced(k,"\u27e8","\u27e9"))}},moment:function(s,k,o,w,g,p,f){var n,v,h,r,q,m;for(r=0,m=p.length;r1){y.appendChild(a.createmfenced(w,"(",")"))}else{a.applyTransform(y,w[0],0)}if(n){var x=a.createElement("msup");x.appendChild(y);h=a.getChildren(n);for(q=0,m=h.length;q3;if(k){a.appendToken(q,"mo","(")}for(var o=0,i=r.length;o0){a.appendToken(q,"mo",(r[o].nodeName==="cn")?"\u00D7":"\u2062")}a.applyTransform(q,r[o],3)}if(k){a.appendToken(q,"mo",")")}p.appendChild(q)},plus:function(s,k,p,u,g,q,f){var t=a.createElement("mrow");var o=f>2;if(o){a.appendToken(t,"mo","(")}for(var r=0,m=u.length;r0){var i;if(a.settings.collapsePlusMinus){if(v.nodeName==="cn"&&!(h.length)&&(i=Number(a.getTextContent(v)))<0){a.appendToken(t,"mo","\u2212");a.appendToken(t,"mn",-i)}else{if(v.nodeName==="apply"&&h.length===2&&h[0].nodeName==="minus"){a.appendToken(t,"mo","\u2212");a.applyTransform(t,h[1],2)}else{if(v.nodeName==="apply"&&h.length>2&&h[0].nodeName==="times"&&h[1].nodeName==="cn"&&(i=Number(a.getTextContent(h[1])))<0){a.appendToken(t,"mo","\u2212");h[1].textContent=-i;a.applyTransform(t,v,2)}else{a.appendToken(t,"mo","+");a.applyTransform(t,v,2)}}}}else{a.appendToken(t,"mo","+");a.applyTransform(t,v,2)}}else{a.applyTransform(t,v,2)}}if(o){a.appendToken(t,"mo",")")}s.appendChild(t)},transpose:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.applyTransform(l,j[0],f);a.appendToken(l,"mi","T");h.appendChild(l)},power:function(h,k,g,j,i,m,f){var l=a.createElement("msup");a.applyTransform(l,j[0],3);a.applyTransform(l,j[1],f);h.appendChild(l)},selector:function(p,h,k,s,g,n,f){var r=a.createElement("msub");var q=s?s[0]:a.createElement("mrow");a.applyTransform(r,q,0);var m=a.createElement("mrow");for(var o=1,j=s.length;o1){a.applyTransform(i,k[1],0)}}a.appendToken(i,"mo","\u230B");h.appendChild(i)},factorial:function(h,l,g,k,j,m,f){var i=a.createElement("mrow");a.applyTransform(i,k[0],4);a.appendToken(i,"mo","!");h.appendChild(i)},root:function(p,j,m,q,h,n,f){var g;if(m.nodeName==="root"&&(n.length===0||(n[0].nodeName==="degree"&&a.getTextContent(n[0])==="2"))){g=a.createElement("msqrt");for(var o=0,k=q.length;o1){var i=a.createElement("msup");a.applyTransform(i,j,0);a.appendToken(i,"mn",l);M.appendChild(i)}else{a.applyTransform(M,j,0)}}for(K=0,F=z.length;K0){if(x){a.appendToken(s,"mo","+")}a.appendToken(s,"mn",m)}}if(g.length){L=g[0]}for(K=0,F=f.length;K ltr ) ( ] [ } { ) ( ] [ } { \ )(}{>< top right 0 decimalpoint decimalpoint . decimalpoint * 0.1em 0.15em 0.2em 0.15em 0 ) ( / : = top ) ';var b;if(window.XSLTProcessor){if(!d.ParseXML){d.ParseXML=d.createParser()}d.mml3XSLT=new XSLTProcessor();d.mml3XSLT.importStylesheet(d.ParseXML(e))}else{if(MathJax.Hub.Browser.isMSIE){if(MathJax.Hub.Browser.versionAtLeast("9.0")||(document.documentMode||0)>=9){b=new ActiveXObject("Msxml2.FreeThreadedDOMDocument");b.loadXML(e);var a=new ActiveXObject("Msxml2.XSLTemplate");a.stylesheet=b;d.mml3XSLT={mml3:a.createProcessor(),transformToDocument:function(h){this.mml3.input=h;this.mml3.transform();return this.mml3.output}}}else{b=d.createMSParser();b.async=false;b.loadXML(e);d.mml3XSLT={mml3:b,transformToDocument:function(h){return h.documentElement.transformNode(this.mml3)}}}}else{d.mml3XSLT=null}}MathJax.Ajax.Styles({".MathJax .mi, .MathJax .mo, .MathJax .mn, .MathJax .mtext":{direction:"ltr",display:"inline-block"},".MathJax .ms, .MathJax .mspace, .MathJax .mglyph":{direction:"ltr",display:"inline-block"}});MathJax.Hub.Startup.signal.Post("MathML mml3.js Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/MathML/mml3.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/MathMenu.js b/rhodecode/public/js/src/math_jax/extensions/MathMenu.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/MathMenu.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/MathMenu.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(f,o,q,e,r){var p="2.7.0";var d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var t=function(u){return MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var i=MathJax.Object.isArray;var a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var j=(a?null:"5px");var s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,showDiscoverable:false,showLocale:true,showLocaleURL:false,semanticsAnnotations:{TeX:["TeX","LaTeX","application/x-tex"],StarMath:["StarMath 5.0"],Maple:["Maple"],ContentMathML:["MathML-Content","application/mathml-content+xml"],OpenMath:["OpenMath"]},windowSettings:{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:400,height:300,left:Math.round((screen.width-400)/2),top:Math.round((screen.height-300)/3)},styles:{"#MathJax_About":{position:"fixed",left:"50%",width:"auto","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},"#MathJax_About.MathJax_MousePost":{outline:"none"},".MathJax_Menu":{position:"absolute","background-color":"white",color:"black",width:"auto",padding:(a?"2px":"5px 0px"),border:"1px solid #CCCCCC",margin:0,cursor:"default",font:"menu","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","z-index":201,"border-radius":j,"-webkit-border-radius":j,"-moz-border-radius":j,"-khtml-border-radius":j,"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"},".MathJax_MenuItem":{padding:(a?"2px 2em":"1px 2em"),background:"transparent"},".MathJax_MenuArrow":{position:"absolute",right:".5em","padding-top":".25em",color:"#666666","font-family":(l?"'Arial unicode MS'":null),"font-size":".75em"},".MathJax_MenuActive .MathJax_MenuArrow":{color:"white"},".MathJax_MenuArrow.RTL":{left:".5em",right:"auto"},".MathJax_MenuCheck":{position:"absolute",left:".7em","font-family":(l?"'Arial unicode MS'":null)},".MathJax_MenuCheck.RTL":{right:".7em",left:"auto"},".MathJax_MenuRadioCheck":{position:"absolute",left:(a?"1em":".7em")},".MathJax_MenuRadioCheck.RTL":{right:(a?"1em":".7em"),left:"auto"},".MathJax_MenuLabel":{padding:(a?"2px 2em 4px 1.33em":"1px 2em 3px 1.33em"),"font-style":"italic"},".MathJax_MenuRule":{"border-top":(a?"1px solid #CCCCCC":"1px solid #DDDDDD"),margin:(a?"4px 1px 0px":"4px 3px")},".MathJax_MenuDisabled":{color:"GrayText"},".MathJax_MenuActive":{"background-color":(a?"Highlight":"#606872"),color:(a?"HighlightText":"white")},".MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus":{"background-color":"#E8E8E8"},".MathJax_ContextMenu:focus":{outline:"none"},".MathJax_ContextMenu .MathJax_MenuItem:focus":{outline:"none"},"#MathJax_AboutClose":{top:".2em",right:".2em"},".MathJax_Menu .MathJax_MenuClose":{top:"-10px",left:"-10px"},".MathJax_MenuClose":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","font-family":"'Courier New',Courier","font-size":"24px",color:"#F0F0F0"},".MathJax_MenuClose span":{display:"block","background-color":"#AAA",border:"1.5px solid","border-radius":"18px","-webkit-border-radius":"18px","-moz-border-radius":"18px","-khtml-border-radius":"18px","line-height":0,padding:"8px 0 6px"},".MathJax_MenuClose:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_MenuClose:hover span":{"background-color":"#CCC!important"},".MathJax_MenuClose:hover:focus":{outline:"none"}}});var n,k,b;f.Register.StartupHook("MathEvents Ready",function(){n=MathJax.Extension.MathEvents.Event.False;k=MathJax.Extension.MathEvents.Hover;b=MathJax.Extension.MathEvents.Event.KEY});var h=MathJax.Object.Subclass({Keydown:function(u,v){switch(u.keyCode){case b.ESCAPE:this.Remove(u,v);break;case b.RIGHT:this.Right(u,v);break;case b.LEFT:this.Left(u,v);break;case b.UP:this.Up(u,v);break;case b.DOWN:this.Down(u,v);break;case b.RETURN:case b.SPACE:this.Space(u,v);break;default:return;break}return n(u)},Escape:function(u,v){},Right:function(u,v){},Left:function(u,v){},Up:function(u,v){},Down:function(u,v){},Space:function(u,v){}},{});var g=MathJax.Menu=h.Subclass({version:p,items:[],posted:false,title:null,margin:5,Init:function(u){this.items=[].slice.call(arguments,0)},With:function(u){if(u){f.Insert(this,u)}return this},Post:function(M,E,B){if(!M){M=window.event||{}}var I=document.getElementById("MathJax_MenuFrame");if(!I){I=g.Background(this);delete c.lastItem;delete c.lastMenu;delete g.skipUp;d.Post(["post",g.jax]);g.isRTL=(MathJax.Localization.fontDirection()==="rtl")}var v=o.Element("div",{onmouseup:g.Mouseup,ondblclick:n,ondragstart:n,onselectstart:n,oncontextmenu:n,menuItem:this,className:"MathJax_Menu",onkeydown:g.Keydown,role:"menu"});if(M.type==="contextmenu"||M.type==="mouseover"){v.className+=" MathJax_ContextMenu"}if(!B){MathJax.Localization.setCSS(v)}for(var N=0,K=this.items.length;NA-this.margin){H=A-v.offsetWidth-this.margin}if(g.isMobile){H=Math.max(5,H-Math.floor(v.offsetWidth/2));F-=20}g.skipUp=M.isContextMenu}else{var z="left",J=E.offsetWidth;H=(g.isMobile?30:J-2);F=0;while(E&&E!==I){H+=E.offsetLeft;F+=E.offsetTop;E=E.parentNode}if(!g.isMobile){if((g.isRTL&&H-J-v.offsetWidth>this.margin)||(!g.isRTL&&H+v.offsetWidth>A-this.margin)){z="right";H=Math.max(this.margin,H-J-v.offsetWidth+6)}}if(!a){v.style["borderRadiusTop"+z]=0;v.style["WebkitBorderRadiusTop"+z]=0;v.style["MozBorderRadiusTop"+z]=0;v.style["KhtmlBorderRadiusTop"+z]=0}}v.style.left=H+"px";v.style.top=F+"px";if(document.selection&&document.selection.empty){document.selection.empty()}var G=window.pageXOffset||document.documentElement.scrollLeft;var D=window.pageYOffset||document.documentElement.scrollTop;g.Focus(v);if(M.type==="keydown"){g.skipMouseoverFromKey=true;setTimeout(function(){delete g.skipMouseoverFromKey},s.delay)}window.scrollTo(G,D);return n(M)},Remove:function(u,v){d.Post(["unpost",g.jax]);var w=document.getElementById("MathJax_MenuFrame");if(w){w.parentNode.removeChild(w);if(this.msieFixedPositionBug){detachEvent("onresize",g.Resize)}}if(g.jax.hover){delete g.jax.hover.nofade;k.UnHover(g.jax)}g.Unfocus(v);if(u.type==="mousedown"){g.CurrentNode().blur()}return n(u)},Find:function(u){return this.FindN(1,u,[].slice.call(arguments,1))},FindId:function(u){return this.FindN(0,u,[].slice.call(arguments,1))},FindN:function(y,v,x){for(var w=0,u=this.items.length;w0){u.oldTabIndex=u.tabIndex}u.tabIndex=-1}},SetTabIndex:function(){var v=g.AllNodes();for(var w=0,u;u=v[w];w++){if(u.oldTabIndex!==undefined){u.tabIndex=u.oldTabIndex;delete u.oldTabIndex}else{u.tabIndex=f.getTabOrder(u)}}},Mod:function(u,v){return((u%v)+v)%v},IndexOf:(Array.prototype.indexOf?function(u,v,w){return u.indexOf(v,w)}:function(u,x,y){for(var w=(y||0),v=u.length;w=0&&c.GetMenuNode(w).menuItem!==v[u].menuItem){v[u].menuItem.posted=false;v[u].parentNode.removeChild(v[u]);u--}},Touchstart:function(u,v){return this.TouchEvent(u,v,"Mousedown")},Touchend:function(u,v){return this.TouchEvent(u,v,"Mouseup")},TouchEvent:function(v,w,u){if(this!==c.lastItem){if(c.lastMenu){g.Event(v,c.lastMenu,"Mouseout")}g.Event(v,w,"Mouseover",true);c.lastItem=this;c.lastMenu=w}if(this.nativeTouch){return null}g.Event(v,w,u);return false},Remove:function(u,v){v=v.parentNode.menuItem;return v.Remove(u,v)},With:function(u){if(u){f.Insert(this,u)}return this},isRTL:function(){return g.isRTL},rtlClass:function(){return(this.isRTL()?" RTL":"")}},{GetMenuNode:function(u){return u.parentNode}});g.ENTRY=g.ITEM.Subclass({role:"menuitem",Attributes:function(u){u=f.Insert({onmouseover:g.Mouseover,onmouseout:g.Mouseout,onmousedown:g.Mousedown,onkeydown:g.Keydown,"aria-disabled":!!this.disabled},u);u=this.SUPER(arguments).Attributes.call(this,u);if(this.disabled){u.className+=" MathJax_MenuDisabled"}return u},MoveVertical:function(u,E,w){var x=c.GetMenuNode(E);var D=[];for(var z=0,C=x.menuItem.items,y;y=C[z];z++){if(!y.hidden){D.push(y)}}var B=g.IndexOf(D,this);if(B===-1){return}var A=D.length;var v=x.childNodes;do{B=g.Mod(w(B),A)}while(D[B].hidden||!v[B].role||v[B].role==="separator");this.Deactivate(E);D[B].Activate(u,v[B])},Up:function(v,u){this.MoveVertical(v,u,function(w){return w-1})},Down:function(v,u){this.MoveVertical(v,u,function(w){return w+1})},Right:function(v,u){this.MoveHorizontal(v,u,g.Right,!this.isRTL())},Left:function(v,u){this.MoveHorizontal(v,u,g.Left,this.isRTL())},MoveHorizontal:function(A,z,u,B){var x=c.GetMenuNode(z);if(x.menuItem===g.menu&&A.shiftKey){u(A,z)}if(B){return}if(x.menuItem!==g.menu){this.Deactivate(z)}var v=x.previousSibling.childNodes;var y=v.length;while(y--){var w=v[y];if(w.menuItem.submenu&&w.menuItem.submenu===x.menuItem){g.Focus(w);break}}this.RemoveSubmenus(z)},Space:function(u,v){this.Mouseup(u,v)},Activate:function(u,v){this.Deactivate(v);if(!this.disabled){v.className+=" MathJax_MenuActive"}this.DeactivateSubmenus(v);g.Focus(v)},Deactivate:function(u){u.className=u.className.replace(/ MathJax_MenuActive/,"")}});g.ITEM.COMMAND=g.ENTRY.Subclass({action:function(){},Init:function(u,w,v){if(!i(u)){u=[u,u]}this.name=u;this.action=w;this.With(v)},Label:function(u,v){return[this.Name()]},Mouseup:function(u,v){if(!this.disabled){this.Remove(u,v);d.Post(["command",this]);this.action.call(this,u)}return n(u)}});g.ITEM.SUBMENU=g.ENTRY.Subclass({submenu:null,marker:"\u25BA",markerRTL:"\u25C4",Attributes:function(u){u=f.Insert({"aria-haspopup":"true"},u);u=this.SUPER(arguments).Attributes.call(this,u);return u},Init:function(u,w){if(!i(u)){u=[u,u]}this.name=u;var v=1;if(!(w instanceof g.ITEM)){this.With(w),v++}this.submenu=g.apply(g,[].slice.call(arguments,v))},Label:function(u,v){this.submenu.posted=false;return[this.Name()+" ",["span",{className:"MathJax_MenuArrow"+this.rtlClass()},[this.isRTL()?this.markerRTL:this.marker]]]},Timer:function(u,v){this.ClearTimer();u={type:u.type,clientX:u.clientX,clientY:u.clientY};this.timer=setTimeout(e(["Mouseup",this,u,v]),s.delay)},ClearTimer:function(){if(this.timer){clearTimeout(this.timer)}},Touchend:function(v,x){var w=this.submenu.posted;var u=this.SUPER(arguments).Touchend.apply(this,arguments);if(w){this.Deactivate(x);delete c.lastItem;delete c.lastMenu}return u},Mouseout:function(u,v){if(!this.submenu.posted){this.Deactivate(v)}this.ClearTimer()},Mouseover:function(u,v){this.Activate(u,v)},Mouseup:function(u,v){if(!this.disabled){if(!this.submenu.posted){this.ClearTimer();this.submenu.Post(u,v,this.ltr);g.Focus(v)}else{this.DeactivateSubmenus(v)}}return n(u)},Activate:function(u,v){if(!this.disabled){this.Deactivate(v);v.className+=" MathJax_MenuActive"}if(!this.submenu.posted){this.DeactivateSubmenus(v);if(!g.isMobile){this.Timer(u,v)}}g.Focus(v)},MoveVertical:function(w,v,u){this.ClearTimer();this.SUPER(arguments).MoveVertical.apply(this,arguments)},MoveHorizontal:function(w,y,v,x){if(!x){this.SUPER(arguments).MoveHorizontal.apply(this,arguments);return}if(this.disabled){return}if(!this.submenu.posted){this.Activate(w,y);return}var u=c.GetMenuNode(y).nextSibling.childNodes;if(u.length>0){this.submenu.items[0].Activate(w,u[0])}}});g.ITEM.RADIO=g.ENTRY.Subclass({variable:null,marker:(a?"\u25CF":"\u2713"),role:"menuitemradio",Attributes:function(v){var u=s.settings[this.variable]===this.value?"true":"false";v=f.Insert({"aria-checked":u},v);v=this.SUPER(arguments).Attributes.call(this,v);return v},Init:function(v,u,w){if(!i(v)){v=[v,v]}this.name=v;this.variable=u;this.With(w);if(this.value==null){this.value=this.name[0]}},Label:function(v,w){var u={className:"MathJax_MenuRadioCheck"+this.rtlClass()};if(s.settings[this.variable]!==this.value){u={style:{display:"none"}}}return[["span",u,[this.marker]]," "+this.Name()]},Mouseup:function(x,y){if(!this.disabled){var z=y.parentNode.childNodes;for(var v=0,u=z.length;v/g,">");var y=t("EqSource","MathJax Equation Source");if(g.isMobile){u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("
");u.document.write("");u.document.close()}else{u.document.open();u.document.write(""+y+"");u.document.write("
"+z+"
");u.document.write("");u.document.close();var v=u.document.body.firstChild;setTimeout(function(){var B=(u.outerHeight-u.innerHeight)||30,A=(u.outerWidth-u.innerWidth)||30,w,E;A=Math.max(140,Math.min(Math.floor(0.5*screen.width),v.offsetWidth+A+25));B=Math.max(40,Math.min(Math.floor(0.5*screen.height),v.offsetHeight+B+25));if(g.prototype.msieHeightBug){B+=35}u.resizeTo(A,B);var D;try{D=x.screenX}catch(C){}if(x&&D!=null){w=Math.max(0,Math.min(x.screenX-Math.floor(A/2),screen.width-A-20));E=Math.max(0,Math.min(x.screenY-Math.floor(B/2),screen.height-B-20));u.moveTo(w,E)}},50)}};g.Scale=function(){var z=["CommonHTML","HTML-CSS","SVG","NativeMML","PreviewHTML"],u=z.length,y=100,w,v;for(w=0;w7;g.Augment({margin:20,msieBackgroundBug:((document.documentMode||0)<9),msieFixedPositionBug:(v||!w),msieAboutBug:v,msieHeightBug:((document.documentMode||0)<9)});if(m){delete s.styles["#MathJax_About"].filter;delete s.styles[".MathJax_Menu"].filter}},Firefox:function(u){g.skipMouseover=u.isMobile&&u.versionAtLeast("6.0");g.skipMousedown=u.isMobile}});g.isMobile=f.Browser.isMobile;g.noContextMenu=f.Browser.noContextMenu;g.CreateLocaleMenu=function(){if(!g.menu){return}var z=g.menu.Find("Language").submenu,w=z.items;var v=[],B=MathJax.Localization.strings;for(var A in B){if(B.hasOwnProperty(A)){v.push(A)}}v=v.sort();z.items=[];for(var x=0,u=v.length;xt){z.style.height=t+"px";z.style.width=(x.zW+this.scrollSize)+"px"}if(z.offsetWidth>l){z.style.width=l+"px";z.style.height=(x.zH+this.scrollSize)+"px"}}if(this.operaPositionBug){z.style.width=Math.min(l,x.zW)+"px"}if(z.offsetWidth>m&&z.offsetWidth-m=9);h.msiePositionBug=!m;h.msieSizeBug=l.versionAtLeast("7.0")&&(!document.documentMode||n===7||n===8);h.msieZIndexBug=(n<=7);h.msieInlineBlockAlignBug=(n<=7);h.msieTrapEventBug=!window.addEventListener;if(document.compatMode==="BackCompat"){h.scrollSize=52}if(m){delete i.styles["#MathJax_Zoom"].filter}},Opera:function(l){h.operaPositionBug=true;h.operaRefreshBug=true}});h.topImg=(h.msieInlineBlockAlignBug?d.Element("img",{style:{width:0,height:0,position:"relative"},src:"about:blank"}):d.Element("span",{style:{width:0,height:0,display:"inline-block"}}));if(h.operaPositionBug||h.msieTopBug){h.topImg.style.border="1px solid"}MathJax.Callback.Queue(["StartupHook",MathJax.Hub.Register,"Begin Styles",{}],["Styles",f,i.styles],["Post",a.Startup.signal,"MathZoom Ready"],["loadComplete",f,"[MathJax]/extensions/MathZoom.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax["HTML-CSS"],MathJax.OutputJax.NativeMML); diff --git a/rhodecode/public/js/src/math_jax/extensions/Safe.js b/rhodecode/public/js/src/math_jax/extensions/Safe.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/Safe.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/Safe.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(d,c){var f="2.7.0";var a=MathJax.Hub.CombineConfig("Safe",{allow:{URLs:"safe",classes:"safe",cssIDs:"safe",styles:"safe",fontsize:"all",require:"safe"},sizeMin:0.7,sizeMax:1.44,lengthMax:3,safeProtocols:{http:true,https:true,file:true,javascript:false},safeStyles:{color:true,backgroundColor:true,border:true,cursor:true,margin:true,padding:true,textShadow:true,fontFamily:true,fontSize:true,fontStyle:true,fontWeight:true,opacity:true,outline:true},safeRequire:{action:true,amscd:true,amsmath:true,amssymbols:true,autobold:false,"autoload-all":false,bbox:true,begingroup:true,boldsymbol:true,cancel:true,color:true,enclose:true,extpfeil:true,HTML:true,mathchoice:true,mhchem:true,newcommand:true,noErrors:false,noUndefined:false,unicode:true,verb:true},styleParts:{border:true,padding:true,margin:true,outline:true},styleLengths:{borderTop:"borderTopWidth",borderRight:"borderRightWidth",borderBottom:"borderBottomWidth",borderLeft:"borderLeftWidth",paddingTop:true,paddingRight:true,paddingBottom:true,paddingLeft:true,marginTop:true,marginRight:true,marginBottom:true,marginLeft:true,outlineTop:true,outlineRight:true,outlineBottom:true,outlineLeft:true,fontSize:[0.7,1.44]}});var e=a.allow;if(e.fontsize!=="all"){a.safeStyles.fontSize=false}var b=MathJax.Extension.Safe={version:f,config:a,div1:document.createElement("div"),div2:document.createElement("div"),filter:{href:"filterURL",src:"filterURL",altimg:"filterURL","class":"filterClass",style:"filterStyles",id:"filterID",fontsize:"filterFontSize",mathsize:"filterFontSize",scriptminsize:"filterFontSize",scriptsizemultiplier:"filterSizeMultiplier",scriptlevel:"filterScriptLevel"},filterURL:function(g){var h=(g.match(/^\s*([a-z]+):/i)||[null,""])[1].toLowerCase();if(e.URLs==="none"||(e.URLs!=="all"&&!a.safeProtocols[h])){g=null}return g},filterClass:function(g){if(e.classes==="none"||(e.classes!=="all"&&!g.match(/^MJX-[-a-zA-Z0-9_.]+$/))){g=null}return g},filterID:function(g){if(e.cssIDs==="none"||(e.cssIDs!=="all"&&!g.match(/^MJX-[-a-zA-Z0-9_.]+$/))){g=null}return g},filterStyles:function(l){if(e.styles==="all"){return l}if(e.styles==="none"){return null}try{var k=this.div1.style,j=this.div2.style,m;k.cssText=l;j.cssText="";for(var g in a.safeStyles){if(a.safeStyles.hasOwnProperty(g)){if(a.styleParts[g]){for(var h=0;h<4;h++){var o=g+["Top","Right","Bottom","Left"][h];m=this.filterStyle(o,k);if(m){j[o]=m}}}else{m=this.filterStyle(g,k);if(m){j[g]=m}}}}l=j.cssText}catch(n){l=null}return l},filterStyle:function(g,h){var i=h[g];if(typeof i!=="string"||i===""){return null}if(i.match(/^\s*expression/)){return null}if(i.match(/javascript:/)){return null}var j=g.replace(/Top|Right|Left|Bottom/,"");if(!a.safeStyles[g]&&!a.safeStyles[j]){return null}if(!a.styleLengths[g]){return i}return(this.filterStyleLength(g,i,h)?i:null)},filterStyleLength:function(g,i,h){if(typeof a.styleLengths[g]==="string"){i=h[a.styleLengths[g]]}i=this.length2em(i);if(i==null){return false}var j=[-a.lengthMax,a.lengthMax];if(MathJax.Object.isArray(a.styleLengths[g])){j=a.styleLengths[g]}return(i>=j[0]&&i<=j[1])},unit2em:{em:1,ex:0.5,ch:0.5,rem:1,px:1/16,mm:96/25.4/16,cm:96/2.54/16,"in":96/16,pt:96/72/16,pc:96/6/16},length2em:function(h){var g=h.match(/(.+)(em|ex|ch|rem|px|mm|cm|in|pt|pc)/);if(!g){return null}return parseFloat(g[1])*this.unit2em[g[2]]},filterSize:function(g){if(e.fontsize==="none"){return null}if(e.fontsize!=="all"){g=Math.min(Math.max(g,a.sizeMin),a.sizeMax)}return g},filterFontSize:function(g){return(e.fontsize==="all"?g:null)},filterSizeMultiplier:function(g){if(e.fontsize==="none"){g=null}else{if(e.fontsize!=="all"){g=Math.min(1,Math.max(0.6,g)).toString()}}return g},filterScriptLevel:function(g){if(e.fontsize==="none"){g=null}else{if(e.fontsize!=="all"){g=Math.max(0,g).toString()}}return g},filterRequire:function(g){if(e.require==="none"||(e.require!=="all"&&!a.safeRequire[g.toLowerCase()])){g=null}return g}};d.Register.StartupHook("TeX HTML Ready",function(){var g=MathJax.InputJax.TeX;g.Parse.Augment({HREF_attribute:function(j){var i=b.filterURL(this.GetArgument(j)),h=this.GetArgumentMML(j);if(i){h.With({href:i})}this.Push(h)},CLASS_attribute:function(i){var j=b.filterClass(this.GetArgument(i)),h=this.GetArgumentMML(i);if(j){if(h["class"]!=null){j=h["class"]+" "+j}h.With({"class":j})}this.Push(h)},STYLE_attribute:function(i){var j=b.filterStyles(this.GetArgument(i)),h=this.GetArgumentMML(i);if(j){if(h.style!=null){if(j.charAt(j.length-1)!==";"){j+=";"}j=h.style+" "+j}h.With({style:j})}this.Push(h)},ID_attribute:function(j){var i=b.filterID(this.GetArgument(j)),h=this.GetArgumentMML(j);if(i){h.With({id:i})}this.Push(h)}})});d.Register.StartupHook("TeX Jax Ready",function(){var i=MathJax.InputJax.TeX,h=i.Parse,g=b.filter;h.Augment({Require:function(j){var k=this.GetArgument(j).replace(/.*\//,"").replace(/[^a-z0-9_.-]/ig,"");k=b.filterRequire(k);if(k){this.Extension(null,k)}},MmlFilterAttribute:function(j,k){if(g[j]){k=b[g[j]](k)}return k},SetSize:function(j,k){k=b.filterSize(k);if(k){this.stack.env.size=k;this.Push(i.Stack.Item.style().With({styles:{mathsize:k+"em"}}))}}})});d.Register.StartupHook("TeX bbox Ready",function(){var g=MathJax.InputJax.TeX;g.Parse.Augment({BBoxStyle:function(h){return b.filterStyles(h)},BBoxPadding:function(i){var h=b.filterStyles("padding: "+i);return(h?i:0)}})});d.Register.StartupHook("MathML Jax Ready",function(){var h=MathJax.InputJax.MathML.Parse,g=b.filter;h.Augment({filterAttribute:function(i,j){if(g[i]){j=b[g[i]](j)}return j}})});d.Startup.signal.Post("Safe Extension Ready");c.loadComplete("[MathJax]/extensions/Safe.js")})(MathJax.Hub,MathJax.Ajax); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/AMScd.js b/rhodecode/public/js/src/math_jax/extensions/TeX/AMScd.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/AMScd.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/AMScd.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/AMScd"]={version:"2.7.0",config:MathJax.Hub.CombineConfig("TeX.CD",{colspace:"5pt",rowspace:"5pt",harrowsize:"2.75em",varrowsize:"1.75em",hideHorizontalLabels:false})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,e=MathJax.InputJax.TeX,d=e.Stack.Item,c=e.Definitions,a=MathJax.Extension["TeX/AMScd"].config;c.environment.CD="CD_env";c.special["@"]="CD_arrow";c.macros.minCDarrowwidth="CD_minwidth";c.macros.minCDarrowheight="CD_minheight";e.Parse.Augment({CD_env:function(f){this.Push(f);return d.array().With({arraydef:{columnalign:"center",columnspacing:a.colspace,rowspacing:a.rowspace,displaystyle:true},minw:this.stack.env.CD_minw||a.harrowsize,minh:this.stack.env.CD_minh||a.varrowsize})},CD_arrow:function(g){var l=this.string.charAt(this.i);if(!l.match(/[>":"\u2192","<":"\u2190",V:"\u2193",A:"\u2191"}[l];var p=this.GetUpTo(g+l,l),m=this.GetUpTo(g+l,l);if(l===">"||l==="<"){h=b.mo(r).With(f);if(!p){p="\\kern "+o.minw}if(p||m){var j={width:"+11mu",lspace:"6mu"};h=b.munderover(this.mmlToken(h));if(p){p=e.Parse(p,this.stack.env).mml();h.SetData(h.over,b.mpadded(p).With(j).With({voffset:".1em"}))}if(m){m=e.Parse(m,this.stack.env).mml();h.SetData(h.under,b.mpadded(m).With(j))}if(a.hideHorizontalLabels){h=b.mpadded(h).With({depth:0,height:".67em"})}}}else{h=r=this.mmlToken(b.mo(r).With(k));if(p||m){h=b.mrow();if(p){h.Append(e.Parse("\\scriptstyle\\llap{"+p+"}",this.stack.env).mml())}h.Append(r.With({texClass:b.TEXCLASS.ORD}));if(m){h.Append(e.Parse("\\scriptstyle\\rlap{"+m+"}",this.stack.env).mml())}}}}}}if(h){this.Push(h)}this.CD_cell(g)},CD_cell:function(f){var g=this.stack.Top();if((g.table||[]).length%2===0&&(g.row||[]).length===0){this.Push(b.mpadded().With({height:"8.5pt",depth:"2pt"}))}this.Push(d.cell().With({isEntry:true,name:f}))},CD_minwidth:function(f){this.stack.env.CD_minw=this.GetDimen(f)},CD_minheight:function(f){this.stack.env.CD_minh=this.GetDimen(f)}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMScd.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/AMSmath.js b/rhodecode/public/js/src/math_jax/extensions/TeX/AMSmath.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/AMSmath.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/AMSmath.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/AMSmath"]={version:"2.7.0",number:0,startNumber:0,IDs:{},eqIDs:{},labels:{},eqlabels:{},refs:[]};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.ElementJax.mml,h=MathJax.InputJax.TeX,g=MathJax.Extension["TeX/AMSmath"];var d=h.Definitions,f=h.Stack.Item,a=h.config.equationNumbers;var c=function(k){var n=[];for(var l=0,j=k.length;l0){p+="rl";o.push("0em 0em");q--}o=o.join(" ");if(i){return this.AMSarray(l,j,i,p,o)}var m=this.AMSarray(l,j,i,p,o);return this.setArrayAlign(m,k)},EquationBegin:function(i,j){this.checkEqnEnv();this.stack.global.forcetag=(j&&a.autoNumber!=="none");return i},EquationStar:function(i,j){this.stack.global.tagged=true;return j},checkEqnEnv:function(){if(this.stack.global.eqnenv){h.Error(["ErroneousNestingEq","Erroneous nesting of equation structures"])}this.stack.global.eqnenv=true},MultiIntegral:function(j,m){var l=this.GetNext();if(l==="\\"){var k=this.i;l=this.GetArgument(j);this.i=k;if(l==="\\limits"){if(j==="\\idotsint"){m="\\!\\!\\mathop{\\,\\,"+m+"}"}else{m="\\!\\!\\!\\mathop{\\,\\,\\,"+m+"}"}}}this.string=m+" "+this.string.slice(this.i);this.i=0},xArrow:function(k,o,n,i){var m={width:"+"+(n+i)+"mu",lspace:n+"mu"};var p=this.GetBrackets(k),q=this.ParseArg(k);var s=b.mo(b.chars(String.fromCharCode(o))).With({stretchy:true,texClass:b.TEXCLASS.REL});var j=b.munderover(s);j.SetData(j.over,b.mpadded(q).With(m).With({voffset:".15em"}));if(p){p=h.Parse(p,this.stack.env).mml();j.SetData(j.under,b.mpadded(p).With(m).With({voffset:"-.24em"}))}this.Push(j.With({subsupOK:true}))},GetDelimiterArg:function(i){var j=this.trimSpaces(this.GetArgument(i));if(j==""){return null}if(j in d.delimiter){return j}h.Error(["MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",i])},GetStar:function(){var i=(this.GetNext()==="*");if(i){this.i++}return i}});f.Augment({autoTag:function(){var j=this.global;if(!j.notag){g.number++;j.tagID=a.formatNumber(g.number.toString());var i=h.Parse("\\text{"+a.formatTag(j.tagID)+"}",{}).mml();j.tag=b.mtd(i).With({id:a.formatID(j.tagID)})}},getTag:function(){var m=this.global,k=m.tag;m.tagged=true;if(m.label){if(a.useLabelIds){k.id=a.formatID(m.label)}g.eqlabels[m.label]={tag:m.tagID,id:k.id}}if(document.getElementById(k.id)||g.IDs[k.id]||g.eqIDs[k.id]){var l=0,j;do{l++;j=k.id+"_"+l}while(document.getElementById(j)||g.IDs[j]||g.eqIDs[j]);k.id=j;if(m.label){g.eqlabels[m.label].id=j}}g.eqIDs[k.id]=1;this.clearTag();return k},clearTag:function(){var i=this.global;delete i.tag;delete i.tagID;delete i.label},fixInitialMO:function(l){for(var k=0,j=l.length;k0){this.stack[i].Undef(e,f);i--}if(!MathJax.Object.isArray(h)){h=[h]}if(this.isEqn){h.global=true}}this.stack[i].Def(e,h,f)},Push:function(e){this.stack.push(e);this.top=this.stack.length},Pop:function(){var e;if(this.top>1){e=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return e},Find:function(e,g){for(var f=this.top-1;f>=0;f--){var h=this.stack[f].Find(e,g);if(h){return h}}return null},Merge:function(e){e.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(e.stack[0]);var f=[this.top,this.stack.length-this.top].concat(e.stack.slice(1));this.stack.splice.apply(this.stack,f);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(e){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.Add({macros:{begingroup:"BeginGroup",endgroup:"EndGroup",global:["Extension","newcommand"],gdef:["Extension","newcommand"]}},null,true);d.Parse.Augment({BeginGroup:function(e){d.eqnStack.Push(a())},EndGroup:function(e){if(d.eqnStack.top>1){d.eqnStack.Pop()}else{if(d.rootStack.top===1){d.Error(["ExtraEndMissingBegin","Extra %1 or missing \\begingroup",e])}else{d.eqnStack.Clear();d.rootStack.Pop()}}},csFindMacro:function(e){return(d.eqnStack.Find(e,"macros")||d.rootStack.Find(e,"macros"))},envFindName:function(e){return(d.eqnStack.Find(e,"environments")||d.rootStack.Find(e,"environments"))}});d.rootStack=c();d.eqnStack=c(true);d.prefilterHooks.Add(function(){d.rootStack.Reset();d.eqnStack.Clear(true)});d.postfilterHooks.Add(function(){d.rootStack.Merge(d.eqnStack)});MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){b.Add({macros:{global:"Global",gdef:["Macro","\\global\\def"]}},null,true);d.Parse.Augment({setDef:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"environments")},Global:function(e){var f=this.i;var g=this.GetCSname(e);this.i=f;if(g!=="let"&&g!=="def"&&g!=="newcommand"){d.Error(["GlobalNotFollowedBy","%1 not followed by \\let, \\def, or \\newcommand",e])}this.stack.env.isGlobal=true}})});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/boldsymbol.js b/rhodecode/public/js/src/math_jax/extensions/TeX/boldsymbol.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/boldsymbol.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/boldsymbol.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/boldsymbol"]={version:"2.7.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;var c={};c[a.VARIANT.NORMAL]=a.VARIANT.BOLD;c[a.VARIANT.ITALIC]=a.VARIANT.BOLDITALIC;c[a.VARIANT.FRAKTUR]=a.VARIANT.BOLDFRAKTUR;c[a.VARIANT.SCRIPT]=a.VARIANT.BOLDSCRIPT;c[a.VARIANT.SANSSERIF]=a.VARIANT.BOLDSANSSERIF;c["-tex-caligraphic"]="-tex-caligraphic-bold";c["-tex-oldstyle"]="-tex-oldstyle-bold";b.Add({macros:{boldsymbol:"Boldsymbol"}},null,true);d.Parse.Augment({mmlToken:function(f){if(this.stack.env.boldsymbol){var e=f.Get("mathvariant");if(e==null){f.mathvariant=a.VARIANT.BOLD}else{f.mathvariant=(c[e]||e)}}return f},Boldsymbol:function(h){var e=this.stack.env.boldsymbol,f=this.stack.env.font;this.stack.env.boldsymbol=true;this.stack.env.font=null;var g=this.ParseArg(h);this.stack.env.font=f;this.stack.env.boldsymbol=e;this.Push(g)}});MathJax.Hub.Startup.signal.Post("TeX boldsymbol Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/cancel.js b/rhodecode/public/js/src/math_jax/extensions/TeX/cancel.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/cancel.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/cancel.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/cancel"]={version:"2.7.0",ALLOWED:{color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/cancel"];b.setAttributes=function(h,e){if(e!==""){e=e.replace(/ /g,"").split(/,/);for(var g=0,d=e.length;g1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","rgb",0,1])}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_RGB:function(b){b=b.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s*,\s*/);var a="#";if(b.length!==3){this.TEX.Error(["ModelArg1","Color values for the %1 model require 3 numbers","RGB"])}for(var c=0;c<3;c++){if(!b[c].match(/^\d+$/)){this.TEX.Error(["InvalidNumber","Invalid number"])}var d=parseInt(b[c]);if(d>255){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","RGB",0,255])}d=d.toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^\s*(\d+(\.\d*)?|\.\d+)\s*$/)){this.TEX.Error(["InvalidDecimalNumber","Invalid decimal number"])}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error(["ModelArg2","Color values for the %1 model must be between %2 and %3","gray",0,1])}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors[a]){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.Add({macros:{color:"Color",textcolor:"TextColor",definecolor:"DefineColor",colorbox:"ColorBox",fcolorbox:"fColorBox"}},null,true);d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},TextColor:function(h){var g=this.GetBrackets(h),f=this.GetArgument(h);f=b.getColor(g,f);var e=this.stack.env.color;this.stack.env.color=f;var i=this.ParseArg(h);if(e){this.stack.env.color}else{delete this.stack.env.color}this.Push(a.mstyle(i).With({mathcolor:f}))},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/enclose.js b/rhodecode/public/js/src/math_jax/extensions/TeX/enclose.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/enclose.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/enclose.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/enclose"]={version:"2.7.0",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/enclose"].ALLOWED;c.Definitions.Add({macros:{enclose:"Enclose"}},null,true);c.Parse.Augment({Enclose:function(g){var k=this.GetArgument(g),e=this.GetBrackets(g),j=this.ParseArg(g);var l={notation:k.replace(/,/g," ")};if(e){e=e.replace(/ /g,"").split(/,/);for(var h=0,d=e.length;h0){f=Math.min(3,e.scriptlevel+1)}else{f=(e.displaystyle?0:1)}var g=this.inherit;while(g&&g.type!=="math"){g=g.inherit}if(g){this.selection=f}this.choosing=false;return f},selected:function(){return this.data[this.choice()]},setTeXclass:function(e){return this.selected().setTeXclass(e)},isSpacelike:function(){return this.selected().isSpacelike()},isEmbellished:function(){return this.selected().isEmbellished()},Core:function(){return this.selected()},CoreMO:function(){return this.selected().CoreMO()},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){var e=this.Core().toSVG();this.SVGsaveData(e);return e},toCommonHTML:function(e){e=this.CHTMLcreateNode(e);this.CHTMLhandleStyle(e);this.CHTMLhandleColor(e);this.CHTMLaddChild(e,this.choice(),{});return e},toPreviewHTML:function(e){e=this.PHTMLcreateSpan(e);this.PHTMLhandleStyle(e);this.PHTMLhandleColor(e);this.PHTMLaddChild(e,this.choice(),{});return e}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/mediawiki-texvc.js b/rhodecode/public/js/src/math_jax/extensions/TeX/mediawiki-texvc.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/mediawiki-texvc.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/mediawiki-texvc.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/mediawiki-texvc"]={version:"2.7.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){MathJax.InputJax.TeX.Definitions.Add({macros:{AA:["Macro","\u00c5"],alef:["Macro","\\aleph"],alefsym:["Macro","\\aleph"],Alpha:["Macro","\\mathrm{A}"],and:["Macro","\\land"],ang:["Macro","\\angle"],Bbb:["Macro","\\mathbb"],Beta:["Macro","\\mathrm{B}"],bold:["Macro","\\mathbf"],bull:["Macro","\\bullet"],C:["Macro","\\mathbb{C}"],Chi:["Macro","\\mathrm{X}"],clubs:["Macro","\\clubsuit"],cnums:["Macro","\\mathbb{C}"],Complex:["Macro","\\mathbb{C}"],coppa:["Macro","\u03D9"],Coppa:["Macro","\u03D8"],Dagger:["Macro","\\ddagger"],Digamma:["Macro","\u03DC"],darr:["Macro","\\downarrow"],dArr:["Macro","\\Downarrow"],Darr:["Macro","\\Downarrow"],diamonds:["Macro","\\diamondsuit"],empty:["Macro","\\emptyset"],Epsilon:["Macro","\\mathrm{E}"],Eta:["Macro","\\mathrm{H}"],euro:["Macro","\u20AC"],exist:["Macro","\\exists"],geneuro:["Macro","\u20AC"],geneuronarrow:["Macro","\u20AC"],geneurowide:["Macro","\u20AC"],H:["Macro","\\mathbb{H}"],hAar:["Macro","\\Leftrightarrow"],harr:["Macro","\\leftrightarrow"],Harr:["Macro","\\Leftrightarrow"],hearts:["Macro","\\heartsuit"],image:["Macro","\\Im"],infin:["Macro","\\infty"],Iota:["Macro","\\mathrm{I}"],isin:["Macro","\\in"],Kappa:["Macro","\\mathrm{K}"],koppa:["Macro","\u03DF"],Koppa:["Macro","\u03DE"],lang:["Macro","\\langle"],larr:["Macro","\\leftarrow"],Larr:["Macro","\\Leftarrow"],lArr:["Macro","\\Leftarrow"],lrarr:["Macro","\\leftrightarrow"],Lrarr:["Macro","\\Leftrightarrow"],lrArr:["Macro","\\Leftrightarrow"],Mu:["Macro","\\mathrm{M}"],N:["Macro","\\mathbb{N}"],natnums:["Macro","\\mathbb{N}"],Nu:["Macro","\\mathrm{N}"],O:["Macro","\\emptyset"],officialeuro:["Macro","\u20AC"],Omicron:["Macro","\\mathrm{O}"],or:["Macro","\\lor"],P:["Macro","\u00B6"],pagecolor:["Macro","",1],part:["Macro","\\partial"],plusmn:["Macro","\\pm"],Q:["Macro","\\mathbb{Q}"],R:["Macro","\\mathbb{R}"],rang:["Macro","\\rangle"],rarr:["Macro","\\rightarrow"],Rarr:["Macro","\\Rightarrow"],rArr:["Macro","\\Rightarrow"],real:["Macro","\\Re"],reals:["Macro","\\mathbb{R}"],Reals:["Macro","\\mathbb{R}"],Rho:["Macro","\\mathrm{P}"],sdot:["Macro","\\cdot"],sampi:["Macro","\u03E1"],Sampi:["Macro","\u03E0"],sect:["Macro","\\S"],spades:["Macro","\\spadesuit"],stigma:["Macro","\u03DB"],Stigma:["Macro","\u03DA"],sub:["Macro","\\subset"],sube:["Macro","\\subseteq"],supe:["Macro","\\supseteq"],Tau:["Macro","\\mathrm{T}"],textvisiblespace:["Macro","\u2423"],thetasym:["Macro","\\vartheta"],uarr:["Macro","\\uparrow"],uArr:["Macro","\\Uparrow"],Uarr:["Macro","\\Uparrow"],varcoppa:["Macro","\u03D9"],varstigma:["Macro","\u03DB"],vline:["Macro","\\smash{\\large\\lvert}",0],weierp:["Macro","\\wp"],Z:["Macro","\\mathbb{Z}"],Zeta:["Macro","\\mathrm{Z}"]}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mediawiki-texvc.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/mhchem.js b/rhodecode/public/js/src/math_jax/extensions/TeX/mhchem.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/mhchem.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/mhchem.js + * + * Copyright (c) 2009-2016 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. + */ + +if(MathJax.Extension["TeX/mhchem"]){MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mhchem.js")}else{MathJax.Extension["TeX/mhchem"]={version:"2.7.0",config:MathJax.Hub.CombineConfig("TeX.mhchem",{legacy:true})};if(!MathJax.Extension["TeX/mhchem"].config.legacy){MathJax.Callback.Queue(["Require",MathJax.Ajax,"[Contrib]/mhchem/mhchem.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/TeX/mhchem.js"])}else{MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX;var a=MathJax.Object.Subclass({string:"",i:0,tex:"",TEX:"",atom:false,sup:"",sub:"",presup:"",presub:"",Init:function(c){this.string=c},ParseTable:{"-":"Minus","+":"Plus","(":"Open",")":"Close","[":"Open","]":"Close","<":"Less","^":"Superscript",_:"Subscript","*":"Dot",".":"Dot","=":"Equal","#":"Pound","$":"Math","\\":"Macro"," ":"Space"},Arrows:{"->":"rightarrow","<-":"leftarrow","<->":"leftrightarrow","<=>":"rightleftharpoons","<=>>":"Rightleftharpoons","<<=>":"Leftrightharpoons","^":"uparrow",v:"downarrow"},Bonds:{"-":"-","=":"=","#":"\\equiv","~":"\\tripledash","~-":"\\begin{CEstack}{}\\tripledash\\\\-\\end{CEstack}","~=":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","~--":"\\raise2mu{\\begin{CEstack}{}\\tripledash\\\\-\\\\-\\end{CEstack}}","-~-":"\\raise2mu{\\begin{CEstack}{}-\\\\\\tripledash\\\\-\\end{CEstack}}","...":"{\\cdot}{\\cdot}{\\cdot}","....":"{\\cdot}{\\cdot}{\\cdot}{\\cdot}","->":"\\rightarrow","<-":"\\leftarrow","??":"\\text{??}"},Parse:function(){this.tex="";this.atom=false;while(this.i"){this.i+=2;this.AddArrow("->");return}else{this.tex+="{-}"}}this.i++},ParsePlus:function(d){if(this.atom){this.sup+=d}else{this.FinishAtom();this.tex+=d}this.i++},ParseDot:function(d){this.FinishAtom();this.tex+="\\cdot ";this.i++},ParseEqual:function(d){this.FinishAtom();this.tex+="{=}";this.i++},ParsePound:function(d){this.FinishAtom();this.tex+="{\\equiv}";this.i++},ParseOpen:function(e){this.FinishAtom();var d=this.Match(/^\([v^]\)/);if(d){this.tex+="{\\"+this.Arrows[d.charAt(1)]+"}"}else{this.tex+="{"+e;this.i++}},ParseClose:function(d){this.FinishAtom();this.atom=true;this.tex+=d+"}";this.i++},ParseLess:function(e){this.FinishAtom();var d=this.Match(/^(<->?|<=>>?|<<=>)/);if(!d){this.tex+=e;this.i++}else{this.AddArrow(d)}},ParseSuperscript:function(f){f=this.string.charAt(++this.i);if(f==="{"){this.i++;var d=this.Find("}");if(d==="-."){this.sup+="{-}{\\cdot}"}else{if(d){this.sup+=a(d).Parse().replace(/^\{-\}/,"-")}}}else{if(f===" "||f===""){this.tex+="{\\"+this.Arrows["^"]+"}";this.i++}else{var e=this.Match(/^(\d+|-\.)/);if(e){this.sup+=e}}}},ParseSubscript:function(e){if(this.string.charAt(++this.i)=="{"){this.i++;this.sub+=a(this.Find("}")).Parse().replace(/^\{-\}/,"-")}else{var d=this.Match(/^\d+/);if(d){this.sub+=d}}},ParseMath:function(d){this.FinishAtom();this.i++;this.tex+=this.Find(d)},ParseMacro:function(f){this.FinishAtom();this.i++;var d=this.Match(/^([a-z]+|.)/i)||" ";if(d==="sbond"){this.tex+="{-}"}else{if(d==="dbond"){this.tex+="{=}"}else{if(d==="tbond"){this.tex+="{\\equiv}"}else{if(d==="bond"){var e=(this.Match(/^\{.*?\}/)||"");e=e.substr(1,e.length-2);this.tex+="{"+(this.Bonds[e]||"\\text{??}")+"}"}else{if(d==="{"){this.tex+="{\\{"}else{if(d==="}"){this.tex+="\\}}";this.atom=true}else{this.tex+=f+d}}}}}}},ParseSpace:function(d){this.FinishAtom();this.i++},ParseOther:function(d){this.FinishAtom();this.tex+=d;this.i++},AddArrow:function(e){var g=this.Match(/^[CT]\[/);if(g){this.i--;g=g.charAt(0)}var d=this.GetBracket(g),f=this.GetBracket(g);e=this.Arrows[e];if(d||f){if(f){e+="["+f+"]"}e+="{"+d+"}";e="\\mathrel{\\x"+e+"}"}else{e="\\long"+e+" "}this.tex+=e},FinishAtom:function(c){if(this.sup||this.sub||this.presup||this.presub){if(!c&&!this.atom){if(this.tex===""&&!this.sup&&!this.sub){return}if(!this.presup&&!this.presub&&(this.tex===""||this.tex==="{"||(this.tex==="}"&&this.TEX.substr(-1)==="{"))){this.presup=this.sup,this.presub=this.sub;this.sub=this.sup="";this.TEX+=this.tex;this.tex="";return}}if(this.sub&&!this.sup){this.sup="\\Space{0pt}{0pt}{.2em}"}if((this.presup||this.presub)&&this.tex!=="{"){if(!this.presup&&!this.sup){this.presup="\\Space{0pt}{0pt}{.2em}"}this.tex="\\CEprescripts{"+(this.presub||"\\CEnone")+"}{"+(this.presup||"\\CEnone")+"}{"+(this.tex!=="}"?this.tex:"")+"}{"+(this.sub||"\\CEnone")+"}{"+(this.sup||"\\CEnone")+"}"+(this.tex==="}"?"}":"");this.presub=this.presup=""}else{if(this.sup){this.tex+="^{"+this.sup+"}"}if(this.sub){this.tex+="_{"+this.sub+"}"}}this.sup=this.sub=""}this.TEX+=this.tex;this.tex="";this.atom=false},GetBracket:function(e){if(this.string.charAt(this.i)!=="["){return""}this.i++;var d=this.Find("]");if(e==="C"){d="\\ce{"+d+"}"}else{if(e==="T"){if(!d.match(/^\{.*\}$/)){d="{"+d+"}"}d="\\text"+d}}return d},Match:function(d){var c=d.exec(this.string.substr(this.i));if(c){c=c[0];this.i+=c.length}return c},Find:function(h){var d=this.string.length,e=this.i,g=0;while(this.i0){return[h,g]}else{return h}}}this.i++}b.Error(["MissingReplacementString","Missing replacement string for definition of %1",f])},MacroWithTemplate:function(d,g,h,f){if(h){var c=[];this.GetNext();if(f[0]&&!this.MatchParam(f[0])){b.Error(["MismatchUseDef","Use of %1 doesn't match its definition",d])}for(var e=0;eb.config.MAXMACROS){b.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},BeginEnv:function(g,k,c,j,h){if(j){var e=[];if(h!=null){var d=this.GetBrackets("\\begin{"+name+"}");e.push(d==null?h:d)}for(var f=e.length;f1){var n=(q.h+q.d)/2,j=h.TeX.x_height/2;p.parentNode.style.verticalAlign=h.Em(q.d+(j-n));q.h=j+n;q.d=n-j}p.bbox={h:q.h,d:q.d,w:k,lw:0,rw:k};return p}})});b.Register.StartupHook("SVG Jax Config",function(){b.Config({SVG:{styles:{".MathJax_SVG .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("SVG Jax Ready",function(){var g=MathJax.ElementJax.mml;var f=g.math.prototype.toSVG,h=g.merror.prototype.toSVG;g.math.Augment({toSVG:function(i,j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){i=k.data[0].toSVG(i)}else{i=f.apply(this,arguments)}return i}});g.merror.Augment({toSVG:function(n){if(!this.isError||this.Parent().type!=="math"){return h.apply(this,arguments)}n=e.addElement(n,"span",{className:"noError",isMathJax:true});if(this.multiLine){n.style.display="inline-block"}var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,j=o.length;l1){var k=n.offsetHeight/2;n.style.verticalAlign=(-k+(k/j))+"px"}return n}})});b.Register.StartupHook("NativeMML Jax Ready",function(){var h=MathJax.ElementJax.mml;var g=MathJax.Extension["TeX/noErrors"].config;var f=h.math.prototype.toNativeMML,i=h.merror.prototype.toNativeMML;h.math.Augment({toNativeMML:function(j){var k=this.data[0];if(k&&k.data[0]&&k.data[0].isError){j=k.data[0].toNativeMML(j)}else{j=f.apply(this,arguments)}return j}});h.merror.Augment({toNativeMML:function(n){if(!this.isError){return i.apply(this,arguments)}n=n.appendChild(document.createElement("span"));var o=this.data[0].data[0].data.join("").split(/\n/);for(var l=0,k=o.length;l1){n.style.verticalAlign="middle"}}for(var p in g.style){if(g.style.hasOwnProperty(p)){var j=p.replace(/-./g,function(m){return m.charAt(1).toUpperCase()});n.style[j]=g.style[p]}}return n}})});b.Register.StartupHook("PreviewHTML Jax Config",function(){b.Config({PreviewHTML:{styles:{".MathJax_PHTML .noError":b.Insert({"vertical-align":(b.Browser.isMSIE&&a.multiLine?"-2px":"")},a.style)}}})});b.Register.StartupHook("PreviewHTML Jax Ready",function(){var f=MathJax.ElementJax.mml;var h=MathJax.HTML;var g=f.merror.prototype.toPreviewHTML;f.merror.Augment({toPreviewHTML:function(l){if(!this.isError){return g.apply(this,arguments)}l=this.PHTMLcreateSpan(l);l.className="noError";if(this.multiLine){l.style.display="inline-block"}var n=this.data[0].data[0].data.join("").split(/\n/);for(var k=0,j=n.length;k1){var l=1.2*j/2;o.h=l+0.25;o.d=l-0.25;n.style.verticalAlign=g.Em(0.45-l)}else{o.h=1;o.d=0.2+2/g.em}return n}})});b.Startup.signal.Post("TeX noErrors Ready")})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/noUndefined.js b/rhodecode/public/js/src/math_jax/extensions/TeX/noUndefined.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/noUndefined.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/noUndefined.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/noUndefined"]={version:"2.7.0",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - undefined control sequence",d]);this.Push(a.mtext(d).With(b.attributes))}});MathJax.Hub.Startup.signal.Post("TeX noUndefined Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/noUndefined.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/unicode.js b/rhodecode/public/js/src/math_jax/extensions/TeX/unicode.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/unicode.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/unicode.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/unicode"]={version:"2.7.0",unicode:{},config:MathJax.Hub.CombineConfig("TeX.unicode",{fonts:"STIXGeneral,'Arial Unicode MS'"})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;var a=MathJax.ElementJax.mml;var b=MathJax.Extension["TeX/unicode"].unicode;c.Definitions.Add({macros:{unicode:"Unicode"}},null,true);c.Parse.Augment({Unicode:function(e){var i=this.GetBrackets(e),d;if(i){if(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)){i=i.replace(/ /g,"").split(/,/);d=this.GetBrackets(e)}else{d=i;i=null}}var j=this.trimSpaces(this.GetArgument(e)),h=parseInt(j.match(/^x/)?"0"+j:j);if(!b[h]){b[h]=[800,200,d,h]}else{if(!d){d=b[h][2]}}if(i){b[h][0]=Math.floor(i[0]*1000);b[h][1]=Math.floor(i[1]*1000)}var f=this.stack.env.font,g={};if(d){b[h][2]=g.fontfamily=d.replace(/"/g,"'");if(f){if(f.match(/bold/)){g.fontweight="bold"}if(f.match(/italic|-mathit/)){g.fontstyle="italic"}}}else{if(f){g.mathvariant=f}}g.unicode=[].concat(b[h]);this.Push(a.mtext(a.entity("#"+j)).With(g))}});MathJax.Hub.Startup.signal.Post("TeX unicode Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.HTMLgetVariant;a.mbase.Augment({HTMLgetVariant:function(){var d=b.apply(this,arguments);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.defaultFont){d=MathJax.Hub.Insert({},d);d.defaultFont={family:c}}var e=this.unicode[2];if(e){e+=","+c}else{e=c}d.defaultFont[this.unicode[3]]=[this.unicode[0],this.unicode[1],500,0,500,{isUnknown:true,isUnicode:true,font:e}];return d}})});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.SVGgetVariant;a.mbase.Augment({SVGgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.forceFamily){d=MathJax.Hub.Insert({},d)}d.defaultFamily=c;d.noRemap=true;d.h=this.unicode[0];d.d=this.unicode[1];return d}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/TeX/verb.js b/rhodecode/public/js/src/math_jax/extensions/TeX/verb.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/TeX/verb.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/TeX/verb.js + * + * Copyright (c) 2009-2016 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.Extension["TeX/verb"]={version:"2.7.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX;var b=c.Definitions;b.Add({macros:{verb:"Verb"}},null,true);c.Parse.Augment({Verb:function(d){var g=this.GetNext();var f=++this.i;if(g==""){c.Error(["MissingArgFor","Missing argument for %1",d])}while(this.i=0;a--){if(String(c[a].className).match(/(^| )math( |$)/)){this.ConvertMath(c[a],"")}}var d=b.getElementsByTagName("div");for(a=d.length-1;a>=0;a--){if(String(d[a].className).match(/(^| )math( |$)/)){this.ConvertMath(d[a],"; mode=display")}}},ConvertMath:function(c,d){if(c.getElementsByTagName("script").length===0){var b=c.parentNode,a=this.createMathTag(d,c.innerHTML);if(c.nextSibling){b.insertBefore(a,c.nextSibling)}else{b.appendChild(a)}if(this.config.preview!=="none"){this.createPreview(c)}b.removeChild(c)}},createPreview:function(b){var a=MathJax.Hub.config.preRemoveClass;var c=this.config.preview;if(c==="none"){return}if((b.previousSibling||{}).className===a){return}if(c==="TeX"){c=[this.filterPreview(b.innerHTML)]}if(c){c=MathJax.HTML.Element("span",{className:a},c);b.parentNode.insertBefore(c,b)}},createMathTag:function(c,b){b=b.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");var a=document.createElement("script");a.type="math/tex"+c;MathJax.HTML.setScript(a,b);return a},filterPreview:function(a){return a}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.jsMath2jax],8);MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/mml2jax.js b/rhodecode/public/js/src/math_jax/extensions/mml2jax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/mml2jax.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/mml2jax.js + * + * Copyright (c) 2009-2016 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.Extension.mml2jax={version:"2.7.0",config:{preview:"mathml"},MMLnamespace:"http://www.w3.org/1998/Math/MathML",PreProcess:function(e){if(!this.configured){this.config=MathJax.Hub.CombineConfig("mml2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}this.InitBrowser();this.configured=true}if(typeof(e)==="string"){e=document.getElementById(e)}if(!e){e=document.body}var h=[];this.PushMathElements(h,e,"math");this.PushMathElements(h,e,"math",this.MMLnamespace);var d,b;if(typeof(document.namespaces)!=="undefined"){try{for(d=0,b=document.namespaces.length;d/i,"").replace(/<\?xml:namespace .*?\/>/i,"");b=b.replace(/ /g," ")}MathJax.HTML.setScript(a,b);d.removeChild(e)}else{var c=MathJax.HTML.Element("span");c.appendChild(e);MathJax.HTML.setScript(a,c.innerHTML)}if(this.config.preview!=="none"){this.createPreview(e,a)}},ProcessMathFlattened:function(f){var d=f.parentNode;if(!d||d.className===MathJax.Hub.config.preRemoveClass){return}var b=document.createElement("script");b.type="math/mml";d.insertBefore(b,f);var c="",e,a=f;while(f&&f.nodeName!=="/MATH"){e=f;f=f.nextSibling;c+=this.NodeHTML(e);e.parentNode.removeChild(e)}if(f&&f.nodeName==="/MATH"){f.parentNode.removeChild(f)}b.text=c+"";if(this.config.preview!=="none"){this.createPreview(a,b)}},NodeHTML:function(e){var c,b,a;if(e.nodeName==="#text"){c=this.quoteHTML(e.nodeValue)}else{if(e.nodeName==="#comment"){c=""}else{c="<"+e.nodeName.toLowerCase();for(b=0,a=e.attributes.length;b";if(e.outerHTML!=null&&e.outerHTML.match(/(.<\/[A-Z]+>|\/>)$/)){for(b=0,a=e.childNodes.length;b"}}}return c},OuterHTML:function(d){if(d.nodeName.charAt(0)==="#"){return this.NodeHTML(d)}if(!this.AttributeBug){return d.outerHTML}var c=this.NodeHTML(d);for(var b=0,a=d.childNodes.length;b";return c},quoteHTML:function(a){if(a==null){a=""}return a.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""")},createPreview:function(g,f){var e=this.config.preview;if(e==="none"){return}var i=false;var c=MathJax.Hub.config.preRemoveClass;if((f.previousSibling||{}).className===c){return}if(e==="mathml"){i=true;if(this.MathTagBug){e="alttext"}else{e=g.cloneNode(true)}}if(e==="alttext"||e==="altimg"){i=true;var d=this.filterPreview(g.getAttribute("alttext"));if(e==="alttext"){if(d!=null){e=MathJax.HTML.TextNode(d)}else{e=null}}else{var a=g.getAttribute("altimg");if(a!=null){var b={width:g.getAttribute("altimg-width"),height:g.getAttribute("altimg-height")};e=MathJax.HTML.Element("img",{src:a,alt:d,style:b})}else{e=null}}}if(e){var h;if(i){h=MathJax.HTML.Element("span",{className:c});h.appendChild(e)}else{h=MathJax.HTML.Element("span",{className:c},e)}f.parentNode.insertBefore(h,f)}},filterPreview:function(a){return a},InitBrowser:function(){var b=MathJax.HTML.Element("span",{id:"<",className:"mathjax",innerHTML:"x"});var a=b.outerHTML||"";this.AttributeBug=a!==""&&!(a.match(/id="<"/)&&a.match(/class="mathjax"/)&&a.match(/<\/math>/));this.MathTagBug=b.childNodes.length>1;this.CleanupHTML=MathJax.Hub.Browser.isMSIE}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax],5);MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js"); diff --git a/rhodecode/public/js/src/math_jax/extensions/tex2jax.js b/rhodecode/public/js/src/math_jax/extensions/tex2jax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/extensions/tex2jax.js @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/tex2jax.js + * + * Copyright (c) 2009-2016 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.Extension.tex2jax={version:"2.7.0",config:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],balanceBraces:true,skipTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",processEscapes:false,processEnvironments:true,processRefs:true,preview:"TeX"},ignoreTags:{br:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9?"\n":" "),wbr:"","#comment":""},PreProcess:function(a){if(!this.configured){this.config=MathJax.Hub.CombineConfig("tex2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.configured=true}if(typeof(a)==="string"){a=document.getElementById(a)}if(!a){a=document.body}if(this.createPatterns()){this.scanElement(a,a.nextSibling)}},createPatterns:function(){var d=[],e=[],c,a,b=this.config;this.match={};for(c=0,a=b.inlineMath.length;c0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d"}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("")+""}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+""},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||!this.attr.xmlns)){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{">":">","<":"<","&":"&"}[i]});j.push(d+' '+l+"");j.push(d+" ")}return d+"<"+p+k+">\n"+j.join("\n")+"\n"+d+""}});a.msubsup.Augment({toMathML:function(j){var f=this.type;if(this.data[this.sup]==null){f="msub"}if(this.data[this.sub]==null){f="msup"}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+j+""}});a.munderover.Augment({toMathML:function(k){var f=this.type;var j=this.data[this.base];if(j&&j.isa(a.TeXAtom)&&j.movablelimits&&!j.Get("displaystyle")){type="msubsup";if(this.data[this.under]==null){f="msup"}if(this.data[this.over]==null){f="msub"}}else{if(this.data[this.under]==null){f="mover"}if(this.data[this.over]==null){f="munder"}}var e=this.toMathMLattributes();delete this.data[0].inferred;var h=[];for(var g=0,d=this.data.length;g\n"+h.join("\n")+"\n"+k+""}});a.TeXAtom.Augment({toMathML:function(e){var d=this.toMathMLattributes();if(!d&&this.data[0].data.length===1){return e.substr(2)+this.data[0].toMathML(e)}return e+"\n"+this.data[0].toMathML(e+" ")+"\n"+e+""}});a.chars.Augment({toMathML:function(d){return(d||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(d){return(d||"")+"&"+this.data[0]+";"}});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("[MathJax]/extensions/toMathML.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/jax.js b/rhodecode/public/js/src/math_jax/jax/element/mml/jax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/jax.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/jax.js + * + * Copyright (c) 2009-2016 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.ElementJax.mml=MathJax.ElementJax({mimeType:"jax/mml"},{id:"mml",version:"2.7.0",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.attr&&this.root.attr.mode){if(!this.root.display&&this.root.attr.mode==="display"){this.root.display="block";this.root.attrNames.push("display")}delete this.root.attr.mode;for(var b=0,a=this.root.attrNames.length;b0||this.Get("scriptlevel")>0)&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},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(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},childIndex:function(g){if(g==null){return}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir: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:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,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(g,n){var l=this.def;if(!l){if(g==="form"){this.useMMLspacing&=~this.SPACE_ATTR.form;return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}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(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);g=null;for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}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:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){var e=this.Get("scriptlevel",null,true);f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},getRemoved:{fontfamily:"fontFamily",fontweight:"fontWeight",fontstyle:"fontStyle",fontsize:"fontSize"},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,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:true,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:","},addFakeNodes:function(){var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}));this.data.open.useMMLspacing=0}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}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(e){if(e%2===1){return true}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"],linebreakContainer:true,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(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}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:true,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:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},adjustChild_displaystyle:function(){return(this.displaystyle!=null?this.displaystyle:this.defaults.displaystyle)},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,displaystyle:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+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 f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Arrows.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Arrows.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Arrows.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/Arrows.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u219A":c.RELACCENT,"\u219B":c.RELACCENT,"\u219C":c.WIDEREL,"\u219D":c.WIDEREL,"\u219E":c.WIDEREL,"\u219F":c.WIDEREL,"\u21A0":c.WIDEREL,"\u21A1":c.RELSTRETCH,"\u21A2":c.WIDEREL,"\u21A3":c.WIDEREL,"\u21A4":c.WIDEREL,"\u21A5":c.RELSTRETCH,"\u21A7":c.RELSTRETCH,"\u21A8":c.RELSTRETCH,"\u21AB":c.WIDEREL,"\u21AC":c.WIDEREL,"\u21AD":c.WIDEREL,"\u21AE":c.RELACCENT,"\u21AF":c.RELSTRETCH,"\u21B0":c.RELSTRETCH,"\u21B1":c.RELSTRETCH,"\u21B2":c.RELSTRETCH,"\u21B3":c.RELSTRETCH,"\u21B4":c.RELSTRETCH,"\u21B5":c.RELSTRETCH,"\u21B6":c.RELACCENT,"\u21B7":c.RELACCENT,"\u21B8":c.REL,"\u21B9":c.WIDEREL,"\u21BA":c.REL,"\u21BB":c.REL,"\u21BE":c.RELSTRETCH,"\u21BF":c.RELSTRETCH,"\u21C2":c.RELSTRETCH,"\u21C3":c.RELSTRETCH,"\u21C4":c.WIDEREL,"\u21C5":c.RELSTRETCH,"\u21C6":c.WIDEREL,"\u21C7":c.WIDEREL,"\u21C8":c.RELSTRETCH,"\u21C9":c.WIDEREL,"\u21CA":c.RELSTRETCH,"\u21CB":c.WIDEREL,"\u21CD":c.RELACCENT,"\u21CE":c.RELACCENT,"\u21CF":c.RELACCENT,"\u21D6":c.RELSTRETCH,"\u21D7":c.RELSTRETCH,"\u21D8":c.RELSTRETCH,"\u21D9":c.RELSTRETCH,"\u21DA":c.WIDEREL,"\u21DB":c.WIDEREL,"\u21DC":c.WIDEREL,"\u21DD":c.WIDEREL,"\u21DE":c.REL,"\u21DF":c.REL,"\u21E0":c.WIDEREL,"\u21E1":c.RELSTRETCH,"\u21E2":c.WIDEREL,"\u21E3":c.RELSTRETCH,"\u21E4":c.WIDEREL,"\u21E5":c.WIDEREL,"\u21E6":c.WIDEREL,"\u21E7":c.RELSTRETCH,"\u21E8":c.WIDEREL,"\u21E9":c.RELSTRETCH,"\u21EA":c.RELSTRETCH,"\u21EB":c.RELSTRETCH,"\u21EC":c.RELSTRETCH,"\u21ED":c.RELSTRETCH,"\u21EE":c.RELSTRETCH,"\u21EF":c.RELSTRETCH,"\u21F0":c.WIDEREL,"\u21F1":c.REL,"\u21F2":c.REL,"\u21F3":c.RELSTRETCH,"\u21F4":c.RELACCENT,"\u21F5":c.RELSTRETCH,"\u21F6":c.WIDEREL,"\u21F7":c.RELACCENT,"\u21F8":c.RELACCENT,"\u21F9":c.RELACCENT,"\u21FA":c.RELACCENT,"\u21FB":c.RELACCENT,"\u21FC":c.RELACCENT,"\u21FD":c.WIDEREL,"\u21FE":c.WIDEREL,"\u21FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/Arrows.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/BasicLatin.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/BasicLatin.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/BasicLatin.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/BasicLatin.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},postfix:{"!!":[1,0,b.BIN],"'":c.ACCENT,"++":[0,0,b.BIN],"--":[0,0,b.BIN],"..":[0,0,b.BIN],"...":c.ORD,"||":[0,0,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[0,0,b.ORD,{fence:true,stretchy:true,symmetric:true}]},infix:{"!=":c.BIN4,"&&":c.BIN4,"**":[1,1,b.BIN],"*=":c.BIN4,"+=":c.BIN4,"-=":c.BIN4,"->":c.BIN5,"//":[1,1,b.BIN],"/=":c.BIN4,":=":c.BIN4,"<=":c.BIN5,"<>":[1,1,b.BIN],"==":c.BIN4,">=":c.BIN5,"@":c.ORD11,"||":[2,2,b.BIN,{fence:true,stretchy:true,symmetric:true}],"|||":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/BasicLatin.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiacritMarks.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiacritMarks.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiacritMarks.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/CombDiacritMarks.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u0311":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiacritMarks.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiactForSymbols.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiactForSymbols.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/CombDiactForSymbols.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/CombDiactForSymbols.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u20DB":c.ACCENT,"\u20DC":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/CombDiactForSymbols.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Dingbats.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Dingbats.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Dingbats.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/Dingbats.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2772":c.OPEN},postfix:{"\u2773":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/Dingbats.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeneralPunctuation.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeneralPunctuation.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeneralPunctuation.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/GeneralPunctuation.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2018":[0,0,b.OPEN,{fence:true}],"\u201C":[0,0,b.OPEN,{fence:true}]},postfix:{"\u2016":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2019":[0,0,b.CLOSE,{fence:true}],"\u201D":[0,0,b.CLOSE,{fence:true}]}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeneralPunctuation.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeometricShapes.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeometricShapes.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GeometricShapes.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/GeometricShapes.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u25A0":c.BIN3,"\u25A1":c.BIN3,"\u25AA":c.BIN3,"\u25AB":c.BIN3,"\u25AD":c.BIN3,"\u25AE":c.BIN3,"\u25AF":c.BIN3,"\u25B0":c.BIN3,"\u25B1":c.BIN3,"\u25B2":c.BIN4,"\u25B4":c.BIN4,"\u25B6":c.BIN4,"\u25B7":c.BIN4,"\u25B8":c.BIN4,"\u25BC":c.BIN4,"\u25BE":c.BIN4,"\u25C0":c.BIN4,"\u25C1":c.BIN4,"\u25C2":c.BIN4,"\u25C4":c.BIN4,"\u25C5":c.BIN4,"\u25C6":c.BIN4,"\u25C7":c.BIN4,"\u25C8":c.BIN4,"\u25C9":c.BIN4,"\u25CC":c.BIN4,"\u25CD":c.BIN4,"\u25CE":c.BIN4,"\u25CF":c.BIN4,"\u25D6":c.BIN4,"\u25D7":c.BIN4,"\u25E6":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/GeometricShapes.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GreekAndCoptic.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GreekAndCoptic.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/GreekAndCoptic.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/GreekAndCoptic.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u03F6":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/GreekAndCoptic.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Latin1Supplement.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Latin1Supplement.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/Latin1Supplement.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/Latin1Supplement.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u00B0":c.ORD,"\u00B4":c.ACCENT,"\u00B8":c.ACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/Latin1Supplement.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/LetterlikeSymbols.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/LetterlikeSymbols.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/LetterlikeSymbols.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/LetterlikeSymbols.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2145":c.ORD21,"\u2146":[2,0,b.ORD]}}});MathJax.Ajax.loadComplete(a.optableDir+"/LetterlikeSymbols.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MathOperators.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MathOperators.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MathOperators.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/MathOperators.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2204":c.ORD21,"\u221B":c.ORD11,"\u221C":c.ORD11,"\u2221":c.ORD,"\u2222":c.ORD,"\u222C":c.INTEGRAL,"\u222D":c.INTEGRAL,"\u222F":c.INTEGRAL,"\u2230":c.INTEGRAL,"\u2231":c.INTEGRAL,"\u2232":c.INTEGRAL,"\u2233":c.INTEGRAL},infix:{"\u2201":[1,2,b.ORD],"\u2206":c.BIN3,"\u220A":c.REL,"\u220C":c.REL,"\u220D":c.REL,"\u220E":c.BIN3,"\u2214":c.BIN4,"\u221F":c.REL,"\u2224":c.REL,"\u2226":c.REL,"\u2234":c.REL,"\u2235":c.REL,"\u2236":c.REL,"\u2237":c.REL,"\u2238":c.BIN4,"\u2239":c.REL,"\u223A":c.BIN4,"\u223B":c.REL,"\u223D":c.REL,"\u223D\u0331":c.BIN3,"\u223E":c.REL,"\u223F":c.BIN3,"\u2241":c.REL,"\u2242":c.REL,"\u2242\u0338":c.REL,"\u2244":c.REL,"\u2246":c.REL,"\u2247":c.REL,"\u2249":c.REL,"\u224A":c.REL,"\u224B":c.REL,"\u224C":c.REL,"\u224E":c.REL,"\u224E\u0338":c.REL,"\u224F":c.REL,"\u224F\u0338":c.REL,"\u2251":c.REL,"\u2252":c.REL,"\u2253":c.REL,"\u2254":c.REL,"\u2255":c.REL,"\u2256":c.REL,"\u2257":c.REL,"\u2258":c.REL,"\u2259":c.REL,"\u225A":c.REL,"\u225C":c.REL,"\u225D":c.REL,"\u225E":c.REL,"\u225F":c.REL,"\u2262":c.REL,"\u2263":c.REL,"\u2266":c.REL,"\u2266\u0338":c.REL,"\u2267":c.REL,"\u2268":c.REL,"\u2269":c.REL,"\u226A\u0338":c.REL,"\u226B\u0338":c.REL,"\u226C":c.REL,"\u226D":c.REL,"\u226E":c.REL,"\u226F":c.REL,"\u2270":c.REL,"\u2271":c.REL,"\u2272":c.REL,"\u2273":c.REL,"\u2274":c.REL,"\u2275":c.REL,"\u2276":c.REL,"\u2277":c.REL,"\u2278":c.REL,"\u2279":c.REL,"\u227C":c.REL,"\u227D":c.REL,"\u227E":c.REL,"\u227F":c.REL,"\u227F\u0338":c.REL,"\u2280":c.REL,"\u2281":c.REL,"\u2282\u20D2":c.REL,"\u2283\u20D2":c.REL,"\u2284":c.REL,"\u2285":c.REL,"\u2288":c.REL,"\u2289":c.REL,"\u228A":c.REL,"\u228B":c.REL,"\u228C":c.BIN4,"\u228D":c.BIN4,"\u228F":c.REL,"\u228F\u0338":c.REL,"\u2290":c.REL,"\u2290\u0338":c.REL,"\u229A":c.BIN4,"\u229B":c.BIN4,"\u229C":c.BIN4,"\u229D":c.BIN4,"\u229E":c.BIN4,"\u229F":c.BIN4,"\u22A0":c.BIN4,"\u22A1":c.BIN4,"\u22A6":c.REL,"\u22A7":c.REL,"\u22A9":c.REL,"\u22AA":c.REL,"\u22AB":c.REL,"\u22AC":c.REL,"\u22AD":c.REL,"\u22AE":c.REL,"\u22AF":c.REL,"\u22B0":c.REL,"\u22B1":c.REL,"\u22B2":c.REL,"\u22B3":c.REL,"\u22B4":c.REL,"\u22B5":c.REL,"\u22B6":c.REL,"\u22B7":c.REL,"\u22B8":c.REL,"\u22B9":c.REL,"\u22BA":c.BIN4,"\u22BB":c.BIN4,"\u22BC":c.BIN4,"\u22BD":c.BIN4,"\u22BE":c.BIN3,"\u22BF":c.BIN3,"\u22C7":c.BIN4,"\u22C9":c.BIN4,"\u22CA":c.BIN4,"\u22CB":c.BIN4,"\u22CC":c.BIN4,"\u22CD":c.REL,"\u22CE":c.BIN4,"\u22CF":c.BIN4,"\u22D0":c.REL,"\u22D1":c.REL,"\u22D2":c.BIN4,"\u22D3":c.BIN4,"\u22D4":c.REL,"\u22D5":c.REL,"\u22D6":c.REL,"\u22D7":c.REL,"\u22D8":c.REL,"\u22D9":c.REL,"\u22DA":c.REL,"\u22DB":c.REL,"\u22DC":c.REL,"\u22DD":c.REL,"\u22DE":c.REL,"\u22DF":c.REL,"\u22E0":c.REL,"\u22E1":c.REL,"\u22E2":c.REL,"\u22E3":c.REL,"\u22E4":c.REL,"\u22E5":c.REL,"\u22E6":c.REL,"\u22E7":c.REL,"\u22E8":c.REL,"\u22E9":c.REL,"\u22EA":c.REL,"\u22EB":c.REL,"\u22EC":c.REL,"\u22ED":c.REL,"\u22F0":c.REL,"\u22F2":c.REL,"\u22F3":c.REL,"\u22F4":c.REL,"\u22F5":c.REL,"\u22F6":c.REL,"\u22F7":c.REL,"\u22F8":c.REL,"\u22F9":c.REL,"\u22FA":c.REL,"\u22FB":c.REL,"\u22FC":c.REL,"\u22FD":c.REL,"\u22FE":c.REL,"\u22FF":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/MathOperators.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsA.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsA.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsA.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/MiscMathSymbolsA.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u27E6":c.OPEN,"\u27EA":c.OPEN,"\u27EC":c.OPEN},postfix:{"\u27E7":c.CLOSE,"\u27EB":c.CLOSE,"\u27ED":c.CLOSE}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsA.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsB.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsB.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscMathSymbolsB.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/MiscMathSymbolsB.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2983":c.OPEN,"\u2985":c.OPEN,"\u2987":c.OPEN,"\u2989":c.OPEN,"\u298B":c.OPEN,"\u298D":c.OPEN,"\u298F":c.OPEN,"\u2991":c.OPEN,"\u2993":c.OPEN,"\u2995":c.OPEN,"\u2997":c.OPEN,"\u29FC":c.OPEN},postfix:{"\u2980":[0,0,b.ORD,{fence:true,stretchy:true}],"\u2984":c.CLOSE,"\u2986":c.CLOSE,"\u2988":c.CLOSE,"\u298A":c.CLOSE,"\u298C":c.CLOSE,"\u298E":c.CLOSE,"\u2990":c.CLOSE,"\u2992":c.CLOSE,"\u2994":c.CLOSE,"\u2996":c.CLOSE,"\u2998":c.CLOSE,"\u29FD":c.CLOSE},infix:{"\u2981":c.BIN3,"\u2982":c.BIN3,"\u2999":c.BIN3,"\u299A":c.BIN3,"\u299B":c.BIN3,"\u299C":c.BIN3,"\u299D":c.BIN3,"\u299E":c.BIN3,"\u299F":c.BIN3,"\u29A0":c.BIN3,"\u29A1":c.BIN3,"\u29A2":c.BIN3,"\u29A3":c.BIN3,"\u29A4":c.BIN3,"\u29A5":c.BIN3,"\u29A6":c.BIN3,"\u29A7":c.BIN3,"\u29A8":c.BIN3,"\u29A9":c.BIN3,"\u29AA":c.BIN3,"\u29AB":c.BIN3,"\u29AC":c.BIN3,"\u29AD":c.BIN3,"\u29AE":c.BIN3,"\u29AF":c.BIN3,"\u29B0":c.BIN3,"\u29B1":c.BIN3,"\u29B2":c.BIN3,"\u29B3":c.BIN3,"\u29B4":c.BIN3,"\u29B5":c.BIN3,"\u29B6":c.BIN4,"\u29B7":c.BIN4,"\u29B8":c.BIN4,"\u29B9":c.BIN4,"\u29BA":c.BIN4,"\u29BB":c.BIN4,"\u29BC":c.BIN4,"\u29BD":c.BIN4,"\u29BE":c.BIN4,"\u29BF":c.BIN4,"\u29C0":c.REL,"\u29C1":c.REL,"\u29C2":c.BIN3,"\u29C3":c.BIN3,"\u29C4":c.BIN4,"\u29C5":c.BIN4,"\u29C6":c.BIN4,"\u29C7":c.BIN4,"\u29C8":c.BIN4,"\u29C9":c.BIN3,"\u29CA":c.BIN3,"\u29CB":c.BIN3,"\u29CC":c.BIN3,"\u29CD":c.BIN3,"\u29CE":c.REL,"\u29CF":c.REL,"\u29CF\u0338":c.REL,"\u29D0":c.REL,"\u29D0\u0338":c.REL,"\u29D1":c.REL,"\u29D2":c.REL,"\u29D3":c.REL,"\u29D4":c.REL,"\u29D5":c.REL,"\u29D6":c.BIN4,"\u29D7":c.BIN4,"\u29D8":c.BIN3,"\u29D9":c.BIN3,"\u29DB":c.BIN3,"\u29DC":c.BIN3,"\u29DD":c.BIN3,"\u29DE":c.REL,"\u29DF":c.BIN3,"\u29E0":c.BIN3,"\u29E1":c.REL,"\u29E2":c.BIN4,"\u29E3":c.REL,"\u29E4":c.REL,"\u29E5":c.REL,"\u29E6":c.REL,"\u29E7":c.BIN3,"\u29E8":c.BIN3,"\u29E9":c.BIN3,"\u29EA":c.BIN3,"\u29EB":c.BIN3,"\u29EC":c.BIN3,"\u29ED":c.BIN3,"\u29EE":c.BIN3,"\u29EF":c.BIN3,"\u29F0":c.BIN3,"\u29F1":c.BIN3,"\u29F2":c.BIN3,"\u29F3":c.BIN3,"\u29F4":c.REL,"\u29F5":c.BIN4,"\u29F6":c.BIN4,"\u29F7":c.BIN4,"\u29F8":c.BIN3,"\u29F9":c.BIN3,"\u29FA":c.BIN3,"\u29FB":c.BIN3,"\u29FE":c.BIN4,"\u29FF":c.BIN4}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscMathSymbolsB.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscSymbolsAndArrows.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscSymbolsAndArrows.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscSymbolsAndArrows.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/MiscSymbolsAndArrows.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2B45":c.RELSTRETCH,"\u2B46":c.RELSTRETCH}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscSymbolsAndArrows.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscTechnical.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscTechnical.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/MiscTechnical.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/MiscTechnical.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u23B4":c.WIDEACCENT,"\u23B5":c.WIDEACCENT,"\u23DC":c.WIDEACCENT,"\u23DD":c.WIDEACCENT,"\u23E0":c.WIDEACCENT,"\u23E1":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/MiscTechnical.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SpacingModLetters.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SpacingModLetters.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SpacingModLetters.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/SpacingModLetters.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{postfix:{"\u02CD":c.WIDEACCENT,"\u02DA":c.ACCENT,"\u02DD":c.ACCENT,"\u02F7":c.WIDEACCENT}}});MathJax.Ajax.loadComplete(a.optableDir+"/SpacingModLetters.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SuppMathOperators.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SuppMathOperators.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SuppMathOperators.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/SuppMathOperators.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{prefix:{"\u2A03":c.OP,"\u2A05":c.OP,"\u2A07":c.OP,"\u2A08":c.OP,"\u2A09":c.OP,"\u2A0A":c.OP,"\u2A0B":c.INTEGRAL2,"\u2A0C":c.INTEGRAL,"\u2A0D":c.INTEGRAL2,"\u2A0E":c.INTEGRAL2,"\u2A0F":c.INTEGRAL2,"\u2A10":c.OP,"\u2A11":c.OP,"\u2A12":c.OP,"\u2A13":c.OP,"\u2A14":c.OP,"\u2A15":c.INTEGRAL2,"\u2A16":c.INTEGRAL2,"\u2A17":c.INTEGRAL2,"\u2A18":c.INTEGRAL2,"\u2A19":c.INTEGRAL2,"\u2A1A":c.INTEGRAL2,"\u2A1B":c.INTEGRAL2,"\u2A1C":c.INTEGRAL2,"\u2AFC":c.OP,"\u2AFF":c.OP},infix:{"\u2A1D":c.BIN3,"\u2A1E":c.BIN3,"\u2A1F":c.BIN3,"\u2A20":c.BIN3,"\u2A21":c.BIN3,"\u2A22":c.BIN4,"\u2A23":c.BIN4,"\u2A24":c.BIN4,"\u2A25":c.BIN4,"\u2A26":c.BIN4,"\u2A27":c.BIN4,"\u2A28":c.BIN4,"\u2A29":c.BIN4,"\u2A2A":c.BIN4,"\u2A2B":c.BIN4,"\u2A2C":c.BIN4,"\u2A2D":c.BIN4,"\u2A2E":c.BIN4,"\u2A30":c.BIN4,"\u2A31":c.BIN4,"\u2A32":c.BIN4,"\u2A33":c.BIN4,"\u2A34":c.BIN4,"\u2A35":c.BIN4,"\u2A36":c.BIN4,"\u2A37":c.BIN4,"\u2A38":c.BIN4,"\u2A39":c.BIN4,"\u2A3A":c.BIN4,"\u2A3B":c.BIN4,"\u2A3C":c.BIN4,"\u2A3D":c.BIN4,"\u2A3E":c.BIN4,"\u2A40":c.BIN4,"\u2A41":c.BIN4,"\u2A42":c.BIN4,"\u2A43":c.BIN4,"\u2A44":c.BIN4,"\u2A45":c.BIN4,"\u2A46":c.BIN4,"\u2A47":c.BIN4,"\u2A48":c.BIN4,"\u2A49":c.BIN4,"\u2A4A":c.BIN4,"\u2A4B":c.BIN4,"\u2A4C":c.BIN4,"\u2A4D":c.BIN4,"\u2A4E":c.BIN4,"\u2A4F":c.BIN4,"\u2A50":c.BIN4,"\u2A51":c.BIN4,"\u2A52":c.BIN4,"\u2A53":c.BIN4,"\u2A54":c.BIN4,"\u2A55":c.BIN4,"\u2A56":c.BIN4,"\u2A57":c.BIN4,"\u2A58":c.BIN4,"\u2A59":c.REL,"\u2A5A":c.BIN4,"\u2A5B":c.BIN4,"\u2A5C":c.BIN4,"\u2A5D":c.BIN4,"\u2A5E":c.BIN4,"\u2A5F":c.BIN4,"\u2A60":c.BIN4,"\u2A61":c.BIN4,"\u2A62":c.BIN4,"\u2A63":c.BIN4,"\u2A64":c.BIN4,"\u2A65":c.BIN4,"\u2A66":c.REL,"\u2A67":c.REL,"\u2A68":c.REL,"\u2A69":c.REL,"\u2A6A":c.REL,"\u2A6B":c.REL,"\u2A6C":c.REL,"\u2A6D":c.REL,"\u2A6E":c.REL,"\u2A6F":c.REL,"\u2A70":c.REL,"\u2A71":c.BIN4,"\u2A72":c.BIN4,"\u2A73":c.REL,"\u2A74":c.REL,"\u2A75":c.REL,"\u2A76":c.REL,"\u2A77":c.REL,"\u2A78":c.REL,"\u2A79":c.REL,"\u2A7A":c.REL,"\u2A7B":c.REL,"\u2A7C":c.REL,"\u2A7D":c.REL,"\u2A7D\u0338":c.REL,"\u2A7E":c.REL,"\u2A7E\u0338":c.REL,"\u2A7F":c.REL,"\u2A80":c.REL,"\u2A81":c.REL,"\u2A82":c.REL,"\u2A83":c.REL,"\u2A84":c.REL,"\u2A85":c.REL,"\u2A86":c.REL,"\u2A87":c.REL,"\u2A88":c.REL,"\u2A89":c.REL,"\u2A8A":c.REL,"\u2A8B":c.REL,"\u2A8C":c.REL,"\u2A8D":c.REL,"\u2A8E":c.REL,"\u2A8F":c.REL,"\u2A90":c.REL,"\u2A91":c.REL,"\u2A92":c.REL,"\u2A93":c.REL,"\u2A94":c.REL,"\u2A95":c.REL,"\u2A96":c.REL,"\u2A97":c.REL,"\u2A98":c.REL,"\u2A99":c.REL,"\u2A9A":c.REL,"\u2A9B":c.REL,"\u2A9C":c.REL,"\u2A9D":c.REL,"\u2A9E":c.REL,"\u2A9F":c.REL,"\u2AA0":c.REL,"\u2AA1":c.REL,"\u2AA1\u0338":c.REL,"\u2AA2":c.REL,"\u2AA2\u0338":c.REL,"\u2AA3":c.REL,"\u2AA4":c.REL,"\u2AA5":c.REL,"\u2AA6":c.REL,"\u2AA7":c.REL,"\u2AA8":c.REL,"\u2AA9":c.REL,"\u2AAA":c.REL,"\u2AAB":c.REL,"\u2AAC":c.REL,"\u2AAD":c.REL,"\u2AAE":c.REL,"\u2AAF\u0338":c.REL,"\u2AB0\u0338":c.REL,"\u2AB1":c.REL,"\u2AB2":c.REL,"\u2AB3":c.REL,"\u2AB4":c.REL,"\u2AB5":c.REL,"\u2AB6":c.REL,"\u2AB7":c.REL,"\u2AB8":c.REL,"\u2AB9":c.REL,"\u2ABA":c.REL,"\u2ABB":c.REL,"\u2ABC":c.REL,"\u2ABD":c.REL,"\u2ABE":c.REL,"\u2ABF":c.REL,"\u2AC0":c.REL,"\u2AC1":c.REL,"\u2AC2":c.REL,"\u2AC3":c.REL,"\u2AC4":c.REL,"\u2AC5":c.REL,"\u2AC6":c.REL,"\u2AC7":c.REL,"\u2AC8":c.REL,"\u2AC9":c.REL,"\u2ACA":c.REL,"\u2ACB":c.REL,"\u2ACC":c.REL,"\u2ACD":c.REL,"\u2ACE":c.REL,"\u2ACF":c.REL,"\u2AD0":c.REL,"\u2AD1":c.REL,"\u2AD2":c.REL,"\u2AD3":c.REL,"\u2AD4":c.REL,"\u2AD5":c.REL,"\u2AD6":c.REL,"\u2AD7":c.REL,"\u2AD8":c.REL,"\u2AD9":c.REL,"\u2ADA":c.REL,"\u2ADB":c.REL,"\u2ADC":c.REL,"\u2ADD":c.REL,"\u2ADE":c.REL,"\u2ADF":c.REL,"\u2AE0":c.REL,"\u2AE1":c.REL,"\u2AE2":c.REL,"\u2AE3":c.REL,"\u2AE4":c.REL,"\u2AE5":c.REL,"\u2AE6":c.REL,"\u2AE7":c.REL,"\u2AE8":c.REL,"\u2AE9":c.REL,"\u2AEA":c.REL,"\u2AEB":c.REL,"\u2AEC":c.REL,"\u2AED":c.REL,"\u2AEE":c.REL,"\u2AEF":c.REL,"\u2AF0":c.REL,"\u2AF1":c.REL,"\u2AF2":c.REL,"\u2AF3":c.REL,"\u2AF4":c.BIN4,"\u2AF5":c.BIN4,"\u2AF6":c.BIN4,"\u2AF7":c.REL,"\u2AF8":c.REL,"\u2AF9":c.REL,"\u2AFA":c.REL,"\u2AFB":c.BIN4,"\u2AFD":c.BIN4,"\u2AFE":c.BIN3}}});MathJax.Ajax.loadComplete(a.optableDir+"/SuppMathOperators.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsA.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsA.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsA.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/SupplementalArrowsA.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u27F0":c.RELSTRETCH,"\u27F1":c.RELSTRETCH,"\u27FB":c.WIDEREL,"\u27FD":c.WIDEREL,"\u27FE":c.WIDEREL,"\u27FF":c.WIDEREL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsA.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsB.js b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsB.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/element/mml/optable/SupplementalArrowsB.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/element/mml/optable/SupplementalArrowsB.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(a){var c=a.mo.OPTYPES;var b=a.TEXCLASS;MathJax.Hub.Insert(a.mo.prototype,{OPTABLE:{infix:{"\u2900":c.RELACCENT,"\u2901":c.RELACCENT,"\u2902":c.RELACCENT,"\u2903":c.RELACCENT,"\u2904":c.RELACCENT,"\u2905":c.RELACCENT,"\u2906":c.RELACCENT,"\u2907":c.RELACCENT,"\u2908":c.REL,"\u2909":c.REL,"\u290A":c.RELSTRETCH,"\u290B":c.RELSTRETCH,"\u290C":c.WIDEREL,"\u290D":c.WIDEREL,"\u290E":c.WIDEREL,"\u290F":c.WIDEREL,"\u2910":c.WIDEREL,"\u2911":c.RELACCENT,"\u2912":c.RELSTRETCH,"\u2913":c.RELSTRETCH,"\u2914":c.RELACCENT,"\u2915":c.RELACCENT,"\u2916":c.RELACCENT,"\u2917":c.RELACCENT,"\u2918":c.RELACCENT,"\u2919":c.RELACCENT,"\u291A":c.RELACCENT,"\u291B":c.RELACCENT,"\u291C":c.RELACCENT,"\u291D":c.RELACCENT,"\u291E":c.RELACCENT,"\u291F":c.RELACCENT,"\u2920":c.RELACCENT,"\u2921":c.RELSTRETCH,"\u2922":c.RELSTRETCH,"\u2923":c.REL,"\u2924":c.REL,"\u2925":c.REL,"\u2926":c.REL,"\u2927":c.REL,"\u2928":c.REL,"\u2929":c.REL,"\u292A":c.REL,"\u292B":c.REL,"\u292C":c.REL,"\u292D":c.REL,"\u292E":c.REL,"\u292F":c.REL,"\u2930":c.REL,"\u2931":c.REL,"\u2932":c.REL,"\u2933":c.RELACCENT,"\u2934":c.REL,"\u2935":c.REL,"\u2936":c.REL,"\u2937":c.REL,"\u2938":c.REL,"\u2939":c.REL,"\u293A":c.RELACCENT,"\u293B":c.RELACCENT,"\u293C":c.RELACCENT,"\u293D":c.RELACCENT,"\u293E":c.REL,"\u293F":c.REL,"\u2940":c.REL,"\u2941":c.REL,"\u2942":c.RELACCENT,"\u2943":c.RELACCENT,"\u2944":c.RELACCENT,"\u2945":c.RELACCENT,"\u2946":c.RELACCENT,"\u2947":c.RELACCENT,"\u2948":c.RELACCENT,"\u2949":c.REL,"\u294A":c.RELACCENT,"\u294B":c.RELACCENT,"\u294C":c.REL,"\u294D":c.REL,"\u294E":c.WIDEREL,"\u294F":c.RELSTRETCH,"\u2950":c.WIDEREL,"\u2951":c.RELSTRETCH,"\u2952":c.WIDEREL,"\u2953":c.WIDEREL,"\u2954":c.RELSTRETCH,"\u2955":c.RELSTRETCH,"\u2956":c.RELSTRETCH,"\u2957":c.RELSTRETCH,"\u2958":c.RELSTRETCH,"\u2959":c.RELSTRETCH,"\u295A":c.WIDEREL,"\u295B":c.WIDEREL,"\u295C":c.RELSTRETCH,"\u295D":c.RELSTRETCH,"\u295E":c.WIDEREL,"\u295F":c.WIDEREL,"\u2960":c.RELSTRETCH,"\u2961":c.RELSTRETCH,"\u2962":c.RELACCENT,"\u2963":c.REL,"\u2964":c.RELACCENT,"\u2965":c.REL,"\u2966":c.RELACCENT,"\u2967":c.RELACCENT,"\u2968":c.RELACCENT,"\u2969":c.RELACCENT,"\u296A":c.RELACCENT,"\u296B":c.RELACCENT,"\u296C":c.RELACCENT,"\u296D":c.RELACCENT,"\u296E":c.RELSTRETCH,"\u296F":c.RELSTRETCH,"\u2970":c.RELACCENT,"\u2971":c.RELACCENT,"\u2972":c.RELACCENT,"\u2973":c.RELACCENT,"\u2974":c.RELACCENT,"\u2975":c.RELACCENT,"\u2976":c.RELACCENT,"\u2977":c.RELACCENT,"\u2978":c.RELACCENT,"\u2979":c.RELACCENT,"\u297A":c.RELACCENT,"\u297B":c.RELACCENT,"\u297C":c.RELACCENT,"\u297D":c.RELACCENT,"\u297E":c.REL,"\u297F":c.REL}}});MathJax.Ajax.loadComplete(a.optableDir+"/SupplementalArrowsB.js")})(MathJax.ElementJax.mml); diff --git a/rhodecode/public/js/src/math_jax/jax/input/TeX/config.js b/rhodecode/public/js/src/math_jax/jax/input/TeX/config.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/input/TeX/config.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/input/TeX/config.js + * + * Copyright (c) 2009-2016 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.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.0",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(b,a){return a+"#"+escape(b)},useLabelIds:true}},resetEquationNumbers:function(){}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/input/TeX/jax.js b/rhodecode/public/js/src/math_jax/jax/input/TeX/jax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/input/TeX/jax.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/input/TeX/jax.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(d,c,j){var i,h="\u00A0";var k=function(m){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var f=MathJax.Object.isArray;var e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var o,n,p,q;for(o=0,n=arguments.length;o":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:i.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2016",{texClass:i.TEXCLASS.ORD}],"\\|":["2016",{texClass:i.TEXCLASS.ORD}],"\\vert":["|",{texClass:i.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",i.VARIANT.NORMAL],mit:["SetFont",i.VARIANT.ITALIC],oldstyle:["SetFont",i.VARIANT.OLDSTYLE],cal:["SetFont",i.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",i.VARIANT.BOLD],bbFont:["SetFont",i.VARIANT.DOUBLESTRUCK],scr:["SetFont",i.VARIANT.SCRIPT],frak:["SetFont",i.VARIANT.FRAKTUR],sf:["SetFont",i.VARIANT.SANSSERIF],tt:["SetFont",i.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF",null,1],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",i.LENGTH.THINMATHSPACE],":":["Spacer",i.LENGTH.MEDIUMMATHSPACE],">":["Spacer",i.LENGTH.MEDIUMMATHSPACE],";":["Spacer",i.LENGTH.THICKMATHSPACE],"!":["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",i.LENGTH.THINMATHSPACE],negthinspace:["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",i.TEXCLASS.ORD,0.85],Big:["MakeBig",i.TEXCLASS.ORD,1.15],bigg:["MakeBig",i.TEXCLASS.ORD,1.45],Bigg:["MakeBig",i.TEXCLASS.ORD,1.75],bigl:["MakeBig",i.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",i.TEXCLASS.OPEN,1.15],biggl:["MakeBig",i.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",i.TEXCLASS.OPEN,1.75],bigr:["MakeBig",i.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",i.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",i.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",i.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",i.TEXCLASS.REL,0.85],Bigm:["MakeBig",i.TEXCLASS.REL,1.15],biggm:["MakeBig",i.TEXCLASS.REL,1.45],Biggm:["MakeBig",i.TEXCLASS.REL,1.75],mathord:["TeXAtom",i.TEXCLASS.ORD],mathop:["TeXAtom",i.TEXCLASS.OP],mathopen:["TeXAtom",i.TEXCLASS.OPEN],mathclose:["TeXAtom",i.TEXCLASS.CLOSE],mathbin:["TeXAtom",i.TEXCLASS.BIN],mathrel:["TeXAtom",i.TEXCLASS.REL],mathpunct:["TeXAtom",i.TEXCLASS.PUNCT],mathinner:["TeXAtom",i.TEXCLASS.INNER],vcenter:["TeXAtom",i.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var m=this.config.Macros;for(var n in m){if(m.hasOwnProperty(n)){if(typeof(m[n])==="string"){g.macros[n]=["Macro",m[n]]}else{g.macros[n]=["Macro"].concat(m[n])}g.macros[n].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(n,o){this.string=n;this.i=0;this.macroCount=0;var m;if(o){m={};for(var p in o){if(o.hasOwnProperty(p)){m[p]=o[p]}}}this.stack=d.Stack(m,!!o);this.Parse();this.Push(b.stop())},Parse:function(){var o,m;while(this.i=55296&&m<56320){o+=this.string.charAt(this.i++)}if(g.special[o]){this[g.special[o]](o)}else{if(g.letter.test(o)){this.Variable(o)}else{if(g.digit.test(o)){this.Number(o)}else{this.Other(o)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(m){return m},ControlSequence:function(p){var m=this.GetCS(),o=this.csFindMacro(m);if(o){if(!f(o)){o=[o]}var n=o[0];if(!(n instanceof Function)){n=this[n]}n.apply(this,[p+m].concat(o.slice(1)))}else{if(g.mathchar0mi[m]){this.csMathchar0mi(m,g.mathchar0mi[m])}else{if(g.mathchar0mo[m]){this.csMathchar0mo(m,g.mathchar0mo[m])}else{if(g.mathchar7[m]){this.csMathchar7(m,g.mathchar7[m])}else{if(g.delimiter["\\"+m]!=null){this.csDelimiter(m,g.delimiter["\\"+m])}else{this.csUndefined(p+m)}}}}}},csFindMacro:function(m){return g.macros[m]},csMathchar0mi:function(m,o){var n={mathvariant:i.VARIANT.ITALIC};if(f(o)){n=o[1];o=o[0]}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csMathchar0mo:function(m,o){var n={stretchy:false};if(f(o)){n=o[1];n.stretchy=false;o=o[0]}this.Push(this.mmlToken(i.mo(i.entity("#x"+o)).With(n)))},csMathchar7:function(m,o){var n={mathvariant:i.VARIANT.NORMAL};if(f(o)){n=o[1];o=o[0]}if(this.stack.env.font){n.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csDelimiter:function(m,o){var n={};if(f(o)){n=o[1];o=o[0]}if(o.length===4){o=i.entity("#x"+o)}else{o=i.chars(o)}this.Push(this.mmlToken(i.mo(o).With({fence:false,stretchy:false}).With(n)))},csUndefined:function(m){d.Error(["UndefinedControlSequence","Undefined control sequence %1",m])},Variable:function(n){var m={};if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.chars(n)).With(m)))},Number:function(p){var m,o=this.string.slice(this.i-1).match(g.number);if(o){m=i.mn(o[0].replace(/[{}]/g,""));this.i+=o[0].length-1}else{m=i.mo(i.chars(p))}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(m))},Open:function(m){this.Push(b.open())},Close:function(m){this.Push(b.close())},Tilde:function(m){this.Push(i.mtext(i.chars(h)))},Space:function(m){},Superscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sup;if((o.type==="msubsup"&&o.data[o.sup])||(o.type==="munderover"&&o.data[o.over]&&!o.subsupOK)){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.over]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.over}else{o=i.msubsup(o,null,null);m=o.sup}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},Subscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sub;if((o.type==="msubsup"&&o.data[o.sub])||(o.type==="munderover"&&o.data[o.under]&&!o.subsupOK)){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.under]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.under}else{o=i.msubsup(o,null,null);m=o.sub}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(o){var n=this.stack.Prev();if(!n){n=i.mi()}if(n.type==="msubsup"&&n.data[n.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var m="";this.i--;do{m+=this.PRIME;this.i++,o=this.GetNext()}while(o==="'"||o===this.SMARTQUOTE);m=["","\u2032","\u2033","\u2034","\u2057"][m.length]||m;this.Push(b.prime(n,this.mmlToken(i.mo(m))))},mi2mo:function(m){var n=i.mo();n.Append.apply(n,m.data);var o;for(o in n.defaults){if(n.defaults.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}for(o in i.copyAttributes){if(i.copyAttributes.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}n.lspace=n.rspace="0";n.useMMLspacing&=~(n.SPACE_ATTR.lspace|n.SPACE_ATTR.rspace);return n},Comment:function(m){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(n,p,v,r,u,o,m,w,t){var s=this.GetNext();if(s===""){d.Error(["MissingArgFor","Missing argument for %1",n])}if(s==="{"){this.i++}else{this.string=s+"}"+this.string.slice(this.i+1);this.i=0}var q=b.array().With({requireClose:true,arraydef:{rowspacing:(o||"4pt"),columnspacing:(u||"1em")}});if(w){q.isCases=true}if(t){q.isNumbered=true;q.arraydef.side=t}if(p||v){q.open=p;q.close=v}if(m==="D"){q.arraydef.displaystyle=true}if(r!=null){q.arraydef.columnalign=r}this.Push(q)},Entry:function(p){this.Push(b.cell().With({isEntry:true,name:p}));if(this.stack.Top().isCases){var o=this.string;var s=0,q=this.i,n=o.length;while(qd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(q[0]&&this[q[0]]){n=this[q[0]].apply(this,[n].concat(q.slice(2)))}}this.Push(n)},envFindName:function(m){return g.environment[m]},Equation:function(m,n){return n},ExtensionEnv:function(n,m){this.Extension(n.name,m,"environment")},Array:function(n,p,u,s,t,o,m,q){if(!s){s=this.GetArgument("\\begin{"+n.name+"}")}var v=("c"+s).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");s=s.replace(/[^clr]/g,"").split("").join(" ");s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var r=b.array().With({arraydef:{columnalign:s,columnspacing:(t||"1em"),rowspacing:(o||"4pt")}});if(v.match(/[|:]/)){if(v.charAt(0).match(/[|:]/)){r.frame.push("left");r.frame.dashed=v.charAt(0)===":"}if(v.charAt(v.length-1).match(/[|:]/)){r.frame.push("right")}v=v.substr(1,v.length-2);r.arraydef.columnlines=v.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(p){r.open=this.convertDelimiter(p)}if(u){r.close=this.convertDelimiter(u)}if(m==="D"){r.arraydef.displaystyle=true}else{if(m){r.arraydef.displaystyle=false}}if(m==="S"){r.arraydef.scriptlevel=1}if(q){r.arraydef.useHeight=false}this.Push(n);return r},AlignedArray:function(m){var n=this.GetBrackets("\\begin{"+m.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),n)},setArrayAlign:function(n,m){m=this.trimSpaces(m||"");if(m==="t"){n.arraydef.align="baseline 1"}else{if(m==="b"){n.arraydef.align="baseline -1"}else{if(m==="c"){n.arraydef.align="center"}else{if(m){n.arraydef.align=m}}}}return n},convertDelimiter:function(m){if(m){m=g.delimiter[m]}if(m==null){return null}if(f(m)){m=m[0]}if(m.length===4){m=String.fromCharCode(parseInt(m,16))}return m},trimSpaces:function(n){if(typeof(n)!="string"){return n}var m=n.replace(/^\s+|\s+$/g,"");if(m.match(/\\$/)&&n.match(/ $/)){m+=" "}return m},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var m=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(m){this.i+=m[1].length;return m[1]}else{this.i++;return" "}},GetArgument:function(n,o){switch(this.GetNext()){case"":if(!o){d.Error(["MissingArgFor","Missing argument for %1",n])}return null;case"}":if(!o){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var m=++this.i,p=1;while(this.i1){n=[i.mrow.apply(i,n)]}}return n},InternalText:function(n,m){n=n.replace(/^\s+/,h).replace(/\s+$/,h);return i.mtext(i.chars(n)).With(m)},SubstituteArgs:function(n,m){var q="";var p="";var r;var o=0;while(on.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}p=this.AddArgs(this.AddArgs(p,q),n[r-1]);q=""}}else{q+=r}}}return this.AddArgs(p,q)},AddArgs:function(n,m){if(m.match(/^[a-z]/i)&&n.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){n+=" "}if(n.length+m.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return n+m}});d.Augment({Stack:e,Parse:a,Definitions:g,Startup:l,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(m){var n,o=false,q=MathJax.HTML.getScript(m);var s=(m.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var r={math:q,display:s,script:m};var t=this.prefilterHooks.Execute(r);if(t){return t}q=r.math;try{n=d.Parse(q).mml()}catch(p){if(!p.texError){throw p}n=this.formatError(p,q,s,m);o=true}if(n.isa(i.mtable)&&n.displaystyle==="inherit"){n.displaystyle=s}if(n.inferred){n=i.apply(MathJax.ElementJax,n.data)}else{n=i(n)}if(s){n.root.display="block"}if(o){n.texError=true}r.math=n;return this.postfilterHooks.Execute(r)||r.math},prefilterMath:function(n,o,m){return n},postfilterMath:function(n,o,m){this.combineRelations(n.root);return n},formatError:function(p,o,q,m){var n=p.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",n,o,q,m]);return i.Error(n)},Error:function(m){if(f(m)){m=k.apply(k,m)}throw c.Insert(Error(m),{texError:true})},Macro:function(m,n,o){g.macros[m]=["Macro"].concat([].slice.call(arguments,1));g.macros[m].isUser=true},fenced:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.INNER});m.Append(i.mo(o).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.OPEN}),n,i.mo(p).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.CLOSE}));return m},fixedFence:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.ORD});if(o){m.Append(this.mathPalette(o,"l"))}if(n.type==="mrow"){m.Append.apply(m,n.data)}else{m.Append(n)}if(p){m.Append(this.mathPalette(p,"r"))}return m},mathPalette:function(p,n){if(p==="{"||p==="}"){p="\\"+p}var o="{\\bigg"+n+" "+p+"}",m="{\\big"+n+" "+p+"}";return d.Parse("\\mathchoice"+o+m+m+m,{}).mml()},combineRelations:function(q){var r,n,p,o;for(r=0,n=q.data.length;rthis.data.length){this.selection=1}var k=this;while(k.type!=="math"){k=k.inherit}var h=MathJax.Hub.getJaxFor(k.inputID),j=!!h.hover;h.Update();if(j){var i=document.getElementById(h.inputID+"-Span");MathJax.Extension.MathEvents.Hover.Hover(h,i)}return MathJax.Extension.MathEvents.Event.False(l)},HTMLsetStatus:function(h){this.messageID=MathJax.Message.Set((this.data[1]&&this.data[1].isToken)?this.data[1].data.join(""):this.data[1].toString())},HTMLclearStatus:function(h){if(this.messageID){MathJax.Message.Clear(this.messageID,0)}delete this.messageID},HTMLtooltipOver:function(i){if(!i){i=window.event}if(b){clearTimeout(b);b=null}if(f){clearTimeout(f)}var h=i.pageX;var k=i.pageY;if(h==null){h=i.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;k=i.clientY+document.body.scrollTop+document.documentElement.scrollTop}var j=MathJax.Callback(["HTMLtooltipPost",this,h+a.offsetX,k+a.offsetY]);f=setTimeout(j,a.delayPost)},HTMLtooltipOut:function(h){if(f){clearTimeout(f);f=null}if(b){clearTimeout(b)}var i=MathJax.Callback(["HTMLtooltipClear",this,80]);b=setTimeout(i,a.delayClear)},HTMLtooltipPost:function(o,m){f=null;if(b){clearTimeout(b);b=null}var p=this.HTMLtooltip;p.style.display="block";p.style.opacity="";p.style.filter=e.config.styles["#MathJax_Tooltip"].filter;if(this===d){return}p.style.left=o+"px";p.style.top=m+"px";p.innerHTML='';var q=p.insertBefore(e.EmExSpan.cloneNode(true),p.firstChild);var l=q.firstChild.offsetHeight/60,h=q.lastChild.firstChild.offsetHeight/60;e.em=e.outerEm=c.mbase.prototype.em=h;var i=Math.floor(Math.max(e.config.minScaleAdjust/100,(l/e.TeX.x_height)/h)*e.config.scale);p.firstChild.style.fontSize=i+"%";q.parentNode.removeChild(q);var n=e.createStack(p.firstChild.firstChild);var k=e.createBox(n);try{e.Measured(this.data[1].toHTML(k),k)}catch(j){if(!j.restart){throw j}p.style.display="none";MathJax.Callback.After(["HTMLtooltipPost",this,o,m],j.restart);return}e.placeBox(k,0,0);e.createRule(p.firstChild.firstChild,k.bbox.h,k.bbox.d,0);d=this},HTMLtooltipClear:function(i){var h=this.HTMLtooltip;if(i<=0){h.style.display="none";h.style.opacity=h.style.filter="";b=null}else{h.style.opacity=i/100;h.style.filter="alpha(opacity="+i+")";b=setTimeout(MathJax.Callback(["HTMLtooltipClear",this,i-20]),50)}}});MathJax.Hub.Browser.Select({MSIE:function(h){e.msieHitBoxBug=true}});MathJax.Hub.Startup.signal.Post("HTML-CSS maction Ready");MathJax.Ajax.loadComplete(e.autoloadDir+"/maction.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/menclose.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/menclose.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/menclose.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/autoload/menclose.js + * + * Copyright (c) 2009-2016 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.StartupHook("HTML-CSS Jax Ready",function(){var d="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];var c="http://www.w3.org/2000/svg";var f="urn:schemas-microsoft-com:vml";var e="mjxvml";a.menclose.Augment({toHTML:function(ac){var j=this.getValues("notation","thickness","padding","mathcolor","color");if(j.color&&!this.mathcolor){j.mathcolor=j.color}if(j.thickness==null){j.thickness=".075em"}if(j.padding==null){j.padding=".2em"}ac=this.HTMLcreateSpan(ac);var V=this.HTMLgetMu(ac),af=this.HTMLgetScale();var X=b.length2em(j.padding,V,1/b.em)*af;var N=b.length2em(j.thickness,V,1/b.em)*af;N=Math.max(1/b.em,N);var E=b.Em(N)+" solid";var z=b.createStack(ac);var v=b.createBox(z);this.HTMLmeasureChild(0,v);var K=v.bbox.h+X+N,P=v.bbox.d+X+N,o=v.bbox.w+2*(X+N);var O=b.createFrame(z,K+P,0,o,N,"none");O.id="MathJax-frame-"+this.spanID;b.addBox(z,O);z.insertBefore(O,v);var s=0,U=0,u=0,A=0,M=0,J=0;var S,g;var I,ad,Q;if(!j.mathcolor){j.mathcolor="currentColor"}else{ac.style.color=j.mathcolor}var k=MathJax.Hub.SplitList(j.notation),q={};for(var ab=0,Z=k.length;abj.bbox.rw){j.bbox.rw=j.bbox.w}if(k.bbox.h>j.bbox.h){j.bbox.h=k.bbox.h}if(k.bbox.d>j.bbox.d){j.bbox.d=k.bbox.d}}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLimgLoaded:function(f,e){if(typeof(f)==="string"){e=f}this.img.status=(e||"OK")},HTMLimgError:function(){this.img.img.onload("error")}},{GLYPH:{}});MathJax.Hub.Startup.signal.Post("HTML-CSS mglyph Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mglyph.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mmultiscripts.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mmultiscripts.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mmultiscripts.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/autoload/mmultiscripts.js + * + * Copyright (c) 2009-2016 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.StartupHook("HTML-CSS Jax Ready",function(){var c="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mmultiscripts.Augment({toHTML:function(L,J,E){L=this.HTMLcreateSpan(L);var R=this.HTMLgetScale();var n=b.createStack(L),g;var l=b.createBox(n);if(this.data[this.base]){var m=this.data[this.base].toHTML(l);if(E!=null){this.data[this.base].HTMLstretchV(l,J,E)}else{if(J!=null){this.data[this.base].HTMLstretchH(l,J)}}b.Measured(m,l)}else{l.bbox=this.HTMLzeroBBox()}var P=b.TeX.x_height*R,C=b.TeX.scriptspace*R*0.75;var B=this.HTMLgetScripts(n,C);var o=B[0],f=B[1],y=B[2],k=B[3];var j=R;for(var M=1;M0){z+=G;x-=G}}z=Math.max(z,K.superscriptshift);x=Math.max(x,K.subscriptshift);if(f){b.placeBox(f,w+l.bbox.w+C,z)}if(k){b.placeBox(k,w+Q-k.bbox.w,z)}if(o){b.placeBox(o,w+l.bbox.w+C-Q,-x)}if(y){b.placeBox(y,w-y.bbox.w,-x)}}}this.HTMLhandleSpace(L);this.HTMLhandleColor(L);var e=L.bbox;e.dx=w;e.s=C;e.u=z;e.v=x;e.delta=Q;e.px=w+l.bbox.w;return L},HTMLgetScripts:function(r,u){var p,d,e=[];var o=1,h=this.data.length,g=0;for(var l=0;l<4;l+=2){while(o0){if(f){this.HTMLmoveColor(q[l],t,1);e[l].w+=t}else{b.createBlank(d,t)}}else{if(t<0){if(f){this.HTMLmoveColor(q[l+1],-t,-1);e[l+1].w+=-t}else{b.createBlank(p,-t)}}}this.HTMLcombineBBoxes(q[l],d.bbox);this.HTMLcombineBBoxes(q[l+1],p.bbox);if(t>0){d.bbox.w=p.bbox.w;d.bbox.rw=Math.max(d.bbox.w,d.bbox.rw)}else{if(t<0){p.bbox.w=d.bbox.w;p.bbox.rw=Math.max(p.bbox.w,p.bbox.rw)}}}else{if(d){this.HTMLcombineBBoxes(q[l],d.bbox)}if(p){this.HTMLcombineBBoxes(q[l+1],p.bbox)}}if(d){g=d.bbox.w}else{if(p){g=p.bbox.w}}}o++;g=0}for(n=0;n<4;n++){if(e[n]){e[n].bbox.w+=u;e[n].bbox.rw=Math.max(e[n].bbox.w,e[n].bbox.rw);e[n].bbox.name=(["sub","sup","presub","presup"])[n];this.HTMLcleanBBox(e[n].bbox)}}return e},HTMLmoveColor:function(h,f,e){var d=f/(h.scale||1);h.style.paddingLeft=b.Em(d);var g=h.previousSibling;if(g&&(g.id||"").match(/^MathJax-Color-/)){g.style.marginLeft=b.Em(d+parseFloat(g.style.marginLeft));g.style.marginRight=b.Em(e*(d-parseFloat(g.style.marginRight)))}},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mmultiscripts Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mmultiscripts.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/ms.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/ms.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/ms.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/autoload/ms.js + * + * Copyright (c) 2009-2016 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.StartupHook("HTML-CSS Jax Ready",function(){var c="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.ms.Augment({toHTML:function(e){e=this.HTMLhandleSize(this.HTMLcreateSpan(e));var d=this.getValues("lquote","rquote","mathvariant");if(!this.hasValue("lquote")||d.lquote==='"'){d.lquote="\u201C"}if(!this.hasValue("rquote")||d.rquote==='"'){d.rquote="\u201D"}if(d.lquote==="\u201C"&&d.mathvariant==="monospace"){d.lquote='"'}if(d.rquote==="\u201D"&&d.mathvariant==="monospace"){d.rquote='"'}var f=d.lquote+this.data.join("")+d.rquote;this.HTMLhandleVariant(e,this.HTMLgetVariant(),f);this.HTMLhandleSpace(e);this.HTMLhandleColor(e);this.HTMLhandleDir(e);return e}});MathJax.Hub.Startup.signal.Post("HTML-CSS ms Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/ms.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mtable.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mtable.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/mtable.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/autoload/mtable.js + * + * Copyright (c) 2009-2016 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.StartupHook("HTML-CSS Jax Ready",function(){var c="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mtable.Augment({toHTML:function(r){r=this.HTMLcreateSpan(r);if(this.data.length===0){return r}var I=this.getValues("columnalign","rowalign","columnspacing","rowspacing","columnwidth","equalcolumns","equalrows","columnlines","rowlines","frame","framespacing","align","useHeight","width","side","minlabelspacing");var aM=I.width.match(/%$/);var ay=b.createStack(r);var aJ=this.HTMLgetScale(),aB=this.HTMLgetMu(r),aC=-1;var aq=[],au=[],aj=[],aw=[],av=[],ae,ad,ap=-1,ac,ao,X,aH,Q,aE,aR=[],aW;var G=b.FONTDATA.lineH*aJ*I.useHeight,N=b.FONTDATA.lineD*aJ*I.useHeight;for(ae=0,ac=this.data.length;aeap){ap=ad}av[ad]=b.createStack(b.createBox(ay));aj[ad]=-b.BIGDIMEN}aw[ae][ad]=b.createBox(av[ad]);aR.push(aH.data[ad-X].toHTML(aw[ae][ad]))}}b.MeasureSpans(aR);for(ae=0,ac=this.data.length;aeaq[ae]){aq[ae]=aV*aO.h/aW}if(aV*aO.d/aW>au[ae]){au[ae]=aV*aO.d/aW}}}else{if(aE.HTMLcanStretch("Horizontal")){aV=b.length2em(aV,aB,aO.w);if(aV>aj[ad]){aj[ad]=aV}}}}}if(aw[ae][ad].bbox.h>aq[ae]){aq[ae]=aw[ae][ad].bbox.h}if(aw[ae][ad].bbox.d>au[ae]){au[ae]=aw[ae][ad].bbox.d}if(aw[ae][ad].bbox.w>aj[ad]){aj[ad]=aw[ae][ad].bbox.w}}}var aG=MathJax.Hub.SplitList;var aA=aG(I.columnspacing),aT=aG(I.rowspacing),e=aG(I.columnalign),B=aG(I.rowalign),d=aG(I.columnlines),w=aG(I.rowlines),aP=aG(I.columnwidth),U=[];for(ae=0,ac=aA.length;aeaw.length){aa=aw.length}}ai=0;aY=-(aW+aK)+aq[0];for(ae=0,ac=aa-1;ae0.98){R=0.98/af;af=0.98}}else{if(I.width==="auto"){if(af>0.98){R=K/(z+K);ab=z+K}else{ab=z/(1-af)}}else{ab=b.length2em(I.width,aB);for(ae=0,ac=Math.min(ap,aA.length);ae0.01){if(ag&&ab>z){ab=(ab-z)/ag;for(ae=0,ac=at.length;aeaq[ae]){aw[ae][ad].bbox.H=aw[ae][ad].bbox.h;aw[ae][ad].bbox.h=aq[ae]}if(aw[ae][ad].bbox.d>au[ae]){aw[ae][ad].bbox.D=aw[ae][ad].bbox.d;aw[ae][ad].bbox.d=au[ae]}aE.symmetric=aN}}aU=Q.rowalign||this.data[ae].rowalign||B[ae];o=({top:aq[ae]-aw[ae][ad].bbox.h,bottom:aw[ae][ad].bbox.d-au[ae],center:((aq[ae]-au[ae])-(aw[ae][ad].bbox.h-aw[ae][ad].bbox.d))/2,baseline:0,axis:0})[aU]||0;aU=(Q.columnalign||U[ae][ad]||e[ad]);b.alignBox(aw[ae][ad],aU,S+o)}if(aeX*an){an=X*aX}an+=az;ak+=X*an}else{ak+=aX-X*an+aI;an-=X*aI}}var aQ=b.createStack(r,false,"100%");b.addBox(aQ,ay);b.alignBox(ay,ar.indentalign,0,an);av[aC].parentNode.parentNode.removeChild(av[aC].parentNode);b.addBox(aQ,av[aC]);b.alignBox(av[aC],e[aC],0);if(b.msieRelativeWidthBug){ay.style.top=av[aC].style.top=""}if(aM){ay.style.width=I.width;r.bbox.width="100%"}av[aC].style[X===1?"marginLeft":"marginRight"]=b.Em(X*az);r.bbox.tw=ak;r.style.minWidth=r.bbox.minWidth=b.Em(ak);aQ.style.minWidth=aQ.bbox.minWidth=b.Em(ak/aJ)}if(!aM){this.HTMLhandleSpace(r)}var u=this.HTMLhandleColor(r);if(u&&aM){if(!ah){ah=b.createFrame(ay,g,0,aZ,0,"none");b.addBox(ay,ah);b.placeBox(ah,0,aY,true);ah.style.width="100%"}ah.style.backgroundColor=u.style.backgroundColor;ah.parentNode.insertBefore(ah,ah.parentNode.firstChild);u.parentNode.removeChild(u)}return r},HTMLhandleSpace:function(d){d.bbox.keepPadding=true;d.bbox.exact=true;if(!this.hasFrame&&d.bbox.width==null){d.style.paddingLeft=d.style.paddingRight=b.Em(1/6)}this.SUPER(arguments).HTMLhandleSpace.call(this,d)}});a.mtd.Augment({toHTML:function(e,d,g){e=this.HTMLcreateSpan(e);if(this.data[0]){var f=this.data[0].toHTML(e);if(g!=null){f=this.data[0].HTMLstretchV(e,d,g)}else{if(d!=null){f=this.data[0].HTMLstretchH(e,d)}}e.bbox=f.bbox}this.HTMLhandleSpace(e);this.HTMLhandleColor(e);return e},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mtable Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mtable.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/multiline.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/multiline.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/autoload/multiline.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/autoload/multiline.js + * + * Copyright (c) 2009-2016 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.StartupHook("HTML-CSS Jax Ready",function(){var d="2.7.0";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];var e={newline:0,nobreak:1000000,goodbreak:[-200],badbreak:[+200],auto:[0],toobig:800,nestfactor:400,spacefactor:-100,spaceoffset:2,spacelimit:1,fence:500,close:500};var c={linebreakstyle:"after"};a.mbase.Augment({HTMLlinebreakPenalty:e,HTMLmultiline:function(n){var o=this;while(o.inferred||(o.parent&&o.parent.type==="mrow"&&o.isEmbellished())){o=o.parent}var l=((o.type==="math"&&o.Get("display")==="block")||o.type==="mtd");o.isMultiline=true;var p=this.getValues("linebreak","linebreakstyle","lineleading","linebreakmultchar","indentalign","indentshift","indentalignfirst","indentshiftfirst","indentalignlast","indentshiftlast");if(p.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){p.linebreakstyle=this.Get("infixlinebreakstyle")}p.lineleading=b.length2em(p.lineleading,1,0.5);this.HTMLremoveColor(n);var m=b.createStack(n);this.HTMLgetScale();var f={n:0,Y:0,scale:this.scale||1,isTop:l,values:{},VALUES:p},k=this.HTMLgetAlign(f,{}),h=this.HTMLgetShift(f,{},k),g=[],i={index:[],penalty:e.nobreak,w:0,W:h,shift:h,scanW:h,nest:0},j=false;while(this.HTMLbetterBreak(i,f)&&(i.scanW>=b.linebreakWidth||i.penalty===e.newline)){this.HTMLaddLine(m,g,i.index,f,i.values,j);g=i.index.slice(0);j=true;k=this.HTMLgetAlign(f,i.values);h=this.HTMLgetShift(f,i.values,k);if(k===a.INDENTALIGN.CENTER){h=0}i.W=i.shift=i.scanW=h;i.penalty=e.nobreak}f.isLast=true;this.HTMLaddLine(m,g,[],f,c,j);if(l){m.style.width="100%";if(o.type==="math"){n.bbox.width="100%"}}this.HTMLhandleSpace(n);this.HTMLhandleColor(n);n.bbox.isMultiline=true;return n},HTMLbetterBreak:function(h,f){if(this.isToken){return false}if(this.isEmbellished()){h.embellished=this;return this.CoreMO().HTMLbetterBreak(h,f)}if(this.linebreakContainer){return false}var p=h.index.slice(0),n=h.index.shift(),l=this.data.length,k,q,j,o=(h.index.length>0),g=false;if(n==null){n=-1}if(!o){n++;h.W+=h.w;h.w=0}j=h.scanW=h.W;h.nest++;while(n0){var k=b.FONTDATA.baselineskip*f.scale;var i=(f.values.lineleading==null?f.VALUES:f.values).lineleading*f.scale;f.Y-=Math.max(k,f.d+line.bbox.h+i)}b.alignBox(line,m,f.Y,h);f.d=line.bbox.d;f.values=o;f.n++},HTMLgetAlign:function(i,f){var j=f,g=i.values,h=i.VALUES,k;if(i.n===0){k=j.indentalignfirst||g.indentalignfirst||h.indentalignfirst}else{if(i.isLast){k=g.indentalignlast||h.indentalignlast}else{k=g.indentalign||h.indentalign}}if(k===a.INDENTALIGN.INDENTALIGN){k=g.indentalign||h.indentalign}if(k===a.INDENTALIGN.AUTO){k=(i.isTop?this.displayAlign:a.INDENTALIGN.LEFT)}return k},HTMLgetShift:function(k,h,m){var l=h,i=k.values,j=k.VALUES,g;if(k.n===0){g=l.indentshiftfirst||i.indentshiftfirst||j.indentshiftfirst}else{if(k.isLast){g=i.indentshiftlast||j.indentshiftlast}else{g=i.indentshift||j.indentshift}}if(g===a.INDENTSHIFT.INDENTSHIFT){g=i.indentshift||j.indentshift}if(g==="auto"||g===""){g="0"}g=b.length2em(g,1,b.cwidth);if(k.isTop&&this.displayIndent!=="0"){var f=b.length2em(this.displayIndent,1,b.cwidth);g+=(m===a.INDENTALIGN.RIGHT?-f:f)}return g},HTMLmoveLine:function(o,f,l,n,g){var k=o[0],h=f[0];if(k==null){k=-1}if(h==null){h=this.data.length-1}if(k===h&&o.length>1){this.data[k].HTMLmoveSlice(o.slice(1),f.slice(1),l,n,g,"paddingLeft")}else{var m=n.last;n.last=false;while(k0),g=false;if(r==null){r=-1}if(!s){r++;h.W+=h.w;h.w=0}l=h.scanW=h.W;h.nest++;if(!this.dataI){this.dataI=[];if(this.data.open){this.dataI.push("open")}if(o){this.dataI.push(0)}for(var q=1;q1){this.data[this.dataI[n]].HTMLmoveSlice(g.slice(1),l.slice(1),o,f,q,"paddingLeft")}else{var p=f.last;f.last=false;var h=this.dataI[n];while(n0),g=false;if(!m){h.W+=h.w;h.w=0}j=h.scanW=h.W;if(l==null){this.HTMLbaseW=this.data[this.base].HTMLspanElement().bbox.w;this.HTMLdw=this.HTMLspanElement().bbox.w-this.HTMLbaseW}if(this.data[this.base].HTMLbetterBreak(h,f)){g=true;n=[this.base].concat(h.index);k=h.W;o=h.w;if(h.penalty===e.newline){g=m=true}}if(!m){this.HTMLaddWidth(this.base,h,j)}h.scanW+=this.HTMLdw;h.W=h.scanW;h.index=[];if(g){h.W=k;h.w=o;h.index=n}return g},HTMLmoveLine:function(m,g,j,l,h){if(this.data[this.base]){if(m.length>1){this.data[this.base].HTMLmoveSlice(m.slice(1),g.slice(1),j,l,h,"paddingLeft")}else{if(g.length<=1){this.data[this.base].HTMLmoveSpan(j,l,h)}else{this.data[this.base].HTMLmoveSlice([],g.slice(1),j,l,h,"paddingRight")}}}if(g.length===0){var i=this.data[this.sup]||this.data[this.sub];if(i&&this.HTMLnotEmpty(i)){var k=i.HTMLspanElement().parentNode;if(i.href){k=k.parentNode}var f=k.parentNode;if(this.data[this.base]){f.removeChild(f.firstChild)}for(k=f.firstChild;k;k=k.nextSibling){k.style.left=b.Em(b.unEm(k.style.left)-this.HTMLbaseW)}f.bbox.w-=this.HTMLbaseW;f.style.width=b.Em(f.bbox.w);this.HTMLcombineBBoxes(f,j.bbox);j.appendChild(f)}}}});a.mmultiscripts.Augment({HTMLbetterBreak:function(j,g){if(!this.data[this.base]){return false}var n=j.index.slice(0);j.index.shift();var l,o,k,m=(j.index.length>0),i=false;if(!m){j.W+=j.w;j.w=0}j.scanW=j.W;var p=this.HTMLspanElement().bbox,h=this.data[this.base].HTMLspanElement().bbox;var f=p.w-h.w;j.scanW+=p.dx;k=j.scanW;if(this.data[this.base].HTMLbetterBreak(j,g)){i=true;n=[this.base].concat(j.index);l=j.W;o=j.w;if(j.penalty===e.newline){i=m=true}}if(!m){this.HTMLaddWidth(this.base,j,k)}j.scanW+=f;j.W=j.scanW;j.index=[];if(i){j.W=l;j.w=o;j.index=n}return i},HTMLmoveLine:function(h,i,o,g,p){var m=this.HTMLspanElement(),k=m.bbox,n=m.firstChild,f={};if(b.msiePaddingWidthBug){n=n.nextSibling}var l=n.firstChild;while(l){if(l.bbox&&l.bbox.name){f[l.bbox.name]=l}l=l.nextSibling}if(h.length<1){if(f.presub||f.presup){var j=b.createStack(o);if(f.presup){b.addBox(j,f.presup);b.placeBox(f.presup,k.dx-f.presup.bbox.w,k.u)}if(f.presub){b.addBox(j,f.presub);b.placeBox(f.presub,k.dx+k.delta-f.presub.bbox.w,-k.v)}this.HTMLcombineBBoxes(j,o.bbox);o.appendChild(j);j.style.width=b.Em(k.dx)}}if(this.data[this.base]){if(h.length>1){this.data[this.base].HTMLmoveSlice(h.slice(1),i.slice(1),o,g,p,"paddingLeft")}else{if(i.length<=1){this.data[this.base].HTMLmoveSpan(o,g,p)}else{this.data[this.base].HTMLmoveSlice([],i.slice(1),o,g,p,"paddingRight")}}}if(i.length===0){if(this.data[this.base]){n.removeChild(n.firstChild)}for(l=n.firstChild;l;l=l.nextSibling){l.style.left=b.Em(b.unEm(l.style.left)-k.px)}n.bbox.w-=k.px;n.style.width=b.Em(n.bbox.w);this.HTMLcombineBBoxes(n,o.bbox);o.appendChild(n)}}});a.mo.Augment({HTMLbetterBreak:function(h,f){if(h.values&&h.values.id===this.spanID){return false}var p=this.getValues("linebreak","linebreakstyle","lineleading","linebreakmultchar","indentalign","indentshift","indentalignfirst","indentshiftfirst","indentalignlast","indentshiftlast","texClass","fence");if(p.linebreakstyle===a.LINEBREAKSTYLE.INFIXLINEBREAKSTYLE){p.linebreakstyle=this.Get("infixlinebreakstyle")}if(p.texClass===a.TEXCLASS.OPEN){h.nest++}if(p.texClass===a.TEXCLASS.CLOSE&&h.nest){h.nest--}var i=h.scanW,j=(h.embellished||this);delete h.embellished;var n=j.HTMLspanElement(),o=n.bbox.w;if(n.style.paddingLeft){o+=b.unEm(n.style.paddingLeft)}if(p.linebreakstyle===a.LINEBREAKSTYLE.AFTER){i+=o;o=0}if(i-h.shift===0&&p.linebreak!==a.LINEBREAK.NEWLINE){return false}var k=b.linebreakWidth-i;if(f.n===0&&(p.indentshiftfirst!==f.VALUES.indentshiftfirst||p.indentalignfirst!==f.VALUES.indentalignfirst)){var l=this.HTMLgetAlign(f,p),g=this.HTMLgetShift(f,p,l);k+=(h.shift-g)}var m=Math.floor(k/b.linebreakWidth*1000);if(m<0){m=e.toobig-3*m}if(p.fence){m+=e.fence}if((p.linebreakstyle===a.LINEBREAKSTYLE.AFTER&&p.texClass===a.TEXCLASS.OPEN)||p.texClass===a.TEXCLASS.CLOSE){m+=e.close}m+=h.nest*e.nestfactor;var q=e[p.linebreak||a.LINEBREAK.AUTO];if(!MathJax.Object.isArray(q)){if(k>=0){m=q*h.nest}}else{m=Math.max(1,m+q[0]*h.nest)}if(m>=h.penalty){return false}h.penalty=m;h.values=p;h.W=i;h.w=o;p.lineleading=b.length2em(p.lineleading,1,f.VALUES.lineleading);p.id=this.spanID;return true}});a.mspace.Augment({HTMLbetterBreak:function(g,f){if(g.values&&g.values.id===this.spanID){return false}var n=this.getValues("linebreak");var k=n.linebreak;if(!k||this.hasDimAttr()){k=a.LINEBREAK.AUTO}var h=g.scanW,l=this.HTMLspanElement(),m=l.bbox.w;if(l.style.paddingLeft){m+=b.unEm(l.style.paddingLeft)}if(h-g.shift===0){return false}var i=b.linebreakWidth-h;var j=Math.floor(i/b.linebreakWidth*1000);if(j<0){j=e.toobig-3*j}j+=g.nest*e.nestfactor;var o=e[k];if(k===a.LINEBREAK.AUTO&&m>=e.spacelimit&&!this.mathbackground&&!this.background){o=[(m+e.spaceoffset)*e.spacefactor]}if(!MathJax.Object.isArray(o)){if(i>=0){j=o*g.nest}}else{j=Math.max(1,j+o[0]*g.nest)}if(j>=g.penalty){return false}g.penalty=j;g.values=n;g.W=h;g.w=m;n.lineleading=f.VALUES.lineleading;n.linebreakstyle="before";n.id=this.spanID;return true}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({HTMLbetterBreak:function(g,f){return this.Core().HTMLbetterBreak(g,f)},HTMLmoveLine:function(j,f,h,i,g){return this.Core().HTMLmoveSlice(j,f,h,i,g)}})});a.maction.Augment({HTMLbetterBreak:function(g,f){return this.Core().HTMLbetterBreak(g,f)},HTMLmoveLine:function(j,f,h,i,g){return this.Core().HTMLmoveSlice(j,f,h,i,g)},HTMLmoveSlice:function(g,i,l,f,m,j){var o=document.getElementById("MathJax-HitBox-"+this.spanID+b.idPostfix);if(o){o.parentNode.removeChild(o)}var k=this.SUPER(arguments).HTMLmoveSlice.apply(this,arguments);if(i.length===0){l=this.HTMLspanElement();var h=0;while(l){o=this.HTMLhandleHitBox(l,"-Continue-"+h);l=l.nextMathJaxSpan;h++}}return k}});a.semantics.Augment({HTMLbetterBreak:function(g,f){return(this.data[0]?this.data[0].HTMLbetterBreak(g,f):false)},HTMLmoveLine:function(j,f,h,i,g){return(this.data[0]?this.data[0].HTMLmoveSlice(j,f,h,i,g):null)}});MathJax.Hub.Startup.signal.Post("HTML-CSS multiline Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/multiline.js")}); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/config.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/config.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/config.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/config.js + * + * Copyright (c) 2009-2016 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.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.7.0",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},".MathJax .MJX-monospace":{"font-family":"monospace"},".MathJax .MJX-sans-serif":{"font-family":"sans-serif"},"#MathJax_Tooltip":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px","z-index":401}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var a=b.Insert({minBrowserVersion:{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},inlineMathDelimiters:["$","$"],displayMathDelimiters:["$$","$$"],multilineDisplay:true,minBrowserTranslate:function(f){var e=b.getJaxFor(f),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g534){x.STIXfontBug=true}}}});if(MathJax.Hub.Browser.STIXfontBug){j.FONTDATA.FONTS.STIXGeneral.family="STIXGeneral-Regular";j.FONTDATA.FONTS["STIXGeneral-italic"].family="STIXGeneral-Italic";delete j.FONTDATA.FONTS["STIXGeneral-italic"].style;j.FONTDATA.FONTS.STIXNonUnicode.family="STIXNonUnicode-Regular";j.FONTDATA.FONTS["STIXNonUnicode-italic"].family="STIXNonUnicode-Italic";delete j.FONTDATA.FONTS["STIXNonUnicode-italic"].style}var e=[];var o=j.Font.div;s.addElement(o,"span",{style:{display:"inline-block","font-family":"STIXNonUnicode","font-weight":"bold"}},["\uE38C\uE38C\uE38C\uE38C\uE38C"]);s.addElement(o,"span",{style:{display:"inline-block","font-family":"STIXNonUnicode","font-weight":"bold"}},["\uE39A\uE39A\uE39A\uE39A\uE39A"]);if(o.lastChild.previousSibling.offsetWidth T d \u23A6 \u2A00",skew:{84:0.0278,58096:0.0319},32:[0,0,250,0,0],62:[540,40,778,83,694],84:[717,68,545,34,833],100:[694,11,511,101,567],160:[0,0,250,0,0],8899:[750,249,833,55,777],9126:[1155,644,667,0,347],10752:[949,449,1511,56,1454],58096:[720,69,644,38,947],58097:[587,85,894,96,797]};MathJax.Callback.Queue(["initFont",MathJax.OutputJax["HTML-CSS"],"MathJax_WinChrome"],["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/WinChrome/Regular/Main.js"]); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js + * + * Copyright (c) 2009-2016 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.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6,{58048:[437,-64,500,58,417],58049:[437,-64,500,64,422],58050:[430,23,222,91,131],58051:[431,23,389,55,331],58052:[365,-132,778,55,719],58053:[753,175,778,83,694],58054:[753,175,778,83,694],58055:[708,209,778,82,693],58056:[708,209,778,82,693],58058:[694,-306,500,55,444],58059:[694,-306,500,55,444],58060:[366,22,500,55,444],58061:[366,22,500,55,444],58062:[694,195,889,0,860],58063:[694,195,889,0,860],58064:[689,0,778,55,722],58065:[689,0,778,55,722],58066:[575,20,722,84,637],58067:[575,20,722,84,637],58068:[539,41,778,83,694],58069:[576,19,722,84,637],58070:[576,19,722,84,637],58071:[539,41,778,83,694],58072:[716,132,667,56,611],58073:[471,82,667,24,643],58074:[471,82,667,23,643],58075:[601,101,778,15,762],58076:[694,111,944,49,895],58077:[367,-133,778,56,722]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/AMS.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js + * + * Copyright (c) 2009-2016 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.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6,{57920:[518,17,1150,64,1084],57921:[694,193,575,14,561],57922:[518,17,1150,65,1085],57923:[694,194,575,14,561],57924:[518,17,1150,64,1085],57925:[767,267,575,14,561],57926:[724,194,1150,64,1084],57927:[724,193,1150,64,1085],57928:[694,224,1150,65,1085],57929:[694,224,1150,64,1085],57930:[547,46,1150,64,1084],57931:[547,46,1150,47,1102],57932:[694,16,639,1,640],57933:[710,17,628,60,657],57934:[694,-1,639,64,574],57935:[686,24,958,56,901],57936:[587,86,767,97,670],57937:[587,86,767,96,670],57938:[750,250,575,63,511],57939:[820,180,958,78,988],57940:[451,8,894,65,830],57941:[452,8,1150,65,1084],57942:[714,0,722,55,676],57943:[750,249,319,129,190],57944:[750,248,575,145,430],57945:[604,17,767,64,702],57946:[604,16,767,64,702],57947:[603,16,767,64,702],57948:[604,16,767,64,702],57949:[711,211,569,64,632],57950:[391,-109,894,64,828],57951:[524,-32,894,64,829],57952:[711,210,894,64,829],57953:[505,3,894,64,829],57954:[697,199,894,96,797],57955:[697,199,894,96,797],57956:[617,116,1150,64,1085],57957:[618,116,1150,64,1085],57958:[587,85,894,96,797],57959:[587,86,894,96,796],57960:[697,199,894,96,797],57961:[697,199,894,96,796],57962:[632,132,894,64,828],57963:[632,132,894,64,828],57964:[693,-1,894,65,829],57965:[711,-1,1022,69,953],57966:[500,210,1022,68,953],57967:[711,211,1150,65,1084],57968:[719,129,894,64,829],57969:[711,24,894,65,828],57970:[719,154,894,64,828],57971:[719,129,894,32,861],57972:[750,17,447,64,381],57973:[741,223,447,57,389],57974:[724,224,447,63,382]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/Bold.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js + * + * Copyright (c) 2009-2016 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.OutputJax["HTML-CSS"].FONTDATA.FONTS.MathJax_WinIE6={directory:"WinIE6/Regular",family:"MathJax_WinIE6",testString:"\uE247 \uE257 \uE2CF",skew:{57869:0.0833,57933:0.0958},Ranges:[[57920,57983,"Bold"],[58048,58079,"AMS"]],32:[0,0,250,0,0],160:[0,0,250,0,0],57856:[511,11,1000,55,944],57857:[694,193,500,17,483],57858:[511,11,1000,56,944],57859:[694,194,500,17,483],57860:[511,11,1000,55,944],57861:[772,272,500,17,483],57862:[720,195,1000,29,944],57863:[720,195,1000,55,970],57864:[695,220,1000,55,970],57865:[695,220,1000,29,944],57866:[525,24,1000,56,944],57867:[526,25,1000,34,966],57868:[694,22,556,0,556],57869:[715,22,531,42,566],57870:[694,0,556,56,500],57871:[683,33,833,46,786],57872:[540,40,667,84,583],57873:[540,40,667,83,582],57874:[750,250,500,56,445],57875:[800,200,833,72,853],57876:[442,11,778,56,722],57877:[442,11,1000,55,944],57878:[694,0,722,55,666],57879:[750,249,278,119,159],57880:[750,250,500,132,367],57881:[598,22,667,55,611],57882:[598,22,667,55,611],57883:[598,22,667,55,611],57884:[598,22,667,55,611],57885:[716,216,417,55,472],57886:[367,-133,778,55,722],57887:[483,-55,778,55,722],57888:[716,215,778,56,722],57889:[464,-36,778,56,722],57890:[636,138,778,83,694],57891:[636,138,778,83,694],57892:[568,67,1000,56,944],57893:[567,67,1000,55,944],57894:[540,40,778,84,694],57895:[540,40,778,83,693],57896:[636,138,778,84,694],57897:[636,138,778,83,693],57898:[583,83,778,56,722],57899:[583,83,778,56,722],57900:[668,0,778,55,723],57901:[716,0,889,59,828],57902:[500,215,889,59,828],57903:[715,215,1000,56,944],57904:[727,130,778,55,723],57905:[716,33,778,55,723],57906:[727,162,778,55,723],57907:[726,130,778,28,750],57908:[750,22,389,55,332],57909:[734,223,389,65,324],57910:[723,223,389,55,333],57984:[0,1000,944,55,888],57985:[0,1000,1056,56,999],57986:[40,1160,1000,111,1020],57987:[21,621,333,145,188],57988:[21,621,556,145,410],57989:[0,1111,472,55,610],57990:[0,1111,472,55,610],57991:[0,600,667,112,555],57992:[0,600,667,112,555],57993:[1,601,667,312,355],58000:[0,1400,1278,56,1221],58001:[0,1400,1444,55,1388],58002:[40,1760,1000,111,1020],58005:[0,2222,556,55,944],58006:[0,2222,556,55,944],58018:[40,2360,1000,111,1020],58034:[40,2960,1000,111,1020]};MathJax.Callback.Queue(["initFont",MathJax.OutputJax["HTML-CSS"],"MathJax_WinIE6"],["loadComplete",MathJax.Ajax,MathJax.OutputJax["HTML-CSS"].fontDir+"/WinIE6/Regular/Main.js"]); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(h){var n="2.7.0";var m=h.FONTDATA.DELIMITERS;var g="MathJax_Main",i="MathJax_Main-bold",k="MathJax_AMS",e="MathJax_Size1",a="MathJax_Size4";var l="H",f="V";var j=[8722,g,0,0,0,-0.3,-0.3];var c=[61,g,0,0,0,0,0.1];var d={61:{dir:l,HW:[[0.767,g]],stretch:{rep:[61,g]}},8606:{dir:l,HW:[[1,k]],stretch:{left:[8606,k],rep:j}},8608:{dir:l,HW:[[1,k]],stretch:{right:[8608,k],rep:j}},8612:{dir:l,HW:[],stretch:{min:1,left:[8592,g],rep:j,right:[8739,e,0,-0.05,0.9]}},8613:{dir:f,HW:[],stretch:{min:0.6,bot:[8869,i,0,0,0.75],ext:[9168,e],top:[8593,e]}},8614:{dir:l,HW:[[1,g]],stretch:{left:[8739,e,-0.09,-0.05,0.9],rep:j,right:[8594,g]}},8615:{dir:f,HW:[],stretch:{min:0.6,top:[8868,i,0,0,0.75],ext:[9168,e],bot:[8595,e]}},8624:{dir:f,HW:[[0.722,k]],stretch:{top:[8624,k],ext:[9168,e,0.097]}},8625:{dir:f,HW:[[0.722,k]],stretch:{top:[8625,k,0.27],ext:[9168,e]}},8636:{dir:l,HW:[[1,g]],stretch:{left:[8636,g],rep:j}},8637:{dir:l,HW:[[1,g]],stretch:{left:[8637,g],rep:j}},8638:{dir:f,HW:[[0.888,k]],stretch:{top:[8638,k,0.12,0,1.1],ext:[9168,e]}},8639:{dir:f,HW:[[0.888,k]],stretch:{top:[8639,k,0.12,0,1.1],ext:[9168,e]}},8640:{dir:l,HW:[[1,g]],stretch:{right:[8640,g],rep:j}},8641:{dir:l,HW:[[1,g]],stretch:{right:[8641,g],rep:j}},8642:{dir:f,HW:[[0.888,k]],stretch:{bot:[8642,k,0.12,0,1.1],ext:[9168,e]}},8643:{dir:f,HW:[[0.888,k]],stretch:{bot:[8643,k,0.12,0,1.1],ext:[9168,e]}},8666:{dir:l,HW:[[1,k]],stretch:{left:[8666,k],rep:[8801,g]}},8667:{dir:l,HW:[[1,k]],stretch:{right:[8667,k],rep:[8801,g]}},9140:{dir:l,HW:[],stretch:{min:0.5,left:[9484,k,0,-0.1],rep:[8722,g,0,0.35],right:[9488,k,0,-0.1]}},9141:{dir:l,HW:[],stretch:{min:0.5,left:[9492,k,0,0.26],rep:[8722,g,0,0,0,0.25],right:[9496,k,0,0.26]}},9180:{dir:l,HW:[[0.778,k,0,8994],[1,g,0,8994]],stretch:{left:[57680,a],rep:[57684,a],right:[57681,a]}},9181:{dir:l,HW:[[0.778,k,0,8995],[1,g,0,8995]],stretch:{left:[57682,a],rep:[57684,a],right:[57683,a]}},9184:{dir:l,HW:[],stretch:{min:1.25,left:[714,g,-0.1],rep:[713,g,0,0.13],right:[715,g],fullExtenders:true}},9185:{dir:l,HW:[],stretch:{min:1.5,left:[715,g,-0.1,0.1],rep:[713,g],right:[714,g,-0.1,0.1],fullExtenders:true}},10502:{dir:l,HW:[],stretch:{min:1,left:[8656,g],rep:c,right:[8739,e,0,-0.1]}},10503:{dir:l,HW:[],stretch:{min:0.7,left:[8872,k,0,-0.12],rep:c,right:[8658,g]}},10574:{dir:l,HW:[],stretch:{min:0.5,left:[8636,g],rep:j,right:[8640,g]}},10575:{dir:f,HW:[],stretch:{min:0.5,top:[8638,k,0.12,0,1.1],ext:[9168,e],bot:[8642,k,0.12,0,1.1]}},10576:{dir:l,HW:[],stretch:{min:0.5,left:[8637,g],rep:j,right:[8641,g]}},10577:{dir:f,HW:[],stretch:{min:0.5,top:[8639,k,0.12,0,1.1],ext:[9168,e],bot:[8643,k,0.12,0,1.1]}},10586:{dir:l,HW:[],stretch:{min:1,left:[8636,g],rep:j,right:[8739,e,0,-0.05,0.9]}},10587:{dir:l,HW:[],stretch:{min:1,left:[8739,e,-0.05,-0.05,0.9],rep:j,right:[8640,g]}},10588:{dir:f,HW:[],stretch:{min:0.7,bot:[8869,i,0,0,0.75],ext:[9168,e],top:[8638,k,0.12,0,1.1]}},10589:{dir:f,HW:[],stretch:{min:0.7,top:[8868,i,0,0,0.75],ext:[9168,e],bot:[8642,k,0.12,0,1.1]}},10590:{dir:l,HW:[],stretch:{min:1,left:[8637,g],rep:j,right:[8739,e,0,-0.05,0.9]}},10591:{dir:l,HW:[],stretch:{min:1,left:[8739,e,-0.05,-0.05,0.9],rep:j,right:[8641,g]}},10592:{dir:f,HW:[],stretch:{min:0.7,bot:[8869,i,0,0,0.75],ext:[9168,e],top:[8639,k,0.12,0,1.1]}},10593:{dir:f,HW:[],stretch:{min:0.7,top:[8868,i,0,0,0.75],ext:[9168,e],bot:[8643,k,0.12,0,1.1]}}};for(var b in d){if(d.hasOwnProperty(b)){m[b]=d[b]}}MathJax.Ajax.loadComplete(h.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax["HTML-CSS"]); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/fonts/TeX/fontdata.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(i,b,q){var p="2.7.0";var m="MathJax_Main",r="MathJax_Main-bold",o="MathJax_Math-italic",h="MathJax_AMS",g="MathJax_Size1",f="MathJax_Size2",e="MathJax_Size3",c="MathJax_Size4";var j="H",a="V",l={load:"extra",dir:j},d={load:"extra",dir:a};var k=[8722,m,0,0,0,-0.31,-0.31];var n=[61,m,0,0,0,0,0.1];i.Augment({FONTDATA:{version:p,TeX_factor:1,baselineskip:1.2,lineH:0.8,lineD:0.2,hasStyleChar:true,FONTS:{MathJax_Main:"Main/Regular/Main.js","MathJax_Main-bold":"Main/Bold/Main.js","MathJax_Main-italic":"Main/Italic/Main.js","MathJax_Math-italic":"Math/Italic/Main.js","MathJax_Math-bold-italic":"Math/BoldItalic/Main.js",MathJax_Caligraphic:"Caligraphic/Regular/Main.js",MathJax_Size1:"Size1/Regular/Main.js",MathJax_Size2:"Size2/Regular/Main.js",MathJax_Size3:"Size3/Regular/Main.js",MathJax_Size4:"Size4/Regular/Main.js",MathJax_AMS:"AMS/Regular/Main.js",MathJax_Fraktur:"Fraktur/Regular/Main.js","MathJax_Fraktur-bold":"Fraktur/Bold/Main.js",MathJax_SansSerif:"SansSerif/Regular/Main.js","MathJax_SansSerif-bold":"SansSerif/Bold/Main.js","MathJax_SansSerif-italic":"SansSerif/Italic/Main.js",MathJax_Script:"Script/Regular/Main.js",MathJax_Typewriter:"Typewriter/Regular/Main.js","MathJax_Caligraphic-bold":"Caligraphic/Bold/Main.js"},VARIANT:{normal:{fonts:[m,g,h],offsetG:945,variantG:"italic",remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88,8214:8741,8726:[8726,"-TeX-variant"],8463:[8463,"-TeX-variant"],8242:[39,"sans-serif-italic"],10744:[47,b.VARIANT.ITALIC]}},bold:{fonts:[r,g,h],bold:true,offsetG:945,variantG:"bold-italic",remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88,10744:[47,"bold-italic"],8214:8741,8602:"\u2190\u0338",8603:"\u2192\u0338",8622:"\u2194\u0338",8653:"\u21D0\u0338",8654:"\u21D4\u0338",8655:"\u21D2\u0338",8708:"\u2203\u0338",8740:"\u2223\u0338",8742:"\u2225\u0338",8769:"\u223C\u0338",8775:"\u2245\u0338",8814:"<\u0338",8815:">\u0338",8816:"\u2264\u0338",8817:"\u2265\u0338",8832:"\u227A\u0338",8833:"\u227B\u0338",8840:"\u2286\u0338",8841:"\u2287\u0338",8876:"\u22A2\u0338",8877:"\u22A8\u0338",8928:"\u227C\u0338",8929:"\u227D\u0338"}},italic:{fonts:[o,"MathJax_Main-italic",m,g,h],italic:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"bold-italic":{fonts:["MathJax_Math-bold-italic",r,g,h],bold:true,italic:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"double-struck":{fonts:[h,m]},fraktur:{fonts:["MathJax_Fraktur",m,g,h]},"bold-fraktur":{fonts:["MathJax_Fraktur-bold",r,g,h],bold:true},script:{fonts:["MathJax_Script",m,g,h]},"bold-script":{fonts:["MathJax_Script",r,g,h],bold:true},"sans-serif":{fonts:["MathJax_SansSerif",m,g,h]},"bold-sans-serif":{fonts:["MathJax_SansSerif-bold",r,g,h],bold:true},"sans-serif-italic":{fonts:["MathJax_SansSerif-italic","MathJax_Main-italic",g,h],italic:true},"sans-serif-bold-italic":{fonts:["MathJax_SansSerif-italic","MathJax_Main-italic",g,h],bold:true,italic:true},monospace:{fonts:["MathJax_Typewriter",m,g,h]},"-tex-caligraphic":{fonts:["MathJax_Caligraphic",m],offsetA:65,variantA:"italic"},"-tex-oldstyle":{fonts:["MathJax_Caligraphic",m]},"-tex-mathit":{fonts:["MathJax_Main-italic",o,m,g,h],italic:true,noIC:true,remap:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,932:84,935:88}},"-TeX-variant":{fonts:[h,m,g],remap:{8808:57356,8809:57357,8816:57361,8817:57358,10887:57360,10888:57359,8740:57350,8742:57351,8840:57366,8841:57368,8842:57370,8843:57371,10955:57367,10956:57369,988:57352,1008:57353,8726:[8726,b.VARIANT.NORMAL],8463:[8463,b.VARIANT.NORMAL]}},"-largeOp":{fonts:[f,g,m]},"-smallOp":{fonts:[g,m]},"-tex-caligraphic-bold":{fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],bold:true,offsetA:65,variantA:"bold-italic"},"-tex-oldstyle-bold":{fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],bold:true}},RANGES:[{name:"alpha",low:97,high:122,offset:"A",add:32},{name:"number",low:48,high:57,offset:"N"},{name:"greek",low:945,high:1014,offset:"G"}],RULECHAR:8722,REMAP:{8254:713,8400:8636,8401:8640,8406:8592,8417:8596,8428:8641,8429:8637,8430:8592,8431:8594,8432:42,65079:9182,65080:9183,183:8901,697:8242,978:933,8710:916,8213:8212,8215:95,8226:8729,8260:47,8965:8892,8966:10846,9642:9632,9652:9650,9653:9651,9656:9654,9662:9660,9663:9661,9666:9664,9001:10216,9002:10217,12296:10216,12297:10217,10072:8739,10799:215,9723:9633,9724:9632,8450:[67,b.VARIANT.DOUBLESTRUCK],8459:[72,b.VARIANT.SCRIPT],8460:[72,b.VARIANT.FRAKTUR],8461:[72,b.VARIANT.DOUBLESTRUCK],8462:[104,b.VARIANT.ITALIC],8464:[74,b.VARIANT.SCRIPT],8465:[73,b.VARIANT.FRAKTUR],8466:[76,b.VARIANT.SCRIPT],8469:[78,b.VARIANT.DOUBLESTRUCK],8473:[80,b.VARIANT.DOUBLESTRUCK],8474:[81,b.VARIANT.DOUBLESTRUCK],8475:[82,b.VARIANT.SCRIPT],8476:[82,b.VARIANT.FRAKTUR],8477:[82,b.VARIANT.DOUBLESTRUCK],8484:[90,b.VARIANT.DOUBLESTRUCK],8486:[937,b.VARIANT.NORMAL],8488:[90,b.VARIANT.FRAKTUR],8492:[66,b.VARIANT.SCRIPT],8493:[67,b.VARIANT.FRAKTUR],8496:[69,b.VARIANT.SCRIPT],8497:[70,b.VARIANT.SCRIPT],8499:[77,b.VARIANT.SCRIPT],8775:8774,8988:9484,8989:9488,8990:9492,8991:9496,8708:"\u2203\u0338",8716:"\u220B\u0338",8772:"\u2243\u0338",8777:"\u2248\u0338",8802:"\u2261\u0338",8813:"\u224D\u0338",8820:"\u2272\u0338",8821:"\u2273\u0338",8824:"\u2276\u0338",8825:"\u2277\u0338",8836:"\u2282\u0338",8837:"\u2283\u0338",8930:"\u2291\u0338",8931:"\u2292\u0338",10764:"\u222C\u222C",8243:"\u2032\u2032",8244:"\u2032\u2032\u2032",8246:"\u2035\u2035",8247:"\u2035\u2035\u2035",8279:"\u2032\u2032\u2032\u2032",8411:"...",8412:"...."},REMAPACCENT:{"\u2192":"\u20D7","\u2032":"'","\u2035":"`"},REMAPACCENTUNDER:{},PLANE1MAP:[[119808,119833,65,b.VARIANT.BOLD],[119834,119859,97,b.VARIANT.BOLD],[119860,119885,65,b.VARIANT.ITALIC],[119886,119911,97,b.VARIANT.ITALIC],[119912,119937,65,b.VARIANT.BOLDITALIC],[119938,119963,97,b.VARIANT.BOLDITALIC],[119964,119989,65,b.VARIANT.SCRIPT],[120068,120093,65,b.VARIANT.FRAKTUR],[120094,120119,97,b.VARIANT.FRAKTUR],[120120,120145,65,b.VARIANT.DOUBLESTRUCK],[120172,120197,65,b.VARIANT.BOLDFRAKTUR],[120198,120223,97,b.VARIANT.BOLDFRAKTUR],[120224,120249,65,b.VARIANT.SANSSERIF],[120250,120275,97,b.VARIANT.SANSSERIF],[120276,120301,65,b.VARIANT.BOLDSANSSERIF],[120302,120327,97,b.VARIANT.BOLDSANSSERIF],[120328,120353,65,b.VARIANT.SANSSERIFITALIC],[120354,120379,97,b.VARIANT.SANSSERIFITALIC],[120432,120457,65,b.VARIANT.MONOSPACE],[120458,120483,97,b.VARIANT.MONOSPACE],[120488,120513,913,b.VARIANT.BOLD],[120546,120570,913,b.VARIANT.ITALIC],[120572,120603,945,b.VARIANT.ITALIC],[120604,120628,913,b.VARIANT.BOLDITALIC],[120630,120661,945,b.VARIANT.BOLDITALIC],[120662,120686,913,b.VARIANT.BOLDSANSSERIF],[120720,120744,913,b.VARIANT.SANSSERIFBOLDITALIC],[120782,120791,48,b.VARIANT.BOLD],[120802,120811,48,b.VARIANT.SANSSERIF],[120812,120821,48,b.VARIANT.BOLDSANSSERIF],[120822,120831,48,b.VARIANT.MONOSPACE]],REMAPGREEK:{913:65,914:66,917:69,918:90,919:72,921:73,922:75,924:77,925:78,927:79,929:80,930:920,932:84,935:88,938:8711,970:8706,971:1013,972:977,973:1008,974:981,975:1009,976:982},RemapPlane1:function(v,u){for(var t=0,s=this.PLANE1MAP.length;t T d \u23A6 \u2A00",skew:{84:0.0278,58096:0.0319},32:[0,0,250,0,0],62:[540,40,778,83,694],84:[717,68,545,34,833],100:[694,11,511,101,567],160:[0,0,250,0,0],8899:[750,249,833,55,777],9126:[1155,644,667,0,347],10752:[949,449,1511,56,1454],58096:[720,69,644,38,947],58097:[587,85,894,96,797]}}}})}(function(){var v=i.FONTDATA.FONTS,u=i.config.availableFonts;var t,s=[];if(i.allowWebFonts){for(t in v){if(v[t].family){if(u&&u.length&&i.Font.testFont(v[t])){v[t].available=true;i.Font.loadComplete(v[t])}else{v[t].isWebFont=true;if(i.FontFaceBug){v[t].family=t}s.push(i.Font.fontFace(t))}}}if(!i.config.preloadWebFonts){i.config.preloadWebFonts=[]}i.config.preloadWebFonts.push(m,o,g);if(s.length){i.config.styles["@font-face"]=s}}else{if(u&&u.length){for(t in v){if(v[t].family&&i.Font.testFont(v[t])){v[t].available=true;i.Font.loadComplete(v[t])}}}}})();q.loadComplete(i.fontDir+"/fontdata.js")})(MathJax.OutputJax["HTML-CSS"],MathJax.ElementJax.mml,MathJax.Ajax); diff --git a/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/imageFonts.js b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/imageFonts.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/HTML-CSS/imageFonts.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/HTML-CSS/imageFonts.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(b,c,a){var d="2.7.0";b.Register.LoadHook(c.fontDir+"/fontdata.js",function(){c.Augment({allowWebFonts:false,imgDir:c.webfontDir+"/png",imgPacked:(MathJax.isPacked?"":"/unpacked"),imgSize:["050","060","071","085",100,120,141,168,200,238,283,336,400,476],imgBaseIndex:4,imgSizeForEm:{},imgSizeForScale:{},imgZoom:1,handleImg:function(t,i,r,h,u){if(u.length){this.addText(t,u)}var s=r[5].orig;if(!s){s=r[5].orig=[r[0],r[1],r[2],r[3],r[4]]}var m=this.imgZoom;if(!t.scale){t.scale=1}var p=this.imgIndex(t.scale*m);if(p==this.imgEmWidth.length-1&&this.em*t.scale*m/this.imgEmWidth[p]>1.1){m=this.imgEmWidth[p]/(this.em*t.scale)}var q=this.imgEmWidth[p]/(this.em*(t.scale||1)*m);r[0]=s[0]*q;r[1]=s[1]*q;r[2]=s[2]*q;r[3]=s[3]*q;r[4]=s[4]*q;var k=this.imgDir+"/"+i.directory+"/"+this.imgSize[p];var l=h.toString(16).toUpperCase();while(l.length<4){l="0"+l}var j=k+"/"+l+".png";var o=r[5].img[p];var g={width:Math.floor(o[0]/m+0.5)+"px",height:Math.floor(o[1]/m+0.5)+"px"};if(o[2]){g.verticalAlign=Math.floor(-o[2]/m+0.5)+"px"}if(r[3]<0){g.marginLeft=this.Em(r[3]/1000)}if(r[4]!=r[2]){g.marginRight=this.Em((r[2]-r[4])/1000)}if(this.msieIE6){g.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.urlRev(j)+"', sizingMethod='scale')";j=this.directory+"/blank.gif"}this.addElement(t,"img",{src:a.urlRev(j),style:g,isMathJax:true});return""},defineImageData:function(i){for(var g in i){if(i.hasOwnProperty(g)){var h=c.FONTDATA.FONTS[g];if(h){g=i[g];for(var j in g){if(g.hasOwnProperty(j)&&h[j]){h[j][5]={img:g[j]}}}}}}},initImg:function(j){if(this.imgSizeForEm[this.em]){this.imgBaseIndex=this.imgSizeForEm[this.em]}for(var h=0,g=this.imgEmWidth.length-1;hthis.em-this.imgEmWidth[h-1]){h--}this.imgSizeForEm[this.em]=this.imgBaseIndex=h;this.imgZoom=this.imgBrowserZoom()},imgIndex:function(k){if(!k){return this.imgBaseIndex}if(!this.imgSizeForScale[this.em]){this.imgSizeForScale[this.em]={}}if(this.imgSizeForScale[this.em][k]){return this.imgSizeForScale[this.em][k]}var j=this.em*k;for(var h=0,g=this.imgEmWidth.length-1;hj-this.imgEmWidth[h-1]){h--}this.imgSizeForScale[this.em][k]=h;return h},imgBrowserZoom:function(){return 1}});b.Browser.Select({Firefox:function(h){var g=c.addElement(document.body,"div",{style:{display:"none",visibility:"hidden",overflow:"scroll",position:"absolute",top:0,left:0,width:"200px",height:"200px",padding:0,border:0,margin:0}});var i=c.addElement(g,"div",{style:{position:"absolute",left:0,top:0,right:0,bottom:0,padding:0,border:0,margin:0}});c.Augment({imgSpaceBug:true,imgSpace:"\u00A0",imgZoomLevel:(h.isMac?{50:0.3,30:0.5,22:0.67,19:0.8,16:0.9,15:1,13:1.1,12:1.2,11:1.33,10:1.5,9:1.7,7:2,6:2.4,5:3,0:15}:{56:0.3,34:0.5,25:0.67,21:0.8,19:0.9,17:1,15:1.1,14:1.2,13:1.33,11:1.5,10:1.7,8:2,7:2.4,6:3,0:17}),imgZoomDiv:g,imgBrowserZoom:function(){var j=this.imgZoomLevel;g.style.display="";var k=(g.offsetWidth-i.offsetWidth);k=(j[k]?j[k]:j[0]/k);g.style.display="none";return k}})},Safari:function(g){c.Augment({imgBrowserZoom:function(){return 3}})},Chrome:function(g){c.Augment({imgHeightBug:true,imgBrowserZoom:function(){return 3}})},Opera:function(g){c.Augment({imgSpaceBug:true,imgSpace:"\u00A0\u00A0",imgDoc:(document.compatMode=="BackCompat"?document.body:document.documentElement),imgBrowserZoom:function(){if(g.isMac){return 3}var h=this.imgDoc.clientHeight,i=Math.floor(15*h/window.innerHeight);if(this.imgDoc.clientWidth=r.HTMLCSSlast+r.HTMLCSSchunk){this.postTranslate(r,true);r.HTMLCSSchunk=Math.floor(r.HTMLCSSchunk*this.config.EqnChunkFactor);r.HTMLCSSdelay=true}return false},savePreview:function(m){var n=m.MathJax.preview;if(n){m.MathJax.tmpPreview=document.createElement("span");n.parentNode.replaceChild(m.MathJax.tmpPreview,n)}},restorePreview:function(m){var n=m.MathJax.tmpPreview;if(n){n.parentNode.replaceChild(m.MathJax.preview,n);delete m.MathJax.tmpPreview}},getMetrics:function(m){var n=m.HTMLCSS;this.em=i.mbase.prototype.em=n.em*n.scale;this.outerEm=n.em;this.scale=n.scale;this.cwidth=n.cwidth;this.linebreakWidth=n.lineWidth},postTranslate:function(o,u){var r=o.jax[this.id],v,p,s,q;for(s=o.HTMLCSSlast,q=o.HTMLCSSeqn;sm){y.style.width=(u+100)+"px"}}}r=y.firstChild.firstChild.style;if(z.H!=null&&z.H>z.h){r.marginTop=d.Em(z.H-Math.max(z.h,d.FONTDATA.lineH))}if(z.D!=null&&z.D>z.d){r.marginBottom=d.Em(z.D-Math.max(z.d,d.FONTDATA.lineD))}if(z.lw<0){r.paddingLeft=d.Em(-z.lw)}if(z.rw>z.w){r.marginRight=d.Em(z.rw-z.w)}y.style.position="absolute";if(!p){x.style.position="absolute"}var w=y.offsetWidth,t=y.offsetHeight,A=x.offsetHeight,s=x.offsetWidth;y.style.position=x.style.position="";return{Y:-l.getBBox(y).h,mW:s,mH:A,zW:w,zH:t}},initImg:function(m){},initHTML:function(n,m){},initFont:function(m){var o=d.FONTDATA.FONTS,n=d.config.availableFonts;if(n&&n.length&&d.Font.testFont(o[m])){o[m].available=true;if(o[m].familyFixed){o[m].family=o[m].familyFixed;delete o[m].familyFixed}return null}if(!this.allowWebFonts){return null}o[m].isWebFont=true;if(d.FontFaceBug){o[m].family=m;if(d.msieFontCSSBug){o[m].family+="-Web"}}return j.Styles({"@font-face":this.Font.fontFace(m)})},Remove:function(m){var n=document.getElementById(m.inputID+"-Frame");if(n){if(m.HTMLCSS.display){n=n.parentNode}n.parentNode.removeChild(n)}delete m.HTMLCSS},getHD:function(n,o){if(n.bbox&&this.config.noReflows&&!o){return{h:n.bbox.h,d:n.bbox.d}}var m=n.style.position;n.style.position="absolute";this.HDimg.style.height="0px";n.appendChild(this.HDspan);var p={h:n.offsetHeight};this.HDimg.style.height=p.h+"px";p.d=n.offsetHeight-p.h;p.h-=p.d;p.h/=this.em;p.d/=this.em;n.removeChild(this.HDspan);n.style.position=m;return p},getW:function(q){var n,p,o=(q.bbox||{}).w,r=q;if(q.bbox&&this.config.noReflows&&q.bbox.exactW!==false){if(!q.bbox.exactW){if(q.style.paddingLeft){o+=this.unEm(q.style.paddingLeft)*(q.scale||1)}if(q.style.paddingRight){o+=this.unEm(q.style.paddingRight)*(q.scale||1)}}return o}if(q.bbox&&q.bbox.exactW){return o}if((q.bbox&&o>=0&&!this.initialSkipBug&&!this.msieItalicWidthBug)||this.negativeBBoxes||!q.firstChild){n=q.offsetWidth;p=q.parentNode.offsetHeight}else{if(q.bbox&&o<0&&this.msieNegativeBBoxBug){n=-q.offsetWidth,p=q.parentNode.offsetHeight}else{var m=q.style.position;q.style.position="absolute";r=this.startMarker;q.insertBefore(r,q.firstChild);q.appendChild(this.endMarker);n=this.endMarker.offsetLeft-r.offsetLeft;q.removeChild(this.endMarker);q.removeChild(r);q.style.position=m}}if(p!=null){q.parentNode.HH=p/this.em}return n/this.em},Measured:function(o,n){var p=o.bbox;if(p.width==null&&p.w&&!p.isMultiline){var m=this.getW(o);p.rw+=m-p.w;p.w=m;p.exactW=true}if(!n){n=o.parentNode}if(!n.bbox){n.bbox=p}return o},Remeasured:function(n,m){m.bbox=this.Measured(n,m).bbox},MeasureSpans:function(q){var t=[],v,s,p,w,n,r,o,u;for(s=0,p=q.length;s=0&&!this.initialSkipBug)||(w.w<0&&this.msieNegativeBBoxBug)){t.push([v])}else{if(this.initialSkipBug){n=this.startMarker.cloneNode(true);r=this.endMarker.cloneNode(true);v.insertBefore(n,v.firstChild);v.appendChild(r);t.push([v,n,r,v.style.position]);v.style.position="absolute"}else{r=this.endMarker.cloneNode(true);v.appendChild(r);t.push([v,null,r])}}}for(s=0,p=t.length;s=0&&!this.initialSkipBug)||this.negativeBBoxes||!v.firstChild){o=v.offsetWidth;u.HH=u.offsetHeight/this.em}else{if(w.w<0&&this.msieNegativeBBoxBug){o=-v.offsetWidth,u.HH=u.offsetHeight/this.em}else{o=t[s][2].offsetLeft-((t[s][1]||{}).offsetLeft||0)}}o/=this.em;w.rw+=o-w.w;w.w=o;w.exactW=true;if(!u.bbox){u.bbox=w}}for(s=0,p=t.length;s=0){r.style.width=this.Em(s);r.style.display="inline-block";r.style.overflow="hidden"}else{if(this.msieNegativeSpaceBug){r.style.height=""}r.style.marginLeft=this.Em(s);if(d.safariNegativeSpaceBug&&r.parentNode.firstChild==r){this.createBlank(r,0,true)}}if(o&&o!==i.COLOR.TRANSPARENT){r.style.backgroundColor=o;r.style.position="relative"}return r},createRule:function(t,p,r,u,n){if(p<-r){r=-p}var o=d.TeX.min_rule_thickness,q=1;if(u>0&&u*this.em0&&(p+r)*this.emp+r){m.borderTop=this.Px(p+r)+" "+n;m.width=this.Em(u);m.height=(this.msieRuleBug&&p+r>0?this.Em(p+r):0)}else{m.borderLeft=this.Px(u)+" "+n;m.width=(this.msieRuleBug&&u>0?this.Em(u):0);m.height=this.Em(p+r)}var s=this.addElement(t,"span",{style:m,noAdjust:true,HH:p+r,isMathJax:true,bbox:{h:p,d:r,w:u,rw:u,lw:0,exactW:true}});if(t.isBox||t.className=="mspace"){t.bbox=s.bbox,t.HH=p+r}return s},createFrame:function(v,s,u,x,z,n){if(s<-u){u=-s}var r=2*z;if(this.msieFrameSizeBug){if(xE.w){d.createBlank(v,E.rw-E.w+0.1)}}if(!this.msieClipRectBug&&!E.noclip&&!p){var C=3/this.em;var B=(E.H==null?E.h:E.H),n=(E.D==null?E.d:E.D);var F=z-B-C,q=z+n+C,o=-1000,m=E.rw+1000;v.style.clip="rect("+this.Em(F)+" "+this.Em(m)+" "+this.Em(q)+" "+this.Em(o)+")"}}v.style.top=this.Em(-s-z);v.style.left=this.Em(u+G);if(E&&A){if(E.H!=null&&(A.H==null||E.H+s>A.H)){A.H=E.H+s}if(E.D!=null&&(A.D==null||E.D-s>A.D)){A.D=E.D-s}if(E.h+s>A.h){A.h=E.h+s}if(E.d-s>A.d){A.d=E.d-s}if(A.H!=null&&A.H<=A.h){delete A.H}if(A.D!=null&&A.D<=A.d){delete A.D}if(E.w+u>A.w){A.w=E.w+u;if(A.width==null){w.style.width=this.Em(A.w)}}if(E.rw+u>A.rw){A.rw=E.rw+u}if(E.lw+u=p-0.01||(u==r-1&&!o.stretch)){if(o.HW[u][2]){s*=o.HW[u][2]}if(o.HW[u][3]){n=o.HW[u][3]}var t=this.addElement(w,"span");this.createChar(t,[n,o.HW[u][1]],s,q);w.bbox=t.bbox;w.offset=0.65*w.bbox.w;w.scale=s;return}}if(o.stretch){this["extendDelimiter"+o.dir](w,v,o.stretch,s,q)}},extendDelimiterV:function(B,u,F,G,x){var p=this.createStack(B,true);var w=this.createBox(p),v=this.createBox(p);this.createChar(w,(F.top||F.ext),G,x);this.createChar(v,(F.bot||F.ext),G,x);var o={bbox:{w:0,lw:0,rw:0}},E=o,q;var C=w.bbox.h+w.bbox.d+v.bbox.h+v.bbox.d;var s=-w.bbox.h;this.placeBox(w,0,s,true);s-=w.bbox.d;if(F.mid){E=this.createBox(p);this.createChar(E,F.mid,G,x);C+=E.bbox.h+E.bbox.d}if(F.min&&uC){o=this.Element("span");this.createChar(o,F.ext,G,x);var D=o.bbox.h+o.bbox.d,m=D-0.05,z,r,A=(F.mid?2:1);r=z=Math.min(Math.ceil((u-C)/(A*m)),this.maxStretchyParts);if(!F.fullExtenders){m=(u-C)/(A*z)}var t=(z/(z+1))*(D-m);m=D-t;s+=t+m-o.bbox.h;while(A-->0){while(z-->0){if(!this.msieCloneNodeBug){q=o.cloneNode(true)}else{q=this.Element("span");this.createChar(q,F.ext,G,x)}q.bbox=o.bbox;s-=m;this.placeBox(this.addBox(p,q),0,s,true)}s+=t-o.bbox.d;if(F.mid&&A){this.placeBox(E,0,s-E.bbox.h,true);z=r;s+=-(E.bbox.h+E.bbox.d)+t+m-o.bbox.h}}}else{s+=(C-u)/2;if(F.mid){this.placeBox(E,0,s-E.bbox.h,true);s+=-(E.bbox.h+E.bbox.d)}s+=(C-u)/2}this.placeBox(v,0,s-v.bbox.h,true);s-=v.bbox.h+v.bbox.d;B.bbox={w:Math.max(w.bbox.w,o.bbox.w,v.bbox.w,E.bbox.w),lw:Math.min(w.bbox.lw,o.bbox.lw,v.bbox.lw,E.bbox.lw),rw:Math.max(w.bbox.rw,o.bbox.rw,v.bbox.rw,E.bbox.rw),h:0,d:-s,exactW:true};B.scale=G;B.offset=0.55*B.bbox.w;B.isMultiChar=true;this.setStackWidth(p,B.bbox.w)},extendDelimiterH:function(C,p,F,H,z){var s=this.createStack(C,true);var q=this.createBox(s),D=this.createBox(s);this.createChar(q,(F.left||F.rep),H,z);this.createChar(D,(F.right||F.rep),H,z);var m=this.Element("span");this.createChar(m,F.rep,H,z);var E={bbox:{h:-this.BIGDIMEN,d:-this.BIGDIMEN}},o;this.placeBox(q,-q.bbox.lw,0,true);var v=(q.bbox.rw-q.bbox.lw)+(D.bbox.rw-D.bbox.lw)-0.05,u=q.bbox.rw-q.bbox.lw-0.025,y;if(F.mid){E=this.createBox(s);this.createChar(E,F.mid,H,z);v+=E.bbox.w}if(F.min&&pv){var G=m.bbox.rw-m.bbox.lw,r=G-0.05,A,t,B=(F.mid?2:1);t=A=Math.min(Math.ceil((p-v)/(B*r)),this.maxStretchyParts);if(!F.fillExtenders){r=(p-v)/(B*A)}y=(A/(A+1))*(G-r);r=G-y;u-=m.bbox.lw+y;while(B-->0){while(A-->0){if(!this.cloneNodeBug){o=m.cloneNode(true)}else{o=this.Element("span");this.createChar(o,F.rep,H,z)}o.bbox=m.bbox;this.placeBox(this.addBox(s,o),u,0,true);u+=r}if(F.mid&&B){this.placeBox(E,u,0,true);u+=E.bbox.w-y;A=t}}}else{u-=(v-p)/2;if(F.mid){this.placeBox(E,u,0,true);u+=E.bbox.w}u-=(v-p)/2}this.placeBox(D,u,0,true);C.bbox={w:u+D.bbox.rw,lw:0,rw:u+D.bbox.rw,h:Math.max(q.bbox.h,m.bbox.h,D.bbox.h,E.bbox.h),d:Math.max(q.bbox.d,m.bbox.d,D.bbox.d,E.bbox.d),exactW:true};C.scale=H;C.isMultiChar=true;this.setStackWidth(s,C.bbox.w)},createChar:function(u,r,p,n){u.isMathJax=true;var t=u,v="",q={fonts:[r[1]],noRemap:true};if(n&&n===i.VARIANT.BOLD){q.fonts=[r[1]+"-bold",r[1]]}if(typeof(r[1])!=="string"){q=r[1]}if(r[0] instanceof Array){for(var s=0,o=r[0].length;s=55296&&y<56319){C++;y=(((y-55296)<<10)+(t.charCodeAt(C)-56320))+65536;if(this.FONTDATA.RemapPlane1){var F=this.FONTDATA.RemapPlane1(y,q);y=F.n;q=F.variant}}else{var v,s,w=this.FONTDATA.RANGES;for(v=0,s=w.length;v=w[v].low&&y<=w[v].high){if(w[v].remap&&w[v].remap[y]){y=r+w[v].remap[y]}else{y=y-w[v].low+r;if(w[v].add){y+=w[v].add}}if(q["variant"+w[v].offset]){q=this.FONTDATA.VARIANT[q["variant"+w[v].offset]]}break}}}if(q.remap&&q.remap[y]){y=q.remap[y];if(q.remap.variant){q=this.FONTDATA.VARIANT[q.remap.variant]}}else{if(this.FONTDATA.REMAP[y]&&!q.noRemap){y=this.FONTDATA.REMAP[y]}}if(h(y)){q=this.FONTDATA.VARIANT[y[1]];y=y[0]}if(typeof(y)==="string"){t=y+t.substr(C+1);z=t.length;C=-1;continue}u=this.lookupChar(q,y);D=u[y];if(p||(!this.checkFont(u,o.style)&&!D[5].img)){if(A.length){this.addText(o,A);A=""}var x=!!o.style.fontFamily||!!B.style.fontStyle||!!B.style.fontWeight||!u.directory||p;p=false;if(o!==B){x=!this.checkFont(u,B.style);o=B}if(x){o=this.addElement(B,"span",{isMathJax:true,subSpan:true})}this.handleFont(o,u,o!==B)}A=this.handleChar(o,u,D,y,A);if(!(D[5]||{}).space){if(D[0]/1000>B.bbox.h){B.bbox.h=D[0]/1000}if(D[1]/1000>B.bbox.d){B.bbox.d=D[1]/1000}}if(B.bbox.w+D[3]/1000B.bbox.rw){B.bbox.rw=B.bbox.w+D[4]/1000}B.bbox.w+=D[2]/1000;if((D[5]||{}).isUnknown){B.bbox.exactW=false}}if(A.length){this.addText(o,A)}if(B.scale&&B.scale!==1){B.bbox.h*=B.scale;B.bbox.d*=B.scale;B.bbox.w*=B.scale;B.bbox.lw*=B.scale;B.bbox.rw*=B.scale}if(t.length==1&&u.skew&&u.skew[y]){B.bbox.skew=u.skew[y]}},checkFont:function(m,n){var o=(n.fontWeight||"normal");if(o.match(/^\d+$/)){o=(parseInt(o)>=600?"bold":"normal")}return(m.family.replace(/'/g,"")===n.fontFamily.replace(/'/g,"")&&(m.style||"normal")===(n.fontStyle||"normal")&&(m.weight||"normal")===o)},handleFont:function(o,m,q){o.style.fontFamily=m.family;if(!m.directory){o.style.fontSize=Math.floor(d.config.scale/d.scale+0.5)+"%"}if(!(d.FontFaceBug&&m.isWebFont)){var n=m.style||"normal",p=m.weight||"normal";if(n!=="normal"||q){o.style.fontStyle=n}if(p!=="normal"||q){o.style.fontWeight=p}}},handleChar:function(o,m,u,t,s){var r=u[5];if(r.space){if(s.length){this.addText(o,s)}d.createShift(o,u[2]/1000);return""}if(r.img){return this.handleImg(o,m,u,t,s)}if(r.isUnknown&&this.FONTDATA.DELIMITERS[t]){if(s.length){this.addText(o,s)}var q=o.scale;d.createDelimiter(o,t,0,1,m);if(this.FONTDATA.DELIMITERS[t].dir==="V"){o.style.verticalAlign=this.Em(o.bbox.d);o.bbox.h+=o.bbox.d;o.bbox.d=0}o.scale=q;u[0]=o.bbox.h*1000;u[1]=o.bbox.d*1000;u[2]=o.bbox.w*1000;u[3]=o.bbox.lw*1000;u[4]=o.bbox.rw*1000;return""}if(r.c==null){if(t<=65535){r.c=String.fromCharCode(t)}else{var p=t-65536;r.c=String.fromCharCode((p>>10)+55296)+String.fromCharCode((p&1023)+56320)}}if(d.ffFontOptimizationBug&&u[4]-u[2]>125){o.style.textRendering="optimizeLegibility"}if(r.rfix){this.addText(o,s+r.c);d.createShift(o,r.rfix/1000);return""}if(u[2]||!this.msieAccentBug||s.length){return s+r.c}d.createShift(o,u[3]/1000);d.createShift(o,(u[4]-u[3])/1000);this.addText(o,r.c);d.createShift(o,-u[4]/1000);return""},handleImg:function(o,m,r,q,p){return p},lookupChar:function(r,u){var q,o;if(!r.FONTS){var t=this.FONTDATA.FONTS;var s=(r.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(s instanceof Array)){s=[s]}if(r.fonts!=s){r.fonts=s}r.FONTS=[];for(q=0,o=s.length;q=0;p--){if(o.Ranges[p][2]==q){o.Ranges.splice(p,1)}}this.loadFont(o.directory+"/"+q+".js")}}}},loadFont:function(n){var m=MathJax.Callback.Queue();m.Push(["Require",j,this.fontDir+"/"+n]);if(this.imgFonts){if(!MathJax.isPacked){n=n.replace(/\/([^\/]*)$/,d.imgPacked+"/$1")}m.Push(["Require",j,this.webfontDir+"/png/"+n])}b.RestartAfter(m.Push({}))},loadWebFont:function(m){m.available=m.isWebFont=true;if(d.FontFaceBug){m.family=m.name;if(d.msieFontCSSBug){m.family+="-Web"}}b.RestartAfter(this.Font.loadWebFont(m))},loadWebFontError:function(n,m){b.Startup.signal.Post("HTML-CSS Jax - disable web fonts");n.isWebFont=false;if(this.config.imageFont&&this.config.imageFont===this.fontInUse){this.imgFonts=true;b.Startup.signal.Post("HTML-CSS Jax - switch to image fonts");b.Startup.signal.Post("HTML-CSS Jax - using image fonts");e(["WebFontNotAvailable","Web-Fonts not available -- using image fonts instead"],null,3000);j.Require(this.directory+"/imageFonts.js",m)}else{this.allowWebFonts=false;m()}},Element:MathJax.HTML.Element,addElement:MathJax.HTML.addElement,TextNode:MathJax.HTML.TextNode,addText:MathJax.HTML.addText,ucMatch:MathJax.HTML.ucMatch,BIGDIMEN:10000000,ID:0,idPostfix:"",GetID:function(){this.ID++;return this.ID},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,rule_thickness:0.06,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,scriptspace:0.1,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.3,min_rule_thickness:1.25},NBSP:"\u00A0",rfuzz:0});MathJax.Hub.Register.StartupHook("mml Jax Ready",function(){i=MathJax.ElementJax.mml;i.mbase.Augment({toHTML:function(q){q=this.HTMLcreateSpan(q);if(this.type!="mrow"){q=this.HTMLhandleSize(q)}for(var o=0,n=this.data.length;on.d){n.d=o.d}if(o.h>n.h){n.h=o.h}if(o.D!=null&&o.D>n.D){n.D=o.D}if(o.H!=null&&o.H>n.H){n.H=o.H}if(p.style.paddingLeft){n.w+=d.unEm(p.style.paddingLeft)*(p.scale||1)}if(n.w+o.lwn.rw){n.rw=n.w+o.rw}n.w+=o.w;if(p.style.paddingRight){n.w+=d.unEm(p.style.paddingRight)*(p.scale||1)}if(o.width){n.width=o.width;n.minWidth=o.minWidth}if(o.tw){n.tw=o.tw}if(o.ic){n.ic=o.ic}else{delete n.ic}if(n.exactW&&!o.exactW){n.exactW=o.exactW}},HTMLemptyBBox:function(m){m.h=m.d=m.H=m.D=m.rw=-d.BIGDIMEN;m.w=0;m.lw=d.BIGDIMEN;return m},HTMLcleanBBox:function(m){if(m.h===this.BIGDIMEN){m.h=m.d=m.H=m.D=m.w=m.rw=m.lw=0}if(m.D<=m.d){delete m.D}if(m.H<=m.h){delete m.H}},HTMLzeroBBox:function(){return{h:0,d:0,w:0,lw:0,rw:0}},HTMLcanStretch:function(n){if(this.isEmbellished()){var m=this.Core();if(m&&m!==this){return m.HTMLcanStretch(n)}}return false},HTMLstretchH:function(n,m){return this.HTMLspanElement()},HTMLstretchV:function(n,m,o){return this.HTMLspanElement()},HTMLnotEmpty:function(m){while(m){if((m.type!=="mrow"&&m.type!=="texatom")||m.data.length>1){return true}m=m.data[0]}return false},HTMLmeasureChild:function(o,m){if(this.data[o]){d.Measured(this.data[o].toHTML(m),m)}else{m.bbox=this.HTMLzeroBBox()}},HTMLboxChild:function(o,m){if(!this.data[o]){this.SetData(o,i.mrow())}return this.data[o].toHTML(m)},HTMLcreateSpan:function(m){if(this.spanID){var n=this.HTMLspanElement();if(n&&(n.parentNode===m||(n.parentNode||{}).parentNode===m)){while(n.firstChild){n.removeChild(n.firstChild)}n.bbox=this.HTMLzeroBBox();n.scale=1;n.isMultChar=n.HH=null;n.style.cssText="";return n}}if(this.href){m=d.addElement(m,"a",{href:this.href,isMathJax:true})}m=d.addElement(m,"span",{className:this.type,isMathJax:true});if(d.imgHeightBug){m.style.display="inline-block"}if(this["class"]){m.className+=" "+this["class"]}if(!this.spanID){this.spanID=d.GetID()}m.id=(this.id||"MathJax-Span-"+this.spanID)+d.idPostfix;m.bbox=this.HTMLzeroBBox();this.styles={};if(this.style){m.style.cssText=this.style;if(m.style.fontSize){this.mathsize=m.style.fontSize;m.style.fontSize=""}this.styles={border:d.getBorders(m),padding:d.getPadding(m)};if(this.styles.border){m.style.border=""}if(this.styles.padding){m.style.padding=""}}if(this.href){m.parentNode.bbox=m.bbox}this.HTMLaddAttributes(m);return m},HTMLaddAttributes:function(p){if(this.attrNames){var u=this.attrNames,q=i.nocopyAttributes,t=b.config.ignoreMMLattributes;var r=(this.type==="mstyle"?i.math.prototype.defaults:this.defaults);for(var o=0,n=u.length;o0){q+=2*B;w-=B}if(z>0){z+=2*B;m-=B}u=-q-w;if(v){u-=v.right;m-=v.bottom;t+=v.left;r+=v.right;C.h+=v.top;C.d+=v.bottom;C.w+=v.left+v.right;C.lw-=v.left;C.rw+=v.right}if(x){z+=x.top+x.bottom;q+=x.left+x.right;u-=x.right;m-=x.bottom;t+=x.left;r+=x.right;C.h+=x.top;C.d+=x.bottom;C.w+=x.left+x.right;C.lw-=x.left;C.rw+=x.right}if(r){y.style.paddingRight=d.Em(r)}var p=d.Element("span",{id:"MathJax-Color-"+this.spanID+d.idPostfix,isMathJax:true,style:{display:"inline-block",backgroundColor:A.mathbackground,width:d.Em(q),height:d.Em(z),verticalAlign:d.Em(m),marginLeft:d.Em(w),marginRight:d.Em(u)}});d.setBorders(p,v);if(C.width){p.style.width=C.width;p.style.marginRight="-"+C.width}if(d.msieInlineBlockAlignBug){p.style.position="relative";p.style.width=p.style.height=0;p.style.verticalAlign=p.style.marginLeft=p.style.marginRight="";p.style.border=p.style.padding="";if(v&&d.msieBorderWidthBug){z+=v.top+v.bottom;q+=v.left+v.right}p.style.width=d.Em(t+B);d.placeBox(d.addElement(p,"span",{noAdjust:true,isMathJax:true,style:{display:"inline-block",position:"absolute",overflow:"hidden",background:(A.mathbackground||"transparent"),width:d.Em(q),height:d.Em(z)}}),w,C.h+B);d.setBorders(p.firstChild,v)}y.parentNode.insertBefore(p,y);if(d.msieColorPositionBug){y.style.position="relative"}return p}return null},HTMLremoveColor:function(){var m=document.getElementById("MathJax-Color-"+this.spanID+d.idPostfix);if(m){m.parentNode.removeChild(m)}},HTMLhandleSpace:function(q){if(this.useMMLspacing){if(this.type!=="mo"){return}var o=this.getValues("scriptlevel","lspace","rspace");if(o.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){var n=this.HTMLgetMu(q);o.lspace=Math.max(0,d.length2em(o.lspace,n));o.rspace=Math.max(0,d.length2em(o.rspace,n));var m=this,p=this.Parent();while(p&&p.isEmbellished()&&p.Core()===m){m=p;p=p.Parent();q=m.HTMLspanElement()}if(o.lspace){q.style.paddingLeft=d.Em(o.lspace)}if(o.rspace){q.style.paddingRight=d.Em(o.rspace)}}}else{var r=this.texSpacing();if(r!==""){this.HTMLgetScale();r=d.length2em(r,this.scale)/(q.scale||1)*this.mscale;if(q.style.paddingLeft){r+=d.unEm(q.style.paddingLeft)}q.style.paddingLeft=d.Em(r)}}},HTMLgetScale:function(){if(this.scale){return this.scale*this.mscale}var o=1,m=this.getValues("scriptlevel","fontsize");m.mathsize=(this.isToken?this:this.Parent()).Get("mathsize");if(this.style){var n=this.HTMLspanElement();if(n.style.fontSize!=""){m.fontsize=n.style.fontSize}}if(m.fontsize&&!this.mathsize){m.mathsize=m.fontsize}if(m.scriptlevel!==0){if(m.scriptlevel>2){m.scriptlevel=2}o=Math.pow(this.Get("scriptsizemultiplier"),m.scriptlevel);m.scriptminsize=d.length2em(this.Get("scriptminsize"));if(o2){n.scriptlevel=2}m=Math.sqrt(Math.pow(n.scriptsizemultiplier,n.scriptlevel))}return m},HTMLgetVariant:function(){var m=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");m.hasVariant=this.Get("mathvariant",true);if(!m.hasVariant){m.family=m.fontfamily;m.weight=m.fontweight;m.style=m.fontstyle}if(this.style){var o=this.HTMLspanElement();if(!m.family&&o.style.fontFamily){m.family=o.style.fontFamily}if(!m.weight&&o.style.fontWeight){m.weight=o.style.fontWeight}if(!m.style&&o.style.fontStyle){m.style=o.style.fontStyle}}if(m.weight&&m.weight.match(/^\d+$/)){m.weight=(parseInt(m.weight)>600?"bold":"normal")}var n=m.mathvariant;if(this.variantForm){n="-"+d.fontInUse+"-variant"}if(m.family&&!m.hasVariant){if(!m.weight&&m.mathvariant.match(/bold/)){m.weight="bold"}if(!m.style&&m.mathvariant.match(/italic/)){m.style="italic"}return{FONTS:[],fonts:[],noRemap:true,defaultFont:{family:m.family,style:m.style,weight:m.weight}}}if(m.weight==="bold"){n={normal:i.VARIANT.BOLD,italic:i.VARIANT.BOLDITALIC,fraktur:i.VARIANT.BOLDFRAKTUR,script:i.VARIANT.BOLDSCRIPT,"sans-serif":i.VARIANT.BOLDSANSSERIF,"sans-serif-italic":i.VARIANT.SANSSERIFBOLDITALIC}[n]||n}else{if(m.weight==="normal"){n={bold:i.VARIANT.normal,"bold-italic":i.VARIANT.ITALIC,"bold-fraktur":i.VARIANT.FRAKTUR,"bold-script":i.VARIANT.SCRIPT,"bold-sans-serif":i.VARIANT.SANSSERIF,"sans-serif-bold-italic":i.VARIANT.SANSSERIFITALIC}[n]||n}}if(m.style==="italic"){n={normal:i.VARIANT.ITALIC,bold:i.VARIANT.BOLDITALIC,"sans-serif":i.VARIANT.SANSSERIFITALIC,"bold-sans-serif":i.VARIANT.SANSSERIFBOLDITALIC}[n]||n}else{if(m.style==="normal"){n={italic:i.VARIANT.NORMAL,"bold-italic":i.VARIANT.BOLD,"sans-serif-italic":i.VARIANT.SANSSERIF,"sans-serif-bold-italic":i.VARIANT.BOLDSANSSERIF}[n]||n}}if(!(n in d.FONTDATA.VARIANT)){n="normal"}return d.FONTDATA.VARIANT[n]},HTMLdrawBBox:function(m){var o=m.bbox;var n=d.Element("span",{style:{"font-size":m.style.fontSize,display:"inline-block",opacity:0.25,"margin-left":d.Em(-o.w)}},[["span",{style:{height:d.Em(o.h),width:d.Em(o.w),"background-color":"red",display:"inline-block"}}],["span",{style:{height:d.Em(o.d),width:d.Em(o.w),"margin-left":d.Em(-o.w),"vertical-align":d.Em(-o.d),"background-color":"green",display:"inline-block"}}]]);if(m.nextSibling){m.parentNode.insertBefore(n,m.nextSibling)}else{m.parentNode.appendChild(n)}}},{HTMLautoload:function(){var m=d.autoloadDir+"/"+this.type+".js";b.RestartAfter(j.Require(m))},HTMLautoloadFile:function(m){var n=d.autoloadDir+"/"+m+".js";b.RestartAfter(j.Require(n))},HTMLstretchH:function(n,m){this.HTMLremoveColor();return this.toHTML(n,m)},HTMLstretchV:function(n,m,o){this.HTMLremoveColor();return this.toHTML(n,m,o)}});i.chars.Augment({toHTML:function(p,o,n,q){var t=this.data.join("").replace(/[\u2061-\u2064]/g,"");if(n){t=n(t,q)}if(o.fontInherit){var s=Math.floor(d.config.scale/d.scale+0.5)+"%";d.addElement(p,"span",{style:{"font-size":s}},[t]);if(o.bold){p.lastChild.style.fontWeight="bold"}if(o.italic){p.lastChild.style.fontStyle="italic"}p.bbox=null;var r=d.getHD(p),m=d.getW(p);p.bbox={h:r.h,d:r.d,w:m,lw:0,rw:m,exactW:true}}else{this.HTMLhandleVariant(p,o,t)}}});i.entity.Augment({toHTML:function(p,o,n,q){var t=this.toString().replace(/[\u2061-\u2064]/g,"");if(n){t=n(t,q)}if(o.fontInherit){var s=Math.floor(d.config.scale/d.scale+0.5)+"%";d.addElement(p,"span",{style:{"font-size":s}},[t]);if(o.bold){p.lastChild.style.fontWeight="bold"}if(o.italic){p.lastChild.style.fontStyle="italic"}delete p.bbox;var r=d.getHD(p),m=d.getW(p);p.bbox={h:r.h,d:r.d,w:m,lw:0,rw:m,exactW:true}}else{this.HTMLhandleVariant(p,o,t)}}});i.mi.Augment({toHTML:function(q){q=this.HTMLhandleSize(this.HTMLcreateSpan(q));q.bbox=null;var p=this.HTMLgetVariant();for(var o=0,n=this.data.length;or.w&&s.length===1&&!p.noIC){r.ic=r.rw-r.w;d.createBlank(q,r.ic/this.mscale);r.w=r.rw}this.HTMLhandleSpace(q);this.HTMLhandleColor(q);this.HTMLhandleDir(q);return q}});i.mn.Augment({HTMLremapMinus:function(m){return m.replace(/^-/,"\u2212")},toHTML:function(r){r=this.HTMLhandleSize(this.HTMLcreateSpan(r));r.bbox=null;var q=this.HTMLgetVariant();var p=this.HTMLremapMinus;for(var o=0,n=this.data.length;ox.bbox.w){x.bbox.ic=x.bbox.rw-x.bbox.w;d.createBlank(x,x.bbox.ic/this.mscale);x.bbox.w=x.bbox.rw}}this.HTMLhandleSpace(x);this.HTMLhandleColor(x);this.HTMLhandleDir(x);return x},HTMLcanStretch:function(q){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}var o=this.CoreParent();if(o&&o.isa(i.munderover)&&this.CoreText(o.data[o.base]).length===1){var p=o.data[o.over],n=o.data[o.under];if(p&&this===p.CoreMO()&&o.Get("accent")){r=d.FONTDATA.REMAPACCENT[r]||r}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=d.FONTDATA.REMAPACCENTUNDER[r]||r}}}r=d.FONTDATA.DELIMITERS[r.charCodeAt(0)];var m=(r&&r.dir===q.substr(0,1));this.forceStretch=(m&&(this.Get("minsize",true)||this.Get("maxsize",true)));return m},HTMLstretchV:function(o,p,q){this.HTMLremoveColor();var t=this.getValues("symmetric","maxsize","minsize");var r=this.HTMLspanElement(),u=this.HTMLgetMu(r),s;var n=this.HTMLgetScale(),m=d.TeX.axis_height*n;if(t.symmetric){s=2*Math.max(p-m,q+m)}else{s=p+q}t.maxsize=d.length2em(t.maxsize,u,r.bbox.h+r.bbox.d);t.minsize=d.length2em(t.minsize,u,r.bbox.h+r.bbox.d);s=Math.max(t.minsize,Math.min(t.maxsize,s));if(s!=t.minsize){s=[Math.max(s*d.TeX.delimiterfactor/1000,s-d.TeX.delimitershortfall),s]}r=this.HTMLcreateSpan(o);d.createDelimiter(r,this.data.join("").charCodeAt(0),s,n);if(t.symmetric){s=(r.bbox.h+r.bbox.d)/2+m}else{s=(r.bbox.h+r.bbox.d)*p/(p+q)}d.positionDelimiter(r,s);this.HTMLhandleSpace(r);this.HTMLhandleColor(r);return r},HTMLstretchH:function(q,m){this.HTMLremoveColor();var o=this.getValues("maxsize","minsize","mathvariant","fontweight");if((o.fontweight==="bold"||parseInt(o.fontweight)>=600)&&!this.Get("mathvariant",true)){o.mathvariant=i.VARIANT.BOLD}var p=this.HTMLspanElement(),n=this.HTMLgetMu(p),r=p.scale;o.maxsize=d.length2em(o.maxsize,n,p.bbox.w);o.minsize=d.length2em(o.minsize,n,p.bbox.w);m=Math.max(o.minsize,Math.min(o.maxsize,m));p=this.HTMLcreateSpan(q);d.createDelimiter(p,this.data.join("").charCodeAt(0),m,r,o.mathvariant);this.HTMLhandleSpace(p);this.HTMLhandleColor(p);return p}});i.mtext.Augment({toHTML:function(q){q=this.HTMLhandleSize(this.HTMLcreateSpan(q));var p=this.HTMLgetVariant();if(d.config.mtextFontInherit||this.Parent().type==="merror"){var r=this.Get("mathvariant");if(r==="monospace"){q.className+=" MJX-monospace"}else{if(r.match(/sans-serif/)){q.className+=" MJX-sans-serif"}}p={bold:p.bold,italic:p.italic,fontInherit:true}}for(var o=0,n=this.data.length;od.linebreakWidth)||this.hasNewline()},HTMLstretchH:function(o,m){this.HTMLremoveColor();var n=this.HTMLspanElement();this.data[this.core].HTMLstretchH(n,m);this.HTMLcomputeBBox(n,true);this.HTMLhandleColor(n);return n},HTMLstretchV:function(o,n,p){this.HTMLremoveColor();var m=this.HTMLspanElement();this.data[this.core].HTMLstretchV(m,n,p);this.HTMLcomputeBBox(m,true);this.HTMLhandleColor(m);return m}});i.mstyle.Augment({toHTML:function(n,m,o){n=this.HTMLcreateSpan(n);if(this.data[0]!=null){var p=this.data[0].toHTML(n);if(o!=null){this.data[0].HTMLstretchV(n,m,o)}else{if(m!=null){this.data[0].HTMLstretchH(n,m)}}n.bbox=p.bbox}this.HTMLhandleSpace(n);this.HTMLhandleColor(n);return n},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.mfrac.Augment({toHTML:function(F){F=this.HTMLcreateSpan(F);var o=d.createStack(F);var w=d.createBox(o),s=d.createBox(o);d.MeasureSpans([this.HTMLboxChild(0,w),this.HTMLboxChild(1,s)]);var m=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var K=this.HTMLgetScale(),E=m.displaystyle;var J=d.TeX.axis_height*K;if(m.bevelled){var I=(E?0.4:0.15);var x=Math.max(w.bbox.h+w.bbox.d,s.bbox.h+s.bbox.d)+2*I;var G=d.createBox(o);d.createDelimiter(G,47,x);d.placeBox(w,0,(w.bbox.d-w.bbox.h)/2+J+I);d.placeBox(G,w.bbox.w-I/2,(G.bbox.d-G.bbox.h)/2+J);d.placeBox(s,w.bbox.w+G.bbox.w-I,(s.bbox.d-s.bbox.h)/2+J-I)}else{var n=Math.max(w.bbox.w,s.bbox.w);var A=d.thickness2em(m.linethickness,this.scale)*this.mscale,C,B,z,y;var D=d.TeX.min_rule_thickness/this.em;if(E){z=d.TeX.num1;y=d.TeX.denom1}else{z=(A===0?d.TeX.num3:d.TeX.num2);y=d.TeX.denom2}z*=K;y*=K;if(A===0){C=Math.max((E?7:3)*d.TeX.rule_thickness,2*D);B=(z-w.bbox.d)-(s.bbox.h-y);if(BA){n=((v.bbox.h+v.bbox.d)-(A-C))/2}var D=d.FONTDATA.DELIMITERS[d.FONTDATA.RULECHAR];if(!D||s<(D.HW[0]||[0])[0]*u||u<0.75){d.createRule(w,0,C,s);w.bbox.h=-C}else{d.createDelimiter(w,d.FONTDATA.RULECHAR,s,u)}A=m.bbox.h+n+C;n=A*d.rfuzz;if(v.isMultiChar){n=d.rfuzz}y=this.HTMLaddRoot(B,v,y,v.bbox.h+v.bbox.d-A,u);d.placeBox(v,y,A-v.bbox.h);d.placeBox(w,y+v.bbox.w,A-w.bbox.h+n);d.placeBox(r,y+v.bbox.w,0);this.HTMLhandleSpace(z);this.HTMLhandleColor(z);return z},HTMLaddRoot:function(o,n,m,q,p){return m}});i.mroot.Augment({toHTML:i.msqrt.prototype.toHTML,HTMLaddRoot:function(u,n,s,q,m){var o=d.createBox(u);if(this.data[1]){var r=this.data[1].toHTML(o);r.style.paddingRight=r.style.paddingLeft="";d.Measured(r,o)}else{o.bbox=this.HTMLzeroBBox()}var p=this.HTMLrootHeight(n.bbox.h+n.bbox.d,m,o)-q;var t=Math.min(o.bbox.w,o.bbox.rw);s=Math.max(t,n.offset);d.placeBox(o,s-t,p);return s-n.offset},HTMLrootHeight:function(o,n,m){return 0.45*(o-0.9*n)+0.6*n+Math.max(0,m.bbox.d-0.075)}});i.mfenced.Augment({toHTML:function(q){q=this.HTMLcreateSpan(q);if(this.data.open){this.data.open.toHTML(q)}if(this.data[0]!=null){this.data[0].toHTML(q)}for(var o=1,n=this.data.length;oL){L=s[N].bbox.w}if(!O[N]&&L>o){o=L}}}if(G==null&&I!=null){o=I}else{if(o==-d.BIGDIMEN){o=L}}for(N=L=0,J=this.data.length;NL){L=z.bbox.w}}}var F=d.TeX.rule_thickness*this.mscale,H=d.FONTDATA.TeX_factor;var w,u,B,A,v,E,K,P=0;q=s[this.base]||{bbox:this.HTMLzeroBBox()};if(q.bbox.ic){P=1.3*q.bbox.ic+0.05}for(N=0,J=this.data.length;NL){M.bbox.skew+=(L-z.bbox.w-w)/2}}}else{B=d.TeX.big_op_spacing1*Q*H;A=d.TeX.big_op_spacing3*Q*H;K=Math.max(B,A-Math.max(0,z.bbox.d))}K=Math.max(K,1.5/this.em);w+=P/2;u=q.bbox.h+z.bbox.d+K;z.bbox.h+=v}else{if(N==this.under){if(C){K=3*F*Q*H;v=0}else{B=d.TeX.big_op_spacing2*Q*H;A=d.TeX.big_op_spacing4*Q*H;K=Math.max(B,A-z.bbox.h)}K=Math.max(K,1.5/this.em);w-=P/2;u=-(q.bbox.d+z.bbox.h+K);z.bbox.d+=v}}d.placeBox(z,w,u)}}this.HTMLhandleSpace(M);this.HTMLhandleColor(M);return M},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.msubsup.Augment({toHTML:function(M,K,F){M=this.HTMLcreateSpan(M);var P=this.HTMLgetScale(),J=this.HTMLgetMu(M);var y=d.createStack(M),n,w=[];var x=d.createBox(y);if(this.data[this.base]){w.push(this.data[this.base].toHTML(x));if(F!=null){this.data[this.base].HTMLstretchV(x,K,F)}else{if(K!=null){this.data[this.base].HTMLstretchH(x,K)}}}else{x.bbox=this.HTMLzeroBBox()}var N=d.TeX.x_height*P,E=d.TeX.scriptspace*P*0.75;var m,z;if(this.HTMLnotEmpty(this.data[this.sup])){m=d.createBox(y);w.push(this.data[this.sup].toHTML(m))}if(this.HTMLnotEmpty(this.data[this.sub])){z=d.createBox(y);w.push(this.data[this.sub].toHTML(z))}d.MeasureSpans(w);if(m){m.bbox.w+=E;m.bbox.rw=Math.max(m.bbox.w,m.bbox.rw)}if(z){z.bbox.w+=E;z.bbox.rw=Math.max(z.bbox.w,z.bbox.rw)}d.placeBox(x,0,0);var o=P;if(m){o=this.data[this.sup].HTMLgetScale()}else{if(z){o=this.data[this.sub].HTMLgetScale()}}var H=d.TeX.sup_drop*o,G=d.TeX.sub_drop*o;var B=x.bbox.h-H,A=x.bbox.d+G,O=0,I;if(x.bbox.ic){x.bbox.w-=x.bbox.ic;O=1.3*x.bbox.ic+0.05}if(this.data[this.base]&&K==null&&F==null&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&w[0].scale===1&&!this.data[this.base].Get("largeop")){B=A=0}}var L=this.getValues("subscriptshift","superscriptshift");L.subscriptshift=(L.subscriptshift===""?0:d.length2em(L.subscriptshift,J));L.superscriptshift=(L.superscriptshift===""?0:d.length2em(L.superscriptshift,J));if(!m){if(z){A=Math.max(A,d.TeX.sub1*P,z.bbox.h-(4/5)*N,L.subscriptshift);d.placeBox(z,x.bbox.w,-A,z.bbox)}}else{if(!z){n=this.getValues("displaystyle","texprimestyle");I=d.TeX[(n.displaystyle?"sup1":(n.texprimestyle?"sup3":"sup2"))];B=Math.max(B,I*P,m.bbox.d+(1/4)*N,L.superscriptshift);d.placeBox(m,x.bbox.w+O,B,m.bbox)}else{A=Math.max(A,d.TeX.sub2*P);var C=d.TeX.rule_thickness*P;if((B-m.bbox.d)-(z.bbox.h-A)<3*C){A=3*C-B+m.bbox.d+z.bbox.h;H=(4/5)*N-(B-m.bbox.d);if(H>0){B+=H;A-=H}}d.placeBox(m,x.bbox.w+O,Math.max(B,L.superscriptshift));d.placeBox(z,x.bbox.w,-Math.max(A,L.subscriptshift))}}this.HTMLhandleSpace(M);this.HTMLhandleColor(M);return M},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});i.mmultiscripts.Augment({toHTML:i.mbase.HTMLautoload});i.mtable.Augment({toHTML:i.mbase.HTMLautoload});i["annotation-xml"].Augment({toHTML:i.mbase.HTMLautoload});i.annotation.Augment({toHTML:function(m){return this.HTMLcreateSpan(m)}});i.math.Augment({toHTML:function(E,B,t){var u,w,x,r,m=E;if(!t||t===d.PHASE.I){var C=d.addElement(E,"nobr",{isMathJax:true});E=this.HTMLcreateSpan(C);var n=this.Get("alttext");if(n&&!E.getAttribute("aria-label")){E.setAttribute("aria-label",n)}u=d.createStack(E);w=d.createBox(u);u.style.fontSize=C.parentNode.style.fontSize;C.parentNode.style.fontSize="";if(this.data[0]!=null){i.mbase.prototype.displayAlign=b.config.displayAlign;i.mbase.prototype.displayIndent=b.config.displayIndent;if(String(b.config.displayIndent).match(/^0($|[a-z%])/i)){i.mbase.prototype.displayIndent="0"}x=this.data[0].toHTML(w);x.bbox.exactW=false}}else{E=E.firstChild.firstChild;if(this.href){E=E.firstChild}u=E.firstChild;if(u.style.position!=="relative"){u=u.nextSibling}w=u.firstChild;x=w.firstChild}r=((!t||t===d.PHASE.II)?d.Measured(x,w):x);if(!t||t===d.PHASE.III){d.placeBox(w,0,0);var q=r.bbox.w;q=Math.abs(q)<0.006?0:Math.max(0,Math.round(q*this.em)+0.25);E.style.width=d.EmRounded(q/d.outerEm);E.style.display="inline-block";var A=1/d.em,G=d.em/d.outerEm;d.em/=G;E.bbox.h*=G;E.bbox.d*=G;E.bbox.w*=G;E.bbox.lw*=G;E.bbox.rw*=G;if(E.bbox.H){E.bbox.H*=G}if(E.bbox.D){E.bbox.D*=G}if(r&&r.bbox.width!=null){E.style.minWidth=(r.bbox.minWidth||E.style.width);E.style.width=r.bbox.width;w.style.width=u.style.width="100%";m.className+=" MathJax_FullWidth"}var D=this.HTMLhandleColor(E);if(r){d.createRule(E,(r.bbox.h+A)*G,(r.bbox.d+A)*G,0)}if(!this.isMultiline&&this.Get("display")==="block"&&E.bbox.width==null){var o=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(o.indentalignfirst!==i.INDENTALIGN.INDENTALIGN){o.indentalign=o.indentalignfirst}if(o.indentalign===i.INDENTALIGN.AUTO){o.indentalign=this.displayAlign}if(o.indentshiftfirst!==i.INDENTSHIFT.INDENTSHIFT){o.indentshift=o.indentshiftfirst}if(o.indentshift==="auto"){o.indentshift="0"}var F=d.length2em(o.indentshift,1,d.scale*d.cwidth);if(this.displayIndent!=="0"){var y=d.length2em(this.displayIndent,1,d.scale*d.cwidth);F+=(o.indentalign===i.INDENTALIGN.RIGHT?-y:y)}m.style.textAlign=B.style.textAlign=o.indentalign;if(F){b.Insert(E.style,({left:{marginLeft:d.Em(F)},right:{marginRight:d.Em(-F)},center:{marginLeft:d.Em(F),marginRight:d.Em(-F)}})[o.indentalign]);if(D){var v=parseFloat(D.style.marginLeft||"0")+F,s=parseFloat(D.style.marginRight||"0")-F;D.style.marginLeft=d.Em(v);D.style.marginRight=d.Em(s+(o.indentalign==="right"?E.bbox.w+F-E.bbox.w:0));if(d.msieColorBug&&o.indentalign==="right"){if(parseFloat(D.style.marginLeft)>0){var z=MathJax.HTML.addElement(D.parentNode,"span");z.style.marginLeft=d.Em(s+Math.min(0,E.bbox.w+F));D.nextSibling.style.marginRight="0em"}D.nextSibling.style.marginLeft="0em";D.style.marginRight=D.style.marginLeft="0em"}}}}}return E},HTMLspanElement:i.mbase.prototype.HTMLspanElement});i.TeXAtom.Augment({toHTML:function(q,o,s){q=this.HTMLcreateSpan(q);if(this.data[0]!=null){if(this.texClass===i.TEXCLASS.VCENTER){var m=d.createStack(q);var r=d.createBox(m);var t=this.data[0].toHTML(r);if(s!=null){d.Remeasured(this.data[0].HTMLstretchV(r,o,s),r)}else{if(o!=null){d.Remeasured(this.data[0].HTMLstretchH(r,o),r)}else{d.Measured(t,r)}}var n=d.TeX.axis_height*this.HTMLgetScale();d.placeBox(r,0,n-(r.bbox.h+r.bbox.d)/2+r.bbox.d)}else{var p=this.data[0].toHTML(q,o,s);if(s!=null){p=this.data[0].HTMLstretchV(r,o,s)}else{if(o!=null){p=this.data[0].HTMLstretchH(r,o)}}q.bbox=p.bbox}}this.HTMLhandleSpace(q);this.HTMLhandleColor(q);return q},HTMLstretchH:i.mbase.HTMLstretchH,HTMLstretchV:i.mbase.HTMLstretchV});b.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",d,"jax.js"]),0)})});b.Register.StartupHook("End Config",function(){b.Browser.Select({MSIE:function(m){var q=(document.documentMode||0);var p=m.versionAtLeast("7.0");var o=m.versionAtLeast("8.0")&&q>7;var n=(document.compatMode==="BackCompat");if(q<9){d.config.styles[".MathJax .MathJax_HitBox"]["background-color"]="white";d.config.styles[".MathJax .MathJax_HitBox"].opacity=0;d.config.styles[".MathJax .MathJax_HitBox"].filter="alpha(opacity=0)"}d.Augment({PaddingWidthBug:true,msieAccentBug:true,msieColorBug:(q<8),msieColorPositionBug:true,msieRelativeWidthBug:n,msieDisappearingBug:(q>=8),msieMarginScaleBug:(q<8),msiePaddingWidthBug:true,msieBorderWidthBug:n,msieFrameSizeBug:(q<=8),msieInlineBlockAlignBug:(!o||n),msiePlaceBoxBug:(o&&!n),msieClipRectBug:!o,msieNegativeSpaceBug:n,msieRuleBug:(q<7),cloneNodeBug:(o&&m.version==="8.0"),msieItalicWidthBug:true,initialSkipBug:(q<8),msieNegativeBBoxBug:(q>=8),msieIE6:!p,msieItalicWidthBug:true,FontFaceBug:(q<9),msieFontCSSBug:m.isIE9,allowWebFonts:(q>=9?"woff":"eot")})},Firefox:function(n){var o=false;if(n.versionAtLeast("3.5")){var m=String(document.location).replace(/[^\/]*$/,"");if(document.location.protocol!=="file:"||b.config.root.match(/^https?:\/\//)||(b.config.root+"/").substr(0,m.length)===m){o="otf"}}d.Augment({ffVerticalAlignBug:!n.versionAtLeast("20.0"),AccentBug:true,allowWebFonts:o,ffFontOptimizationBug:true})},Safari:function(r){var p=r.versionAtLeast("3.0");var o=r.versionAtLeast("3.1");var m=navigator.appVersion.match(/ Safari\/\d/)&&navigator.appVersion.match(/ Version\/\d/)&&navigator.vendor.match(/Apple/);var n=(navigator.appVersion.match(/ Android (\d+)\.(\d+)/));var s=(o&&r.isMobile&&((navigator.platform.match(/iPad|iPod|iPhone/)&&!r.versionAtLeast("5.0"))||(n!=null&&(n[1]<2||(n[1]==2&&n[2]<2)))));d.Augment({config:{styles:{".MathJax img, .MathJax nobr, .MathJax a":{"max-width":"5000em","max-height":"5000em"}}},Em:((r.webkit||0)>=538?d.EmRounded:d.Em),rfuzz:0.011,AccentBug:true,AdjustSurd:true,negativeBBoxes:true,safariNegativeSpaceBug:true,safariVerticalAlignBug:!o,safariTextNodeBug:!p,forceReflow:true,FontFaceBug:true,allowWebFonts:(o&&!s?"otf":false)});if(m){d.Augment({webFontDefault:(r.isMobile?"sans-serif":"serif")})}if(r.isPC){d.Augment({adjustAvailableFonts:d.removeSTIXfonts,checkWebFontsTwice:true})}if(s){var q=b.config["HTML-CSS"];if(q){q.availableFonts=[];q.preferredFont=null}else{b.config["HTML-CSS"]={availableFonts:[],preferredFont:null}}}},Chrome:function(m){d.Augment({Em:d.EmRounded,cloneNodeBug:true,rfuzz:-0.02,AccentBug:true,AdjustSurd:true,FontFaceBug:m.versionAtLeast("32.0"),negativeBBoxes:true,safariNegativeSpaceBug:true,safariWebFontSerif:[""],forceReflow:true,allowWebFonts:(m.versionAtLeast("4.0")?"otf":"svg")})},Opera:function(m){m.isMini=(navigator.appVersion.match("Opera Mini")!=null);d.config.styles[".MathJax .merror"]["vertical-align"]=null;d.config.styles[".MathJax span"]["z-index"]=0;d.Augment({operaHeightBug:true,operaVerticalAlignBug:true,operaFontSizeBug:m.versionAtLeast("10.61"),initialSkipBug:true,FontFaceBug:true,PaddingWidthBug:true,allowWebFonts:(m.versionAtLeast("10.0")&&!m.isMini?"otf":false),adjustAvailableFonts:d.removeSTIXfonts})},Konqueror:function(m){d.Augment({konquerorVerticalAlignBug:true})}})});MathJax.Hub.Register.StartupHook("End Cookie",function(){if(b.config.menuSettings.zoom!=="None"){j.Require("[MathJax]/extensions/MathZoom.js")}})})(MathJax.Ajax,MathJax.Hub,MathJax.OutputJax["HTML-CSS"]); diff --git a/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/config.js b/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/config.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/config.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/PreviewHTML/config.js + * + * Copyright (c) 2009-2016 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.OutputJax.PreviewHTML=MathJax.OutputJax({id:"PreviewHTML",version:"2.7.0",directory:MathJax.OutputJax.directory+"/PreviewHTML",extensionDir:MathJax.OutputJax.extensionDir+"/PreviewHTML",noFastPreview:true,config:{scale:100,minScaleAdjust:50,mtextFontInherit:false,linebreaks:{automatic:false,width:"container"}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.PreviewHTML.Register("jax/mml")}MathJax.OutputJax.PreviewHTML.loadComplete("config.js"); diff --git a/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/jax.js b/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/jax.js new file mode 100755 --- /dev/null +++ b/rhodecode/public/js/src/math_jax/jax/output/PreviewHTML/jax.js @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/output/PreviewHTML/jax.js + * + * Copyright (c) 2009-2016 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. + */ + +(function(i,b,e,g){var h;var j,a,d;var f="'Times New Roman',Times,STIXGeneral,serif";var m={".MJXp-script":{"font-size":".8em"},".MJXp-right":{"-webkit-transform-origin":"right","-moz-transform-origin":"right","-ms-transform-origin":"right","-o-transform-origin":"right","transform-origin":"right"},".MJXp-bold":{"font-weight":"bold"},".MJXp-italic":{"font-style":"italic"},".MJXp-scr":{"font-family":"MathJax_Script,"+f},".MJXp-frak":{"font-family":"MathJax_Fraktur,"+f},".MJXp-sf":{"font-family":"MathJax_SansSerif,"+f},".MJXp-cal":{"font-family":"MathJax_Caligraphic,"+f},".MJXp-mono":{"font-family":"MathJax_Typewriter,"+f},".MJXp-largeop":{"font-size":"150%"},".MJXp-largeop.MJXp-int":{"vertical-align":"-.2em"},".MJXp-math":{display:"inline-block","line-height":"1.2","text-indent":"0","font-family":f,"white-space":"nowrap","border-collapse":"collapse"},".MJXp-display":{display:"block","text-align":"center",margin:"1em 0"},".MJXp-math span":{display:"inline-block"},".MJXp-box":{display:"block!important","text-align":"center"},".MJXp-box:after":{content:'" "'},".MJXp-rule":{display:"block!important","margin-top":".1em"},".MJXp-char":{display:"block!important"},".MJXp-mo":{margin:"0 .15em"},".MJXp-mfrac":{margin:"0 .125em","vertical-align":".25em"},".MJXp-denom":{display:"inline-table!important",width:"100%"},".MJXp-denom > *":{display:"table-row!important"},".MJXp-surd":{"vertical-align":"top"},".MJXp-surd > *":{display:"block!important"},".MJXp-script-box > * ":{display:"table!important",height:"50%"},".MJXp-script-box > * > *":{display:"table-cell!important","vertical-align":"top"},".MJXp-script-box > *:last-child > *":{"vertical-align":"bottom"},".MJXp-script-box > * > * > *":{display:"block!important"},".MJXp-mphantom":{visibility:"hidden"},".MJXp-munderover":{display:"inline-table!important"},".MJXp-over":{display:"inline-block!important","text-align":"center"},".MJXp-over > *":{display:"block!important"},".MJXp-munderover > *":{display:"table-row!important"},".MJXp-mtable":{"vertical-align":".25em",margin:"0 .125em"},".MJXp-mtable > *":{display:"inline-table!important","vertical-align":"middle"},".MJXp-mtr":{display:"table-row!important"},".MJXp-mtd":{display:"table-cell!important","text-align":"center",padding:".5em 0 0 .5em"},".MJXp-mtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-mlabeledtr":{display:"table-row!important"},".MJXp-mlabeledtr > .MJXp-mtd:first-child":{"padding-left":0},".MJXp-mlabeledtr:first-child > .MJXp-mtd":{"padding-top":0},".MJXp-merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"}};(function(){for(var n=0;n<10;n++){var o="scaleX(."+n+")";m[".MJXp-scale"+n]={"-webkit-transform":o,"-moz-transform":o,"-ms-transform":o,"-o-transform":o,transform:o}}})();var k=1000000;var c="V",l="H";g.Augment({settings:b.config.menuSettings,config:{styles:m},hideProcessedMath:false,maxStretchyParts:1000,Config:function(){if(!this.require){this.require=[]}this.SUPER(arguments).Config.call(this);var n=this.settings;if(n.scale){this.config.scale=n.scale}this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){j=MathJax.Extension.MathEvents.Event;a=MathJax.Extension.MathEvents.Touch;d=MathJax.Extension.MathEvents.Hover;this.ContextMenu=j.ContextMenu;this.Mousedown=j.AltContextMenu;this.Mouseover=d.Mouseover;this.Mouseout=d.Mouseout;this.Mousemove=d.Mousemove;var n=e.addElement(document.body,"div",{style:{width:"5in"}});this.pxPerInch=n.offsetWidth/5;n.parentNode.removeChild(n);return i.Styles(this.config.styles,["InitializePHTML",this])},InitializePHTML:function(){},preTranslate:function(p){var s=p.jax[this.id],t,q=s.length,u,r,v,o,n;for(t=0;tthis.PHTML.h){this.PHTML.h=q.PHTML.h}if(q.PHTML.d>this.PHTML.d){this.PHTML.d=q.PHTML.d}if(q.PHTML.t>this.PHTML.t){this.PHTML.t=q.PHTML.t}if(q.PHTML.b>this.PHTML.b){this.PHTML.b=q.PHTML.b}}}else{if(n.forceChild){e.addElement(p,"span")}}},PHTMLstretchChild:function(q,p,s){var r=this.data[q];if(r&&r.PHTMLcanStretch("Vertical",p,s)){var t=this.PHTML,o=r.PHTML,n=o.w;r.PHTMLstretchV(p,s);t.w+=o.w-n;if(o.h>t.h){t.h=o.h}if(o.d>t.d){t.d=o.d}}},PHTMLcreateSpan:function(n){if(!this.PHTML){this.PHTML={}}this.PHTML={w:0,h:0,d:0,l:0,r:0,t:0,b:0};if(this.inferred){return n}if(this.type==="mo"&&this.data.join("")==="\u222B"){g.lastIsInt=true}else{if(this.type!=="mspace"||this.width!=="negativethinmathspace"){g.lastIsInt=false}}if(!this.PHTMLspanID){this.PHTMLspanID=g.GetID()}var o=(this.id||"MJXp-Span-"+this.PHTMLspanID);return e.addElement(n,"span",{className:"MJXp-"+this.type,id:o})},PHTMLspanElement:function(){if(!this.PHTMLspanID){return null}return document.getElementById(this.id||"MJXp-Span-"+this.PHTMLspanID)},PHTMLhandleToken:function(o){var n=this.getValues("mathvariant");if(n.mathvariant!==h.VARIANT.NORMAL){o.className+=" "+g.VARIANT[n.mathvariant]}},PHTMLhandleStyle:function(n){if(this.style){n.style.cssText=this.style}},PHTMLhandleColor:function(n){if(this.mathcolor){n.style.color=this.mathcolor}if(this.mathbackground){n.style.backgroundColor=this.mathbackground}},PHTMLhandleScriptlevel:function(n){var o=this.Get("scriptlevel");if(o){n.className+=" MJXp-script"}},PHTMLhandleText:function(y,A){var v,p;var z=0,o=0,q=0;for(var s=0,r=A.length;s=55296&&p<56319){s++;p=(((p-55296)<<10)+(A.charCodeAt(s)-56320))+65536}var t=0.7,u=0.22,x=0.5;if(p<127){if(v.match(/[A-Za-ehik-or-xz0-9]/)){u=0}if(v.match(/[A-HK-Z]/)){x=0.67}else{if(v.match(/[IJ]/)){x=0.36}}if(v.match(/[acegm-su-z]/)){t=0.45}else{if(v.match(/[ij]/)){t=0.75}}if(v.match(/[ijlt]/)){x=0.28}}if(g.DELIMITERS[v]){x=g.DELIMITERS[v].w||0.4}if(t>z){z=t}if(u>o){o=u}q+=x}if(!this.CHML){this.PHTML={}}this.PHTML={h:0.9,d:0.3,w:q,l:0,r:0,t:z,b:o};e.addText(y,A)},PHTMLbboxFor:function(o){if(this.data[o]&&this.data[o].PHTML){return this.data[o].PHTML}return{w:0,h:0,d:0,l:0,r:0,t:0,b:0}},PHTMLcanStretch:function(q,o,p){if(this.isEmbellished()){var n=this.Core();if(n&&n!==this){return n.PHTMLcanStretch(q,o,p)}}return false},PHTMLstretchV:function(n,o){},PHTMLstretchH:function(n){},CoreParent:function(){var n=this;while(n&&n.isEmbellished()&&n.CoreMO()===this&&!n.isa(h.math)){n=n.Parent()}return n},CoreText:function(n){if(!n){return""}if(n.isEmbellished()){return n.CoreMO().data.join("")}while((n.isa(h.mrow)||n.isa(h.TeXAtom)||n.isa(h.mstyle)||n.isa(h.mphantom))&&n.data.length===1&&n.data[0]){n=n.data[0]}if(!n.isToken){return""}else{return n.data.join("")}}});h.chars.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.entity.Augment({toPreviewHTML:function(n){var o=this.toString().replace(/[\u2061-\u2064]/g,"");this.PHTMLhandleText(n,o)}});h.math.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n);if(this.Get("display")==="block"){n.className+=" MJXp-display"}return n}});h.mo.Augment({toPreviewHTML:function(o){o=this.PHTMLdefaultSpan(o);this.PHTMLadjustAccent(o);var n=this.getValues("lspace","rspace","scriptlevel","displaystyle","largeop");if(n.scriptlevel===0){this.PHTML.l=g.length2em(n.lspace);this.PHTML.r=g.length2em(n.rspace);o.style.marginLeft=g.Em(this.PHTML.l);o.style.marginRight=g.Em(this.PHTML.r)}else{this.PHTML.l=0.15;this.PHTML.r=0.1}if(n.displaystyle&&n.largeop){var p=e.Element("span",{className:"MJXp-largeop"});p.appendChild(o.firstChild);o.appendChild(p);this.PHTML.h*=1.2;this.PHTML.d*=1.2;if(this.data.join("")==="\u222B"){p.className+=" MJXp-int"}}return o},PHTMLadjustAccent:function(p){var o=this.CoreParent();if(o&&o.isa(h.munderover)&&this.CoreText(o.data[o.base]).length===1){var q=o.data[o.over],n=o.data[o.under];var s=this.data.join(""),r;if(q&&this===q.CoreMO()&&o.Get("accent")){r=g.REMAPACCENT[s]}else{if(n&&this===n.CoreMO()&&o.Get("accentunder")){r=g.REMAPACCENTUNDER[s]}}if(r){s=p.innerHTML=r}if(s.match(/[\u02C6-\u02DC\u00A8]/)){this.PHTML.acc=-0.52}else{if(s==="\u2192"){this.PHTML.acc=-0.15;this.PHTML.vec=true}}}},PHTMLcanStretch:function(q,o,p){if(!this.Get("stretchy")){return false}var r=this.data.join("");if(r.length>1){return false}r=g.DELIMITERS[r];var n=(r&&r.dir===q.substr(0,1));if(n){n=(this.PHTML.h!==o||this.PHTML.d!==p||(this.Get("minsize",true)||this.Get("maxsize",true)))}return n},PHTMLstretchV:function(p,u){var o=this.PHTMLspanElement(),t=this.PHTML;var n=this.getValues("symmetric","maxsize","minsize");if(n.symmetric){l=2*Math.max(p-0.25,u+0.25)}else{l=p+u}n.maxsize=g.length2em(n.maxsize,t.h+t.d);n.minsize=g.length2em(n.minsize,t.h+t.d);l=Math.max(n.minsize,Math.min(n.maxsize,l));var s=l/(t.h+t.d-0.3);var q=e.Element("span",{style:{"font-size":g.Em(s)}});if(s>1.25){var r=Math.ceil(1.25/s*10);q.className="MJXp-right MJXp-scale"+r;q.style.marginLeft=g.Em(t.w*(r/10-1)+0.07);t.w*=s*r/10}q.appendChild(o.firstChild);o.appendChild(q);if(n.symmetric){o.style.verticalAlign=g.Em(0.25*(1-s))}}});h.mspace.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q);var o=this.getValues("height","depth","width");var n=g.length2em(o.width),p=g.length2em(o.height),s=g.length2em(o.depth);var r=this.PHTML;r.w=n;r.h=p;r.d=s;if(n<0){if(!g.lastIsInt){q.style.marginLeft=g.Em(n)}n=0}q.style.width=g.Em(n);q.style.height=g.Em(p+s);if(s){q.style.verticalAlign=g.Em(-s)}return q}});h.mpadded.Augment({toPreviewHTML:function(u){u=this.PHTMLdefaultSpan(u,{childSpans:true,className:"MJXp-box",forceChild:true});var o=u.firstChild;var v=this.getValues("width","height","depth","lspace","voffset");var s=this.PHTMLdimen(v.lspace);var q=0,n=0,t=s.len,r=-s.len,p=0;if(v.width!==""){s=this.PHTMLdimen(v.width,"w",0);if(s.pm){r+=s.len}else{u.style.width=g.Em(s.len)}}if(v.height!==""){s=this.PHTMLdimen(v.height,"h",0);if(!s.pm){q+=-this.PHTMLbboxFor(0).h}q+=s.len}if(v.depth!==""){s=this.PHTMLdimen(v.depth,"d",0);if(!s.pm){n+=-this.PHTMLbboxFor(0).d;p+=-s.len}n+=s.len}if(v.voffset!==""){s=this.PHTMLdimen(v.voffset);q-=s.len;n+=s.len;p+=s.len}if(q){o.style.marginTop=g.Em(q)}if(n){o.style.marginBottom=g.Em(n)}if(t){o.style.marginLeft=g.Em(t)}if(r){o.style.marginRight=g.Em(r)}if(p){u.style.verticalAlign=g.Em(p)}return u},PHTMLdimen:function(q,r,n){if(n==null){n=-k}q=String(q);var o=q.match(/width|height|depth/);var p=(o?this.PHTML[o[0].charAt(0)]:(r?this.PHTML[r]:0));return{len:g.length2em(q,p)||0,pm:!!q.match(/^[-+]/)}}});h.munderover.Augment({toPreviewHTML:function(r){var t=this.getValues("displaystyle","accent","accentunder","align");var n=this.data[this.base];if(!t.displaystyle&&n!=null&&(n.movablelimits||n.CoreMO().Get("movablelimits"))){r=h.msubsup.prototype.toPreviewHTML.call(this,r);r.className=r.className.replace(/munderover/,"msubsup");return r}r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"",noBBox:true});var p=this.PHTMLbboxFor(this.over),v=this.PHTMLbboxFor(this.under),u=this.PHTMLbboxFor(this.base),s=this.PHTML,o=p.acc;if(this.data[this.over]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=p.l=r.lastChild.firstChild.style.marginRight=p.r=0}var q=e.Element("span",{},[["span",{className:"MJXp-over"}]]);q.firstChild.appendChild(r.lastChild);if(r.childNodes.length>(this.data[this.under]?1:0)){q.firstChild.appendChild(r.firstChild)}this.data[this.over].PHTMLhandleScriptlevel(q.firstChild.firstChild);if(o!=null){if(p.vec){q.firstChild.firstChild.firstChild.style.fontSize="60%";p.h*=0.6;p.d*=0.6;p.w*=0.6}o=o-p.d+0.1;if(u.t!=null){o+=u.t-u.h}q.firstChild.firstChild.style.marginBottom=g.Em(o)}if(r.firstChild){r.insertBefore(q,r.firstChild)}else{r.appendChild(q)}}if(this.data[this.under]){if(r.lastChild.firstChild){r.lastChild.firstChild.style.marginLeft=v.l=r.lastChild.firstChild.marginRight=v.r=0}this.data[this.under].PHTMLhandleScriptlevel(r.lastChild)}s.w=Math.max(0.8*p.w,0.8*v.w,u.w);s.h=0.8*(p.h+p.d+(o||0))+u.h;s.d=u.d+0.8*(v.h+v.d);return r}});h.msubsup.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{noBBox:true});if(!this.data[this.base]){if(q.firstChild){q.insertBefore(e.Element("span"),q.firstChild)}else{q.appendChild(e.Element("span"))}}var s=this.data[this.base],p=this.data[this.sub],n=this.data[this.sup];if(!s){s={bbox:{h:0.8,d:0.2}}}q.firstChild.style.marginRight=".05em";var o=Math.max(0.4,s.PHTML.h-0.4),u=Math.max(0.2,s.PHTML.d+0.1);var t=this.PHTML;if(n&&p){var r=e.Element("span",{className:"MJXp-script-box",style:{height:g.Em(o+n.PHTML.h*0.8+u+p.PHTML.d*0.8),"vertical-align":g.Em(-u-p.PHTML.d*0.8)}},[["span",{},[["span",{},[["span",{style:{"margin-bottom":g.Em(-(n.PHTML.d-0.05))}}]]]]],["span",{},[["span",{},[["span",{style:{"margin-top":g.Em(-(n.PHTML.h-0.05))}}]]]]]]);p.PHTMLhandleScriptlevel(r.firstChild);n.PHTMLhandleScriptlevel(r.lastChild);r.firstChild.firstChild.firstChild.appendChild(q.lastChild);r.lastChild.firstChild.firstChild.appendChild(q.lastChild);q.appendChild(r);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+Math.max(n.PHTML.w,p.PHTML.w)+0.07}else{if(n){q.lastChild.style.verticalAlign=g.Em(o);n.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,n.PHTML.h*0.8+o);t.d=Math.max(s.PHTML.d,n.PHTML.d*0.8-o);t.w=s.PHTML.w+n.PHTML.w+0.07}else{if(p){q.lastChild.style.verticalAlign=g.Em(-u);p.PHTMLhandleScriptlevel(q.lastChild);t.h=Math.max(s.PHTML.h,p.PHTML.h*0.8-u);t.d=Math.max(s.PHTML.d,p.PHTML.d*0.8+u);t.w=s.PHTML.w+p.PHTML.w+0.07}}}return q}});h.mfrac.Augment({toPreviewHTML:function(r){r=this.PHTMLdefaultSpan(r,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var o=this.getValues("linethickness","displaystyle");if(!o.displaystyle){if(this.data[0]){this.data[0].PHTMLhandleScriptlevel(r.firstChild)}if(this.data[1]){this.data[1].PHTMLhandleScriptlevel(r.lastChild)}}var n=e.Element("span",{className:"MJXp-box"},[["span",{className:"MJXp-denom"},[["span",{},[["span",{className:"MJXp-rule",style:{height:"1em"}}]]],["span"]]]]);n.firstChild.lastChild.appendChild(r.lastChild);r.appendChild(n);var s=this.PHTMLbboxFor(0),p=this.PHTMLbboxFor(1),v=this.PHTML;v.w=Math.max(s.w,p.w)*0.8;v.h=s.h+s.d+0.1+0.25;v.d=p.h+p.d-0.25;v.l=v.r=0.125;o.linethickness=Math.max(0,g.length2em(o.linethickness||"0",0));if(o.linethickness){var u=n.firstChild.firstChild.firstChild;var q=g.Em(o.linethickness);u.style.borderTop="none";u.style.borderBottom=(o.linethickness<0.15?"1px":q)+" solid";u.style.margin=q+" 0";q=o.linethickness;n.style.marginTop=g.Em(3*q-1.2);r.style.verticalAlign=g.Em(1.5*q+0.1);v.h+=1.5*q-0.1;v.d+=1.5*q}else{n.style.marginTop="-.7em"}return r}});h.msqrt.Augment({toPreviewHTML:function(n){n=this.PHTMLdefaultSpan(n,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});this.PHTMLlayoutRoot(n,n.firstChild);return n},PHTMLlayoutRoot:function(u,n){var v=this.PHTMLbboxFor(0);var q=Math.ceil((v.h+v.d+0.14)*100),w=g.Em(14/q);var r=e.Element("span",{className:"MJXp-surd"},[["span",{style:{"font-size":q+"%","margin-top":w}},["\u221A"]]]);var s=e.Element("span",{className:"MJXp-root"},[["span",{className:"MJXp-rule",style:{"border-top":".08em solid"}}]]);var p=(1.2/2.2)*q/100;if(q>150){var o=Math.ceil(150/q*10);r.firstChild.className="MJXp-right MJXp-scale"+o;r.firstChild.style.marginLeft=g.Em(p*(o/10-1)/q*100);p=p*o/10;s.firstChild.style.borderTopWidth=g.Em(0.08/Math.sqrt(o/10))}s.appendChild(n);u.appendChild(r);u.appendChild(s);this.PHTML.h=v.h+0.18;this.PHTML.d=v.d;this.PHTML.w=v.w+p;return u}});h.mroot.Augment({toPreviewHTML:function(q){q=this.PHTMLdefaultSpan(q,{childSpans:true,className:"MJXp-box",forceChild:true,noBBox:true});var p=this.PHTMLbboxFor(1),n=q.removeChild(q.lastChild);var t=this.PHTMLlayoutRoot(e.Element("span"),q.firstChild);n.className="MJXp-script";var u=parseInt(t.firstChild.firstChild.style.fontSize);var o=0.55*(u/120)+p.d*0.8,s=-0.6*(u/120);if(u>150){s*=0.95*Math.ceil(150/u*10)/10}n.style.marginRight=g.Em(s);n.style.verticalAlign=g.Em(o);if(-s>p.w*0.8){n.style.marginLeft=g.Em(-s-p.w*0.8)}q.appendChild(n);q.appendChild(t);this.PHTML.w+=Math.max(0,p.w*0.8+s);this.PHTML.h=Math.max(this.PHTML.h,p.h*0.8+o);return q},PHTMLlayoutRoot:h.msqrt.prototype.PHTMLlayoutRoot});h.mfenced.Augment({toPreviewHTML:function(q){q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);this.addFakeNodes();this.PHTMLaddChild(q,"open",{});for(var p=0,n=this.data.length;ps){s=x.w}}}var o=this.PHTML;o.w=s;o.h=y/2+0.25;o.d=y/2-0.25;o.l=o.r=0.125;return E}});h.mlabeledtr.Augment({PHTMLdefaultSpan:function(q,o){if(!o){o={}}q=this.PHTMLcreateSpan(q);this.PHTMLhandleStyle(q);this.PHTMLhandleColor(q);if(this.isToken){this.PHTMLhandleToken(q)}for(var p=1,n=this.data.length;p