Make height/depth of horizontal stretchy characters be maximum of the height/depth of the component parts, rather than TeX's approach of using the extender's height and depth. Also, make over-brace and other over macros not set accent=false so they match TeX and the under versions better. Resolves #1255.
This commit is contained in:
parent
ecbfb344c3
commit
ea98a6e562
|
@ -798,8 +798,8 @@
|
|||
limits: ['Limits',1],
|
||||
nolimits: ['Limits',0],
|
||||
|
||||
overline: ['UnderOver','00AF'],
|
||||
underline: ['UnderOver','005F'],
|
||||
overline: ['UnderOver','00AF',null,1],
|
||||
underline: ['UnderOver','005F',null,1],
|
||||
overbrace: ['UnderOver','23DE',1],
|
||||
underbrace: ['UnderOver','23DF',1],
|
||||
overparen: ['UnderOver','23DC'],
|
||||
|
@ -1428,7 +1428,7 @@
|
|||
this.Push(MML.TeXAtom(MML.munderover(c,null,mml).With({accent: true})));
|
||||
},
|
||||
|
||||
UnderOver: function (name,c,stack) {
|
||||
UnderOver: function (name,c,stack,noaccent) {
|
||||
var pos = {o: "over", u: "under"}[name.charAt(1)];
|
||||
var base = this.ParseArg(name);
|
||||
if (base.Get("movablelimits")) {base.movablelimits = false}
|
||||
|
@ -1439,7 +1439,7 @@
|
|||
var mml = MML.munderover(base,null,null);
|
||||
mml.SetData(
|
||||
mml[pos],
|
||||
this.mmlToken(MML.mo(MML.entity("#x"+c)).With({stretchy:true, accent:(pos==="under")}))
|
||||
this.mmlToken(MML.mo(MML.entity("#x"+c)).With({stretchy:true, accent:!noaccent}))
|
||||
);
|
||||
if (stack) {mml = MML.TeXAtom(mml).With({texClass:MML.TEXCLASS.OP, movesupsub:true})}
|
||||
this.Push(mml.With({subsupOK:true}));
|
||||
|
|
|
@ -1433,9 +1433,9 @@
|
|||
this.placeBox(right,x,0,true);
|
||||
span.bbox = {
|
||||
w: x+right.bbox.rw, lw: 0, rw: x+right.bbox.rw,
|
||||
H: Math.max(left.bbox.h,rep.bbox.h,right.bbox.h,mid.bbox.h),
|
||||
D: Math.max(left.bbox.d,rep.bbox.d,right.bbox.d,mid.bbox.d),
|
||||
h: rep.bbox.h, d: rep.bbox.d, exactW: true
|
||||
h: Math.max(left.bbox.h,rep.bbox.h,right.bbox.h,mid.bbox.h),
|
||||
d: Math.max(left.bbox.d,rep.bbox.d,right.bbox.d,mid.bbox.d),
|
||||
exactW: true
|
||||
}
|
||||
span.scale = scale;
|
||||
span.isMultiChar = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user