Make fractions be TeX class ORD rather than INNER (as appears to be the case with TeX, despite the claims in the TeXbook to the contrary). Also, fix a problem with getting the correct form attribute for mo elements. Resolves issue #969.
This commit is contained in:
parent
142857afa2
commit
9a3f435a99
|
@ -561,8 +561,8 @@ MathJax.ElementJax.mml.Augment({
|
||||||
if (!def) {def = this.CheckRange(mo)}
|
if (!def) {def = this.CheckRange(mo)}
|
||||||
if (!def && nodefault) {def = {}} else {
|
if (!def && nodefault) {def = {}} else {
|
||||||
if (!def) {def = MathJax.Hub.Insert({},this.defaultDef)}
|
if (!def) {def = MathJax.Hub.Insert({},this.defaultDef)}
|
||||||
|
if (this.parent) {this.def = def} else {def = MathJax.Hub.Insert({},def)}
|
||||||
def.form = forms[0];
|
def.form = forms[0];
|
||||||
this.def = def;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.useMMLspacing &= ~(this.SPACE_ATTR[name] || 0);
|
this.useMMLspacing &= ~(this.SPACE_ATTR[name] || 0);
|
||||||
|
@ -802,7 +802,7 @@ MathJax.ElementJax.mml.Augment({
|
||||||
this.getPrevClass(prev); prev = null;
|
this.getPrevClass(prev); prev = null;
|
||||||
for (i = 0; i < m; i++)
|
for (i = 0; i < m; i++)
|
||||||
{if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}}
|
{if (this.data[i]) {prev = this.data[i].setTeXclass(prev)}}
|
||||||
this.texClass = MML.TEXCLASS.INNER;
|
if (!this.hasOwnProperty("texClass")) this.texClass = MML.TEXCLASS.INNER;
|
||||||
return this;
|
return this;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
@ -824,7 +824,6 @@ MathJax.ElementJax.mml.Augment({
|
||||||
MML.mfrac = MML.mbase.Subclass({
|
MML.mfrac = MML.mbase.Subclass({
|
||||||
type: "mfrac", num: 0, den: 1,
|
type: "mfrac", num: 0, den: 1,
|
||||||
linebreakContainer: true,
|
linebreakContainer: true,
|
||||||
texClass: MML.TEXCLASS.INNER,
|
|
||||||
isEmbellished: MML.mbase.childEmbellished,
|
isEmbellished: MML.mbase.childEmbellished,
|
||||||
Core: MML.mbase.childCore,
|
Core: MML.mbase.childCore,
|
||||||
CoreMO: MML.mbase.childCoreMO,
|
CoreMO: MML.mbase.childCoreMO,
|
||||||
|
|
|
@ -185,7 +185,6 @@
|
||||||
var mml = MML.mfrac(this.num,this.mmlData(false));
|
var mml = MML.mfrac(this.num,this.mmlData(false));
|
||||||
if (this.thickness != null) {mml.linethickness = this.thickness}
|
if (this.thickness != null) {mml.linethickness = this.thickness}
|
||||||
if (this.open || this.close) {
|
if (this.open || this.close) {
|
||||||
mml.texClass = MML.TEXCLASS.INNER;
|
|
||||||
mml.texWithDelims = true;
|
mml.texWithDelims = true;
|
||||||
mml = TEX.fixedFence(this.open,mml,this.close);
|
mml = TEX.fixedFence(this.open,mml,this.close);
|
||||||
}
|
}
|
||||||
|
@ -2194,7 +2193,7 @@
|
||||||
* Create an mrow that has \mathchoice using \bigg and \big for the delimiters
|
* Create an mrow that has \mathchoice using \bigg and \big for the delimiters
|
||||||
*/
|
*/
|
||||||
fixedFence: function (open,mml,close) {
|
fixedFence: function (open,mml,close) {
|
||||||
var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER});
|
var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.ORD});
|
||||||
if (open) {mrow.Append(this.mathPalette(open,"l"))}
|
if (open) {mrow.Append(this.mathPalette(open,"l"))}
|
||||||
if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)}
|
if (mml.type === "mrow") {mrow.Append.apply(mrow,mml.data)} else {mrow.Append(mml)}
|
||||||
if (close) {mrow.Append(this.mathPalette(close,"r"))}
|
if (close) {mrow.Append(this.mathPalette(close,"r"))}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user