Fix problem with indentShift when indentAlign is not 'center' and the equation is tagged
This commit is contained in:
parent
c1ab649925
commit
d82b3be4fb
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
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -400,8 +400,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
var eqn = HTMLCSS.createStack(span,false,"100%");
|
||||
HTMLCSS.addBox(eqn,stack); HTMLCSS.alignBox(stack,indent.indentalign,0);
|
||||
if (indent.indentshift && indent.indentalign !== MML.INDENTALIGN.CENTER) {
|
||||
stack.style[{left:"Left",right:"Right"}[indent.indentalign]] =
|
||||
HTMLCSS.Em(HTMLCSS.length2em(indent.indentshift,mu));
|
||||
stack.style[indent.indentalign] = HTMLCSS.Em(HTMLCSS.length2em(indent.indentshift,mu));
|
||||
}
|
||||
C[LABEL].parentNode.parentNode.removeChild(C[LABEL].parentNode);
|
||||
HTMLCSS.addBox(eqn,C[LABEL]); HTMLCSS.alignBox(C[LABEL],CALIGN[LABEL],0);
|
||||
|
|
|
@ -301,11 +301,20 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
|||
if (indent.indentalign === MML.INDENTALIGN.AUTO) {indent.indentalign = this.displayAlign}
|
||||
if (indent.indentshiftfirst !== MML.INDENTSHIFT.INDENTSHIFT) {indent.indentshift = indent.indentshiftfirst}
|
||||
if (indent.indentshift === "auto") {indent.indentshift = this.displayIndent}
|
||||
var eqn = svg; svg = this.SVG();
|
||||
svg.width = SVG.cwidth+"px"; svg.w = SVG.length2em(svg.width);
|
||||
var shift = (indent.indentshift ? SVG.length2em(indent.indentshift,mu) : 0);
|
||||
var labelshift = SVG.length2em(values.minlabelspacing,mu);
|
||||
var eqn = svg; svg = this.SVG();
|
||||
if (indent.indentalign === MML.INDENTALIGN.CENTER) {
|
||||
svg.w = svg.r = SVG.length2em(SVG.cwidth+"px"); shift = 0; svg.hasIndent = true;
|
||||
} else if (CALIGN[LABEL] !== indent.indentalign) {
|
||||
svg.w = svg.r = SVG.length2em(SVG.cwidth+"px") - shift - labelshift;
|
||||
shift = labelshift = 0;
|
||||
} else {
|
||||
svg.w = svg.r = eqn.w + shift;
|
||||
svg.hasIndent = true;
|
||||
}
|
||||
svg.Align(eqn,indent.indentalign,shift,0);
|
||||
svg.Align(C[LABEL],CALIGN[LABEL],SVG.length2em(values.minlabelspacing,mu),0);
|
||||
svg.Align(C[LABEL],CALIGN[LABEL],labelshift,0);
|
||||
}
|
||||
|
||||
this.SVGsaveData(svg);
|
||||
|
|
|
@ -800,6 +800,7 @@
|
|||
}
|
||||
delete svg.element;
|
||||
}
|
||||
if (svg.hasIndent) {this.hasIndent = svg.hasIndent}
|
||||
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}
|
||||
|
@ -1864,7 +1865,7 @@
|
|||
div.style.textAlign = values.indentalign;
|
||||
if (values.indentshiftfirst !== MML.INDENTSHIFT.INDENTSHIFT) {values.indentshift = values.indentshiftfirst}
|
||||
if (values.indentshift === "auto") {values.indentshift = this.displayIndent}
|
||||
if (values.indentshift && values.indentalign !== MML.INDENTALIGN.CENTER) {
|
||||
if (values.indentshift && values.indentalign !== MML.INDENTALIGN.CENTER && !svg.hasIndent) {
|
||||
span.style[{left:"marginLeft",right:"marginRight"}[values.indentalign]] =
|
||||
SVG.Ex(SVG.length2em(values.indentshift));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user