Merge branch 'v2.2-latest'

This commit is contained in:
Davide P. Cervone 2013-05-22 15:15:27 -04:00
commit 6ba3072b74
21 changed files with 53 additions and 52 deletions

1
README-branch.txt Normal file
View File

@ -0,0 +1 @@
This is release branch v2.2 of MathJax.

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

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

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.2",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.2.1",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -265,7 +265,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var den = this.ParseArg(name); var den = this.ParseArg(name);
var frac = MML.mfrac(num,den); var frac = MML.mfrac(num,den);
if (thick !== "") {frac.linethickness = thick} if (thick !== "") {frac.linethickness = thick}
if (left || right) {frac = TEX.mfenced(left,frac,right)} if (left || right) {frac = TEX.fenced(left,frac,right)}
if (style !== "") { if (style !== "") {
var STYLE = (["D","T","S","SS"])[style]; var STYLE = (["D","T","S","SS"])[style];
if (STYLE == null) if (STYLE == null)

View File

@ -27,7 +27,7 @@
MathJax.InputJax.TeX = MathJax.InputJax({ MathJax.InputJax.TeX = MathJax.InputJax({
id: "TeX", id: "TeX",
version: "2.2", version: "2.2.1",
directory: MathJax.InputJax.directory + "/TeX", directory: MathJax.InputJax.directory + "/TeX",
extensionDir: MathJax.InputJax.extensionDir + "/TeX", extensionDir: MathJax.InputJax.extensionDir + "/TeX",

View File

@ -186,7 +186,7 @@
if (this.open || this.close) { if (this.open || this.close) {
mml.texClass = MML.TEXCLASS.INNER; mml.texClass = MML.TEXCLASS.INNER;
mml.texWithDelims = true; mml.texWithDelims = true;
mml = TEX.mfenced(this.open,mml,this.close); mml = TEX.fenced(this.open,mml,this.close);
} }
return [STACKITEM.mml(mml), item]; return [STACKITEM.mml(mml), item];
} }
@ -200,7 +200,7 @@
stopError: /*_()*/ ["ExtraLeftMissingRight", "Extra \\left or missing \\right"], stopError: /*_()*/ ["ExtraLeftMissingRight", "Extra \\left or missing \\right"],
checkItem: function (item) { checkItem: function (item) {
if (item.type === "right") if (item.type === "right")
{return STACKITEM.mml(TEX.mfenced(this.delim,this.mmlData(),item.delim))} {return STACKITEM.mml(TEX.fenced(this.delim,this.mmlData(),item.delim))}
return this.SUPER(arguments).checkItem.call(this,item); return this.SUPER(arguments).checkItem.call(this,item);
} }
}); });
@ -276,7 +276,7 @@
if ((this.arraydef.columnlines||"none") != "none" || if ((this.arraydef.columnlines||"none") != "none" ||
(this.arraydef.rowlines||"none") != "none") {mml.padding = 0} // HTML-CSS jax implements this (this.arraydef.rowlines||"none") != "none") {mml.padding = 0} // HTML-CSS jax implements this
} }
if (this.open || this.close) {mml = TEX.mfenced(this.open,mml,this.close)} if (this.open || this.close) {mml = TEX.fenced(this.open,mml,this.close)}
mml = STACKITEM.mml(mml); mml = STACKITEM.mml(mml);
if (this.requireClose) { if (this.requireClose) {
if (item.type === 'close') {return mml} if (item.type === 'close') {return mml}
@ -2122,14 +2122,14 @@
}, },
/* /*
* Create an mrow that represents the equivalent of an mfenced * Create an mrow that has stretchy delimiters at either end, as needed
*/ */
mfenced: function (open,mml,close) { fenced: function (open,mml,close) {
var mrow = MML.mrow(); var mrow = MML.mrow();
mrow.open = open; mrow.close = close; mrow.open = open; mrow.close = close;
if (open) {mrow.Append(MML.mo(open).With({fence:true, texClass:MML.TEXCLASS.OPEN}))} if (open) {mrow.Append(MML.mo(open).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.OPEN}))}
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(MML.mo(close).With({fence:true, texClass:MML.TEXCLASS.CLOSE}))} if (close) {mrow.Append(MML.mo(close).With({fence:true, stretchy:true, texClass:MML.TEXCLASS.CLOSE}))}
return mrow; return mrow;
}, },

View File

@ -25,7 +25,7 @@
*/ */
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var VERSION = "2.2"; var VERSION = "2.2.1";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"]; HTMLCSS = MathJax.OutputJax["HTML-CSS"];
@ -76,8 +76,8 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
HD = bbox.h + bbox.d; HD = bbox.h + bbox.d;
if (HD) { if (HD) {
min = HTMLCSS.length2em(min,mu,HD); min = HTMLCSS.length2em(min,mu,HD);
if (min*bbox.h/HD > H[j]) {H[j] = min*bbox.h/HD} if (min*bbox.h/HD > H[i]) {H[i] = min*bbox.h/HD}
if (min*bbox.d/HD > D[j]) {D[j] = min*bbox.d/HD} if (min*bbox.d/HD > D[i]) {D[i] = min*bbox.d/HD}
} }
} else if (mo.HTMLcanStretch("Horizontal")) { } else if (mo.HTMLcanStretch("Horizontal")) {
min = HTMLCSS.length2em(min,mu,bbox.w); min = HTMLCSS.length2em(min,mu,bbox.w);