commit ea98a6e56284ad04cd9dd8528544deaf886c2428
parent ecbfb344c3092b48f089b8b2ac360fa9dfe0739c
Author: Davide P. Cervone <dpvc@union.edu>
Date: Mon, 2 Nov 2015 09:22:36 -0500
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.
Diffstat:
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
@@ -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}));
diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
@@ -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;