/*
* /MathJax/jax/output/HTML-CSS/autoload/mmultiscripts.js
*
* Copyright (c) 2009-2013 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.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="2.2";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")});