Do measuring of subformulas all at once (for mfrac, msqrt, msubsup, munderover, mmultiscripts). Still need to do mtable

This commit is contained in:
Davide P. Cervone 2011-09-06 12:34:51 -04:00
parent cd6297fc01
commit b900adc953
9 changed files with 52 additions and 53 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="1.1";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mmultiscripts.Augment({toHTML:function(I,G,B){I=this.HTMLcreateSpan(I);var N=this.HTMLgetScale();var l=b.createStack(I),f;var j=b.createBox(l);if(this.data[this.base]){var k=this.data[this.base].toHTML(j);if(B!=null){b.Remeasured(this.data[this.base].HTMLstretchV(j,G,B),j)}else{if(G!=null){b.Remeasured(this.data[this.base].HTMLstretchH(j,G),j)}else{b.Measured(k,j)}}}var L=b.TeX.x_height*N,A=b.TeX.scriptspace*N*0.75;var z=this.HTMLgetScripts(l,A);var m=z[0],e=z[1],w=z[2],i=z[3];var g=(this.data[1]||this).HTMLgetScale();var E=b.TeX.sup_drop*g,C=b.TeX.sub_drop*g;var x=j.bbox.h-E,o=j.bbox.d+C,M=0,F;if(j.bbox.ic){M=j.bbox.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&j.bbox.scale===1&&!this.data[this.base].Get("largeop")){x=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:b.length2em(H.subscriptshift));H.superscriptshift=(H.superscriptshift===""?0:b.length2em(H.superscriptshift));var n=0;if(w){n=w.bbox.w+M}else{if(i){n=i.bbox.w-M}}if(n<0){n=0}b.placeBox(j,n,0);if(!e&&!i){o=Math.max(o,b.TeX.sub1*N,H.subscriptshift);if(m){o=Math.max(o,m.bbox.h-(4/5)*L)}if(w){o=Math.max(o,w.bbox.h-(4/5)*L)}if(m){b.placeBox(m,n+j.bbox.w+A-M,-o)}if(w){b.placeBox(w,0,-o)}}else{if(!m&&!w){f=this.getValues("displaystyle","texprimestyle");F=b.TeX[(f.displaystyle?"sup1":(f.texprimestyle?"sup3":"sup2"))];x=Math.max(x,F*N,H.superscriptshift);if(e){x=Math.max(x,e.bbox.d+(1/4)*L)}if(i){x=Math.max(x,i.bbox.d+(1/4)*L)}if(e){b.placeBox(e,n+j.bbox.w+A,x)}if(i){b.placeBox(i,0,x)}}else{o=Math.max(o,b.TeX.sub2*N);var y=b.TeX.rule_thickness*N;var J=(m||w).bbox.h,K=(e||i).bbox.d;if(w){J=Math.max(J,w.bbox.h)}if(i){K=Math.max(K,i.bbox.d)}if((x-K)-(J-o)<3*y){o=3*y-x+K+J;E=(4/5)*L-(x-K);if(E>0){x+=E;o-=E}}x=Math.max(x,H.superscriptshift);o=Math.max(o,H.subscriptshift);if(e){b.placeBox(e,n+j.bbox.w+A,x)}if(i){b.placeBox(i,n+M-i.bbox.w,x)}if(m){b.placeBox(m,n+j.bbox.w+A-M,-o)}if(w){b.placeBox(w,n-w.bbox.w,-o)}}}this.HTMLhandleSpace(I);this.HTMLhandleColor(I);return I},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(n<g&&this.data[n].type!=="mprescripts"){for(var l=h;l<h+2;l++){if(this.data[n]&&this.data[n].type!=="none"){if(!e[l]){e[l]=b.createBox(p);e[l].bbox=this.HTMLemptyBBox({});if(f){b.createBlank(e[l],f);e[l].bbox.w=e[l].bbox.rw=f}}this.data[n].toHTML(e[l]);this.HTMLcombineBBoxes(this.data[n],e[l].bbox)}n++}d=e[h];o=e[h+1];if(d&&o){if(d.bbox.w<o.bbox.w){b.createBlank(d,o.bbox.w-d.bbox.w);d.bbox.w=o.bbox.w;d.bbox.rw=Math.max(d.bbox.w,d.bbox.rw)}else{if(d.bbox.w>o.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")}); MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var c="1.1.1";var a=MathJax.ElementJax.mml,b=MathJax.OutputJax["HTML-CSS"];a.mmultiscripts.Augment({toHTML:function(I,G,B){I=this.HTMLcreateSpan(I);var N=this.HTMLgetScale();var l=b.createStack(I),f,k;var j=b.createBox(l);if(this.data[this.base]){var k=this.data[this.base].toHTML(j);if(B!=null){this.data[this.base].HTMLstretchV(j,G,B)}else{if(G!=null){this.data[this.base].HTMLstretchH(j,G)}}b.Measured(k,j)}else{j.bbox=this.HTMLzeroBBox()}var L=b.TeX.x_height*N,A=b.TeX.scriptspace*N*0.75;var z=this.HTMLgetScripts(l,A);var m=z[0],e=z[1],w=z[2],i=z[3];var g=(this.data[1]||this).HTMLgetScale();var E=b.TeX.sup_drop*g,C=b.TeX.sub_drop*g;var x=j.bbox.h-E,o=j.bbox.d+C,M=0,F;if(j.bbox.ic){M=j.bbox.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&j.bbox.scale===1&&!this.data[this.base].Get("largeop")){x=o=0}}var H=this.getValues("subscriptshift","superscriptshift");H.subscriptshift=(H.subscriptshift===""?0:b.length2em(H.subscriptshift));H.superscriptshift=(H.superscriptshift===""?0:b.length2em(H.superscriptshift));var n=0;if(w){n=w.bbox.w+M}else{if(i){n=i.bbox.w-M}}if(n<0){n=0}b.placeBox(j,n,0);if(!e&&!i){o=Math.max(o,b.TeX.sub1*N,H.subscriptshift);if(m){o=Math.max(o,m.bbox.h-(4/5)*L)}if(w){o=Math.max(o,w.bbox.h-(4/5)*L)}if(m){b.placeBox(m,n+j.bbox.w+A-M,-o)}if(w){b.placeBox(w,0,-o)}}else{if(!m&&!w){f=this.getValues("displaystyle","texprimestyle");F=b.TeX[(f.displaystyle?"sup1":(f.texprimestyle?"sup3":"sup2"))];x=Math.max(x,F*N,H.superscriptshift);if(e){x=Math.max(x,e.bbox.d+(1/4)*L)}if(i){x=Math.max(x,i.bbox.d+(1/4)*L)}if(e){b.placeBox(e,n+j.bbox.w+A,x)}if(i){b.placeBox(i,0,x)}}else{o=Math.max(o,b.TeX.sub2*N);var y=b.TeX.rule_thickness*N;var J=(m||w).bbox.h,K=(e||i).bbox.d;if(w){J=Math.max(J,w.bbox.h)}if(i){K=Math.max(K,i.bbox.d)}if((x-K)-(J-o)<3*y){o=3*y-x+K+J;E=(4/5)*L-(x-K);if(E>0){x+=E;o-=E}}x=Math.max(x,H.superscriptshift);o=Math.max(o,H.subscriptshift);if(e){b.placeBox(e,n+j.bbox.w+A,x)}if(i){b.placeBox(i,n+M-i.bbox.w,x)}if(m){b.placeBox(m,n+j.bbox.w+A-M,-o)}if(w){b.placeBox(w,n-w.bbox.w,-o)}}}this.HTMLhandleSpace(I);this.HTMLhandleColor(I);return I},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(n<g&&this.data[n].type!=="mprescripts"){for(var l=h;l<h+2;l++){if(this.data[n]&&this.data[n].type!=="none"){if(!e[l]){e[l]=b.createBox(p);e[l].bbox=this.HTMLemptyBBox({});if(f){b.createBlank(e[l],f);e[l].bbox.w=e[l].bbox.rw=f}}this.data[n].toHTML(e[l]);this.HTMLcombineBBoxes(this.data[n],e[l].bbox)}n++}d=e[h];o=e[h+1];if(d&&o){if(d.bbox.w<o.bbox.w){b.createBlank(d,o.bbox.w-d.bbox.w);d.bbox.w=o.bbox.w;d.bbox.rw=Math.max(d.bbox.w,d.bbox.rw)}else{if(d.bbox.w>o.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")});

File diff suppressed because one or more lines are too long

View File

@ -22,21 +22,21 @@
*/ */
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var VERSION = "1.1"; var VERSION = "1.1.1";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"]; HTMLCSS = MathJax.OutputJax["HTML-CSS"];
MML.mmultiscripts.Augment({ MML.mmultiscripts.Augment({
toHTML: function (span,HW,D) { toHTML: function (span,HW,D) {
span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(); span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale();
var stack = HTMLCSS.createStack(span), values; var stack = HTMLCSS.createStack(span), values, child;
var base = HTMLCSS.createBox(stack); var base = HTMLCSS.createBox(stack);
if (this.data[this.base]) { if (this.data[this.base]) {
var child = this.data[this.base].toHTML(base); var child = this.data[this.base].toHTML(base);
if (D != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchV(base,HW,D),base)} if (D != null) {this.data[this.base].HTMLstretchV(base,HW,D)}
else if (HW != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchH(base,HW),base)} else if (HW != null) {this.data[this.base].HTMLstretchH(base,HW)}
else {HTMLCSS.Measured(child,base)} HTMLCSS.Measured(child,base);
} } else {base.bbox = this.HTMLzeroBBox()}
var x_height = HTMLCSS.TeX.x_height * scale, var x_height = HTMLCSS.TeX.x_height * scale,
s = HTMLCSS.TeX.scriptspace * scale * .75; // FIXME: .75 can be removed when IC is right? s = HTMLCSS.TeX.scriptspace * scale * .75; // FIXME: .75 can be removed when IC is right?

View File

@ -39,7 +39,7 @@ MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
imageFont: "TeX", // font to use for image fallback mode (TeX is only choice) imageFont: "TeX", // font to use for image fallback mode (TeX is only choice)
showMathMenu: true, // allow MathMenu? showMathMenu: true, // allow MathMenu?
EqnChunk: 50, // number of equations to process before showing them EqnChunk: 500, // number of equations to process before showing them
EqnChunkFactor: 1.5, // chunk size is multiplied by this after each chunk EqnChunkFactor: 1.5, // chunk size is multiplied by this after each chunk
styles: { styles: {

View File

@ -669,8 +669,12 @@
// Insert the needed markers // Insert the needed markers
// //
for (i = 0, m = arguments.length; i < m; i++) { for (i = 0, m = arguments.length; i < m; i++) {
span = arguments[i]; bbox = span.bbox; span = arguments[i]; if (!span) continue;
if (bbox.exactW || bbox.width || bbox.w === 0 || bbox.isMultiline) continue; bbox = span.bbox;
if (bbox.exactW || bbox.width || bbox.w === 0 || bbox.isMultiline) {
if (!span.parentNode.bbox) {span.parentNode.bbox = bbox}
continue;
}
if (this.negativeBBoxes || !span.firstChild || (bbox.w >= 0 && !this.initialSkipBug) || if (this.negativeBBoxes || !span.firstChild || (bbox.w >= 0 && !this.initialSkipBug) ||
(bbox.w < 0 && this.msieNegativeBBoxBug)) { (bbox.w < 0 && this.msieNegativeBBoxBug)) {
spans.push([span]); spans.push([span]);
@ -698,7 +702,7 @@
W /= this.em; W /= this.em;
bbox.rw += W - bbox.w; bbox.rw += W - bbox.w;
bbox.w = W; bbox.exactW = true; bbox.w = W; bbox.exactW = true;
parent.bbox = bbox; if (!parent.bbox) {parent.bbox = bbox}
} }
// //
// Remove markers // Remove markers
@ -1420,14 +1424,8 @@
else {box.bbox = this.HTMLzeroBBox()} else {box.bbox = this.HTMLzeroBBox()}
}, },
HTMLboxChild: function (n,box) { HTMLboxChild: function (n,box) {
if (this.data[n]) { if (this.data[n]) {return this.data[n].toHTML(box)}
var span = this.data[n].toHTML(box); return null;
box.bbox = span.bbox;
return span;
} else {
box.bbox = this.HTMLzeroBBox();
return null;
}
}, },
HTMLcreateSpan: function (span) { HTMLcreateSpan: function (span) {
@ -1891,7 +1889,7 @@
span = this.HTMLcreateSpan(span); span = this.HTMLcreateSpan(span);
var frac = HTMLCSS.createStack(span); var frac = HTMLCSS.createStack(span);
var num = HTMLCSS.createBox(frac), den = HTMLCSS.createBox(frac); var num = HTMLCSS.createBox(frac), den = HTMLCSS.createBox(frac);
this.HTMLmeasureChild(0,num); this.HTMLmeasureChild(1,den); HTMLCSS.MeasureSpans(this.HTMLboxChild(0,num),this.HTMLboxChild(1,den));
var values = this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled"); var values = this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");
var scale = this.HTMLgetScale(), isDisplay = values.displaystyle; var scale = this.HTMLgetScale(), isDisplay = values.displaystyle;
var a = HTMLCSS.TeX.axis_height * scale; var a = HTMLCSS.TeX.axis_height * scale;
@ -1946,14 +1944,15 @@
var base = HTMLCSS.createBox(sqrt), var base = HTMLCSS.createBox(sqrt),
rule = HTMLCSS.createBox(sqrt), rule = HTMLCSS.createBox(sqrt),
surd = HTMLCSS.createBox(sqrt); surd = HTMLCSS.createBox(sqrt);
this.HTMLmeasureChild(0,base);
var scale = this.HTMLgetScale(); var scale = this.HTMLgetScale();
var t = HTMLCSS.TeX.rule_thickness * scale, p,q, H, W; var t = HTMLCSS.TeX.rule_thickness * scale, p,q, H, W;
if (this.Get("displaystyle")) {p = HTMLCSS.TeX.x_height * scale} else {p = t} if (this.Get("displaystyle")) {p = HTMLCSS.TeX.x_height * scale} else {p = t}
q = Math.max(t + p/4,1.5*HTMLCSS.TeX.min_rule_thickness/this.em); // force to be at least 1px q = Math.max(t + p/4,1.5*HTMLCSS.TeX.min_rule_thickness/this.em); // force to be at least 1px
H = base.bbox.h + base.bbox.d + q + t; var BASE = this.HTMLboxChild(0,base);
W = base.bbox.w; H = BASE.bbox.h + BASE.bbox.d + q + t;
HTMLCSS.createDelimiter(surd,0x221A,H,scale); HTMLCSS.Measured(surd); HTMLCSS.createDelimiter(surd,0x221A,H,scale);
HTMLCSS.MeasureSpans(BASE,surd);
W = BASE.bbox.w;
var x = 0; var x = 0;
if (surd.isMultiChar || (HTMLCSS.AdjustSurd && HTMLCSS.imgFonts)) {surd.bbox.w *= .95} if (surd.isMultiChar || (HTMLCSS.AdjustSurd && HTMLCSS.imgFonts)) {surd.bbox.w *= .95}
if (surd.bbox.h + surd.bbox.d > H) {q = ((surd.bbox.h+surd.bbox.d) - (H-t))/2} if (surd.bbox.h + surd.bbox.d > H) {q = ((surd.bbox.h+surd.bbox.d) - (H-t))/2}
@ -1963,7 +1962,7 @@
} else { } else {
HTMLCSS.createDelimiter(rule,HTMLCSS.FONTDATA.RULECHAR,W,scale); HTMLCSS.createDelimiter(rule,HTMLCSS.FONTDATA.RULECHAR,W,scale);
} }
H = base.bbox.h + q + t; H = BASE.bbox.h + q + t;
x = this.HTMLaddRoot(sqrt,surd,x,surd.bbox.h+surd.bbox.d-H,scale); x = this.HTMLaddRoot(sqrt,surd,x,surd.bbox.h+surd.bbox.d-H,scale);
HTMLCSS.placeBox(surd,x,H-surd.bbox.h); HTMLCSS.placeBox(surd,x,H-surd.bbox.h);
HTMLCSS.placeBox(rule,x+surd.bbox.w,H-rule.bbox.h+HTMLCSS.rfuzz); HTMLCSS.placeBox(rule,x+surd.bbox.w,H-rule.bbox.h+HTMLCSS.rfuzz);
@ -2069,22 +2068,26 @@
{return MML.msubsup.prototype.toHTML.call(this,span)} {return MML.msubsup.prototype.toHTML.call(this,span)}
span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(); span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale();
var stack = HTMLCSS.createStack(span); var stack = HTMLCSS.createStack(span);
var boxes = [], stretch = [], box, i, m, W = -HTMLCSS.BIGDIMEN, WW = W; var boxes = [], children = [], stretch = [], box, i, m;
for (i = 0, m = this.data.length; i < m; i++) { for (i = 0, m = this.data.length; i < m; i++) {
if (this.data[i] != null) { if (this.data[i] != null) {
box = boxes[i] = HTMLCSS.createBox(stack); box = boxes[i] = HTMLCSS.createBox(stack);
var child = this.data[i].toHTML(box); children[i] = this.data[i].toHTML(box);
if (i == this.base) { if (i == this.base) {
if (D != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchV(box,HW,D),box)} if (D != null) {this.data[this.base].HTMLstretchV(box,HW,D)}
else if (HW != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchH(box,HW),box)} else if (HW != null) {this.data[this.base].HTMLstretchH(box,HW)}
else {HTMLCSS.Measured(child,box)}
stretch[i] = (D == null && HW != null ? false : stretch[i] = (D == null && HW != null ? false :
this.data[i].HTMLcanStretch("Horizontal")); this.data[i].HTMLcanStretch("Horizontal"));
} else { } else {
HTMLCSS.Measured(child,box);
stretch[i] = this.data[i].HTMLcanStretch("Horizontal"); stretch[i] = this.data[i].HTMLcanStretch("Horizontal");
} }
if (box.bbox.w > WW) {WW = box.bbox.w} }
}
HTMLCSS.MeasureSpans.apply(HTMLCSS,children);
var W = -HTMLCSS.BIGDIMEN, WW = W;
for (i = 0, m = this.data.length; i < m; i++) {
if (this.data[i]) {
if (boxes[i].bbox.w > WW) {WW = boxes[i].bbox.w}
if (!stretch[i] && WW > W) {W = WW} if (!stretch[i] && WW > W) {W = WW}
} }
} }
@ -2145,29 +2148,25 @@
MML.msubsup.Augment({ MML.msubsup.Augment({
toHTML: function (span,HW,D) { toHTML: function (span,HW,D) {
span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale(); span = this.HTMLcreateSpan(span); var scale = this.HTMLgetScale();
var stack = HTMLCSS.createStack(span), values; var stack = HTMLCSS.createStack(span), values, children = [];
var base = HTMLCSS.createBox(stack); var base = HTMLCSS.createBox(stack);
if (this.data[this.base]) { if (this.data[this.base]) {
var child = this.data[this.base].toHTML(base); children.push(this.data[this.base].toHTML(base));
if (D != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchV(base,HW,D),base)} if (D != null) {this.data[this.base].HTMLstretchV(base,HW,D)}
else if (HW != null) {HTMLCSS.Remeasured(this.data[this.base].HTMLstretchH(base,HW),base)} else if (HW != null) {this.data[this.base].HTMLstretchH(base,HW)}
else {HTMLCSS.Measured(child,base)}
} else {base.bbox = this.HTMLzeroBBox()} } else {base.bbox = this.HTMLzeroBBox()}
HTMLCSS.placeBox(base,0,0);
var sscale = (this.data[this.sup] || this.data[this.sub] || this).HTMLgetScale(); var sscale = (this.data[this.sup] || this.data[this.sub] || this).HTMLgetScale();
var x_height = HTMLCSS.TeX.x_height * scale, var x_height = HTMLCSS.TeX.x_height * scale,
s = HTMLCSS.TeX.scriptspace * scale * .75; // FIXME: .75 can be removed when IC is right? s = HTMLCSS.TeX.scriptspace * scale * .75; // FIXME: .75 can be removed when IC is right?
var sup, sub; var sup, sub;
if (this.HTMLnotEmpty(this.data[this.sup])) { if (this.HTMLnotEmpty(this.data[this.sup]))
sup = HTMLCSS.createBox(stack); {sup = HTMLCSS.createBox(stack); children.push(this.data[this.sup].toHTML(sup))}
HTMLCSS.Measured(this.data[this.sup].toHTML(sup),sup); if (this.HTMLnotEmpty(this.data[this.sub]))
sup.bbox.w += s; sup.bbox.rw = Math.max(sup.bbox.w,sup.bbox.rw); {sub = HTMLCSS.createBox(stack); children.push(this.data[this.sub].toHTML(sub))}
} HTMLCSS.MeasureSpans.apply(HTMLCSS,children);
if (this.HTMLnotEmpty(this.data[this.sub])) { if (sup) {sup.bbox.w += s; sup.bbox.rw = Math.max(sup.bbox.w,sup.bbox.rw)}
sub = HTMLCSS.createBox(stack); if (sub) {sub.bbox.w += s; sub.bbox.rw = Math.max(sub.bbox.w,sub.bbox.rw)}
HTMLCSS.Measured(this.data[this.sub].toHTML(sub),sub); HTMLCSS.placeBox(base,0,0);
sub.bbox.w += s; sub.bbox.rw = Math.max(sub.bbox.w,sub.bbox.rw);
}
var q = HTMLCSS.TeX.sup_drop * sscale, r = HTMLCSS.TeX.sub_drop * sscale; var q = HTMLCSS.TeX.sup_drop * sscale, r = HTMLCSS.TeX.sub_drop * sscale;
var u = base.bbox.h - q, v = base.bbox.d + r, delta = 0, p; var u = base.bbox.h - q, v = base.bbox.d + r, delta = 0, p;
if (base.bbox.ic) {delta = base.bbox.ic} if (base.bbox.ic) {delta = base.bbox.ic}