/* * /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 v=MathJax.ElementJax.mml,c=MathJax.OutputJax["HTML-CSS"];v.mmultiscripts.Augment({toHTML:function(r,p,a){r=this.HTMLcreateSpan(r);var e=this.HTMLgetScale(),b=c.createStack(r),f,l=c.createBox(b);if(this.data[this.base]){var d=this.data[this.base].toHTML(l);null!=a?this.data[this.base].HTMLstretchV(l,p,a):null!=p&&this.data[this.base].HTMLstretchH(l,p);c.Measured(d,l)}else l.bbox=this.HTMLzeroBBox();p=c.TeX.x_height*e;a=c.TeX.scriptspace*e*.75;d=this.HTMLgetScripts(b,a);f=d[0];for(var b=d[1],h=d[2],d=d[3],m=this.HTMLgetScale(),g=1;gn&&(n=0);c.placeBox(l,n,0);if(b||d)if(f||h){var k=Math.max(k,c.TeX.sub2*e),e=c.TeX.rule_thickness*e,q=(f||h).bbox.h,u=(b||d).bbox.d;h&&(q=Math.max(q,h.bbox.h));d&&(u=Math.max(u,d.bbox.d));g-u-(q-k)<3*e&&(k=3*e-g+u+q,q=.8*p-(g-u),0h;h+=2){for(;fa.bbox.w&&(c.createBlank(a,e.bbox.w-a.bbox.w),a.bbox.w=e.bbox.w,a.bbox.rw=Math.max(a.bbox.w,a.bbox.rw)));e?d=e.bbox.w:a&&(d=a.bbox.w)}f++;d=0}for(a=0;4>a;a++)b[a]&&(b[a].bbox.w+=p,b[a].bbox.rw=Math.max(b[a].bbox.w,b[a].bbox.rw),this.HTMLcleanBBox(b[a].bbox));return b},HTMLstretchH:v.mbase.HTMLstretchH,HTMLstretchV:v.mbase.HTMLstretchV});MathJax.Hub.Startup.signal.Post("HTML-CSS mmultiscripts Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/mmultiscripts.js")});