/*
* /MathJax/jax/output/HTML-CSS/autoload/mmultiscripts.js
*
* Copyright (c) 2009-2013 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.3";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mmultiscripts.Augment({toHTML:function(K,I,C){K=this.HTMLcreateSpan(K);var Q=this.HTMLgetScale();var m=b.createStack(K),f;var k=b.createBox(m);if(this.data[this.base]){var l=this.data[this.base].toHTML(k);if(C!=null){this.data[this.base].HTMLstretchV(k,I,C)}else{if(I!=null){this.data[this.base].HTMLstretchH(k,I)}}b.Measured(l,k)}else{k.bbox=this.HTMLzeroBBox()}var O=b.TeX.x_height*Q,B=b.TeX.scriptspace*Q*0.75;var A=this.HTMLgetScripts(m,B);var n=A[0],e=A[1],x=A[2],j=A[3];var g=this.HTMLgetScale();for(var L=1;L0){y+=F;w-=F}}y=Math.max(y,J.superscriptshift);w=Math.max(w,J.subscriptshift);if(e){b.placeBox(e,o+k.bbox.w+B,y)}if(j){b.placeBox(j,o+P-j.bbox.w,y)}if(n){b.placeBox(n,o+k.bbox.w+B-P,-w)}if(x){b.placeBox(x,o-x.bbox.w,-w)}}}this.HTMLhandleSpace(K);this.HTMLhandleColor(K);return K},HTMLgetScripts:function(p,q){var o,d,e=[];var n=1,g=this.data.length,f=0;for(var h=0;h<4;h+=2){while(no.bbox.w){b.createBlank(o,d.bbox.w-o.bbox.w);o.bbox.w=d.bbox.w;o.bbox.rw=Math.max(o.bbox.w,o.bbox.rw)}}}if(d){f=d.bbox.w}else{if(o){f=o.bbox.w}}}n++;f=0}for(l=0;l<4;l++){if(e[l]){e[l].bbox.w+=q;e[l].bbox.rw=Math.max(e[l].bbox.w,e[l].bbox.rw);this.HTMLcleanBBox(e[l].bbox)}}return e},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mmultiscripts Ready");MathJax.Ajax.loadComplete(b.autoloadDir+"/mmultiscripts.js")});