|
1992 | 1992 | (base.movablelimits || base.CoreMO().Get("movablelimits")))
|
1993 | 1993 | {return MML.msubsup.prototype.toSVG.call(this)}
|
1994 | 1994 | var svg = this.SVG(), scale = this.SVGgetScale(svg); this.SVGhandleSpace(svg);
|
1995 |
| - var boxes = [], stretch = [], box, i, m, W = -SVG.BIGDIMEN, WW = W; |
| 1995 | + var boxes = [], stretch = [], box, i, m, W = -SVG.BIGDIMEN, WW = W, ww; |
1996 | 1996 | for (i = 0, m = this.data.length; i < m; i++) {
|
1997 | 1997 | if (this.data[i] != null) {
|
1998 | 1998 | if (i == this.base) {
|
1999 |
| - boxes[i] = this.SVGdataStretched(i,HW,D); |
| 1999 | + box = boxes[i] = this.SVGdataStretched(i,HW,D); |
2000 | 2000 | stretch[i] = (D != null || HW == null) && this.data[i].SVGcanStretch("Horizontal");
|
2001 | 2001 | if (this.data[this.over] && values.accent) {
|
2002 |
| - boxes[i].h = Math.max(boxes[i].h,scale*SVG.TeX.x_height); // min height of 1ex (#1706) |
| 2002 | + box.h = Math.max(box.h,scale*SVG.TeX.x_height); // min height of 1ex (#1706) |
2003 | 2003 | }
|
2004 | 2004 | } else {
|
2005 |
| - boxes[i] = this.data[i].toSVG(); boxes[i].x = 0; delete boxes[i].X; |
| 2005 | + box = boxes[i] = this.data[i].toSVG(); box.x = 0; delete box.X; |
2006 | 2006 | stretch[i] = this.data[i].SVGcanStretch("Horizontal");
|
2007 | 2007 | }
|
2008 |
| - if (boxes[i].w > WW) {WW = boxes[i].w} |
| 2008 | + ww = box.w + box.x + (box.X || 0); |
| 2009 | + if (ww > WW) {WW = ww} |
2009 | 2010 | if (!stretch[i] && WW > W) {W = WW}
|
2010 | 2011 | }
|
2011 | 2012 | }
|
2012 | 2013 | if (D == null && HW != null) {W = HW} else if (W == -SVG.BIGDIMEN) {W = WW}
|
2013 | 2014 | for (i = WW = 0, m = this.data.length; i < m; i++) {if (this.data[i]) {
|
| 2015 | + box = boxes[i]; |
2014 | 2016 | if (stretch[i]) {
|
2015 |
| - boxes[i] = this.data[i].SVGstretchH(W); |
2016 |
| - if (i !== this.base) {boxes[i].x = 0; delete boxes[i].X} |
| 2017 | + box = boxes[i] = this.data[i].SVGstretchH(W); |
| 2018 | + if (i !== this.base) {box.x = 0; delete box.X} |
2017 | 2019 | }
|
2018 |
| - if (boxes[i].w > WW) {WW = boxes[i].w} |
| 2020 | + ww = box.w + box.x + (box.X || 0); |
| 2021 | + if (ww > WW) {WW = ww} |
2019 | 2022 | }}
|
2020 | 2023 | var t = SVG.TeX.rule_thickness * this.mscale;
|
2021 | 2024 | var x, y, z1, z2, z3, dw, k, delta = 0;
|
|
2032 | 2035 | boxes[i].Add(box); boxes[i].Clean();
|
2033 | 2036 | boxes[i].w = -box.l; box = boxes[i];
|
2034 | 2037 | }
|
2035 |
| - dw = {left:0, center:(WW-box.w)/2, right:WW-box.w}[values.align]; |
| 2038 | + ww = box.w + box.x + (box.X || 0); |
| 2039 | + dw = {left:0, center:(WW-ww)/2, right:WW-ww}[values.align]; |
2036 | 2040 | x = dw; y = 0;
|
2037 | 2041 | if (i == this.over) {
|
2038 | 2042 | if (accent) {
|
2039 | 2043 | k = t * scale; z3 = 0;
|
2040 | 2044 | if (base.skew) {
|
2041 | 2045 | x += base.skew; svg.skew = base.skew;
|
2042 |
| - if (x+box.w > WW) {svg.skew += (WW-box.w-x)/2} |
| 2046 | + if (x+ww > WW) {svg.skew += (WW-ww-x)/2} |
2043 | 2047 | }
|
2044 | 2048 | } else {
|
2045 | 2049 | z1 = SVG.TeX.big_op_spacing1 * scale;
|
|
0 commit comments