Merge branch 'issue834' into develop. Issue #834.
This commit is contained in:
commit
74253a955f
|
@ -443,8 +443,9 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
C[LABEL].style.marginRight = C[LABEL].style.marginLeft = HTMLCSS.Em(labelshift);
|
||||
if (indent.indentalign === MML.INDENTALIGN.CENTER) {mw += 4*labelshift + 2*C[LABEL].bbox.w}
|
||||
else if (indent.indentalign !== CALIGN[LABEL]) {mw += 2*labelshift + C[LABEL].bbox.w}
|
||||
span.style.minWidth = span.bbox.minWidth = HTMLCSS.Em(Math.max(0,mw+shift));
|
||||
eqn.style.minWidth = eqn.bbox.minWidth = HTMLCSS.Em(Math.max(0,(mw+shift)/HTMLCSS.scale));
|
||||
mw = Math.max(0,mw+shift); span.bbox.tw = mw + 2*labelshift;
|
||||
span.style.minWidth = span.bbox.minWidth = HTMLCSS.Em(mw);
|
||||
eqn.style.minWidth = eqn.bbox.minWidth = HTMLCSS.Em(mw/HTMLCSS.scale);
|
||||
}
|
||||
//
|
||||
// Finish the table
|
||||
|
|
|
@ -771,15 +771,19 @@
|
|||
this.em = MML.mbase.prototype.em = em;
|
||||
this.outerEm = em / jax.HTMLCSS.scale;
|
||||
emex.parentNode.removeChild(emex);
|
||||
this.scale = jax.HTMLCSS.scale;
|
||||
this.linebreakWidth = jax.HTMLCSS.lineWidth;
|
||||
this.cwidth = jax.HTMLCSS.cwidth;
|
||||
|
||||
this.zoomScale = parseInt(HUB.config.menuSettings.zscale) / 100;
|
||||
this.idPostfix = "-zoom"; jax.root.toHTML(span,span); this.idPostfix = "";
|
||||
this.zoomScale = 1;
|
||||
|
||||
var width = jax.root.HTMLspanElement().bbox.width;
|
||||
var bbox = jax.root.HTMLspanElement().bbox, width = bbox.width;
|
||||
if (width) {
|
||||
// Handle full-width displayed equations
|
||||
// FIXME: this is a hack for now
|
||||
if (bbox.tw) {Mw = bbox.tw*em}
|
||||
if (bbox.w*em < Mw) {Mw = bbox.w*em}
|
||||
span.style.width = Math.floor(Mw-1.5*HTMLCSS.em)+"px"; span.style.display="inline-block";
|
||||
var id = (jax.root.id||"MathJax-Span-"+jax.root.spanID)+"-zoom";
|
||||
var child = document.getElementById(id).firstChild;
|
||||
|
@ -1203,6 +1207,7 @@
|
|||
}
|
||||
span.style.width = bbox.width;
|
||||
}
|
||||
if (bbox.tw) {BBOX.tw = bbox.tw}
|
||||
}
|
||||
},
|
||||
alignBox: function (span,align,y,dx) {
|
||||
|
@ -1752,6 +1757,7 @@
|
|||
BBOX.w += bbox.w;
|
||||
if (child.style.paddingRight) {BBOX.w += HTMLCSS.unEm(child.style.paddingRight)*(child.scale||1)}
|
||||
if (bbox.width) {BBOX.width = bbox.width; BBOX.minWidth = bbox.minWidth}
|
||||
if (bbox.tw) {BBOX.tw = bbox.tw}
|
||||
if (bbox.ic) {BBOX.ic = bbox.ic} else {delete BBOX.ic}
|
||||
if (BBOX.exactW && !bbox.exactW) {delete BBOX.exactW}
|
||||
},
|
||||
|
|
|
@ -324,6 +324,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
|||
// Place the labels, if any
|
||||
//
|
||||
if (C[LABEL]) {
|
||||
svg.tw = Math.max(svg.w,svg.r) - Math.min(0,svg.l);
|
||||
var indent = this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");
|
||||
if (indent.indentalignfirst !== MML.INDENTALIGN.INDENTALIGN) {indent.indentalign = indent.indentalignfirst}
|
||||
if (indent.indentalign === MML.INDENTALIGN.AUTO) {indent.indentalign = this.displayAlign}
|
||||
|
@ -339,6 +340,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
|||
svg.w = svg.r = SVG.cwidth; svg.hasIndent = true;
|
||||
svg.Align(C[LABEL],CALIGN[LABEL],labelshift,0);
|
||||
svg.Align(eqn,indent.indentalign,0,0,shift);
|
||||
svg.tw += C[LABEL].w + shift +
|
||||
(indent.indentalign === MML.INDENTALIGN.CENTER ? 8 : 4)*labelshift;
|
||||
}
|
||||
|
||||
this.SVGsaveData(svg);
|
||||
|
|
|
@ -431,12 +431,13 @@
|
|||
//
|
||||
var emex = span.appendChild(this.ExSpan.cloneNode(true));
|
||||
var ex = emex.firstChild.offsetHeight/60;
|
||||
this.em = MML.mbase.prototype.em = ex / SVG.TeX.x_height * 1000;
|
||||
this.cwidth = .85*SVG.defaultWidth/this.em * 1000;
|
||||
this.em = MML.mbase.prototype.em = ex / SVG.TeX.x_height * 1000; this.ex = ex;
|
||||
this.linebreakWidth = jax.SVG.lineWidth; this.cwidth = jax.SVG.cwidth;
|
||||
emex.parentNode.removeChild(emex);
|
||||
|
||||
span.appendChild(this.textSVG);
|
||||
this.mathDIV = span; this.zoomScale = parseInt(HUB.config.menuSettings.zscale) / 100;
|
||||
var tw = jax.root.data[0].SVGdata.tw; if (tw && tw < this.cwidth) this.cwidth = tw;
|
||||
this.idPostfix = "-zoom"; jax.root.toSVG(span,span); this.idPostfix = "";
|
||||
this.zoomScale = 1;
|
||||
span.removeChild(this.textSVG);
|
||||
|
@ -879,6 +880,7 @@
|
|||
delete svg.element;
|
||||
}
|
||||
if (svg.hasIndent) {this.hasIndent = svg.hasIndent}
|
||||
if (svg.tw != null) {this.tw = svg.tw}
|
||||
if (svg.d - svg.y > this.d) {this.d = svg.d - svg.y; if (this.d > this.D) {this.D = this.d}}
|
||||
if (svg.y + svg.h > this.h) {this.h = svg.y + svg.h; if (this.h > this.H) {this.H = this.h}}
|
||||
if (svg.D - svg.y > this.D) {this.D = svg.D - svg.y}
|
||||
|
@ -1094,6 +1096,7 @@
|
|||
this.SVGdata.h = svg.h, this.SVGdata.d = svg.d;
|
||||
if (svg.y) {this.SVGdata.h += svg.y; this.SVGdata.d -= svg.y}
|
||||
if (svg.X != null) {this.SVGdata.X = svg.X}
|
||||
if (svg.tw != null) {this.SVGdata.tw = svg.tw}
|
||||
if (svg.skew) {this.SVGdata.skew = svg.skew}
|
||||
if (svg.ic) {this.SVGdata.ic = svg.ic}
|
||||
if (this["class"]) {svg.removeable = false; SVG.Element(svg.element,{"class":this["class"]})}
|
||||
|
|
Loading…
Reference in New Issue
Block a user