Make sure mmultiscripts aligns HTML-CSS color element for prescripts.
This commit is contained in:
parent
d536272781
commit
d3201ada44
|
@ -139,14 +139,14 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
var w = box[k+1].bbox.w - box[k].bbox.w;
|
||||
if (w > 0) {
|
||||
if (isPre) {
|
||||
box[k].style.paddingLeft = HTMLCSS.Em(w/(box[k].scale||1));
|
||||
this.HTMLmoveColor(box[k],w,1);
|
||||
BOX[k].w += w;
|
||||
} else {
|
||||
HTMLCSS.createBlank(sub,w);
|
||||
}
|
||||
} else if (w < 0) {
|
||||
if (isPre) {
|
||||
box[k+1].style.paddingLeft = HTMLCSS.Em(-w/(box[k+1].scale||1));
|
||||
this.HTMLmoveColor(box[k+1],-w,-1);
|
||||
BOX[k+1].w += -w;
|
||||
} else {
|
||||
HTMLCSS.createBlank(sup,-w);
|
||||
|
@ -179,6 +179,16 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
|
|||
}
|
||||
return BOX;
|
||||
},
|
||||
HTMLmoveColor: function (box,w,sign) {
|
||||
var W = w/(box.scale||1);
|
||||
box.style.paddingLeft = HTMLCSS.Em(W);
|
||||
var color = box.previousSibling;
|
||||
if (color && (color.id||"").match(/^MathJax-Color-/)) {
|
||||
color.style.marginLeft = HTMLCSS.Em(W+parseFloat(color.style.marginLeft));
|
||||
color.style.marginRight = HTMLCSS.Em(sign*(W-parseFloat(color.style.marginRight)));
|
||||
}
|
||||
|
||||
},
|
||||
HTMLstretchH: MML.mbase.HTMLstretchH,
|
||||
HTMLstretchV: MML.mbase.HTMLstretchV
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user