Merge branch 'issue236' into develop

This commit is contained in:
Davide P. Cervone 2012-09-09 06:51:47 -04:00
commit 1abbc73414
16 changed files with 50 additions and 41 deletions

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
*/
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.0.6",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.0.7",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

View File

@ -22,7 +22,7 @@
*/
MathJax.Extension["TeX/AMSmath"] = {
version: "2.0.2",
version: "2.0.3",
number: 0, // current equation number
startNumber: 0, // current starting equation number (for when equation is restarted)
@ -41,7 +41,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
STACKITEM = TEX.Stack.Item,
CONFIG = TEX.config.equationNumbers;
var COLS = function (W) {return W.join("em ") + "em"};
var COLS = function (W) {
var WW = [];
for (var i = 0, m = W.length; i < m; i++)
{WW[i] = TEX.Parse.prototype.Em(W[i])}
return WW.join(" ");
};
/******************************************************************************/

View File

@ -24,7 +24,7 @@
MathJax.InputJax.TeX = MathJax.InputJax({
id: "TeX",
version: "2.0.6",
version: "2.0.7",
directory: MathJax.InputJax.directory + "/TeX",
extensionDir: MathJax.InputJax.extensionDir + "/TeX",

View File

@ -296,7 +296,7 @@
}
if (this.rowspacing) {
var rows = this.arraydef.rowspacing.split(/ /);
while (rows.length < this.table.length) {rows.push(this.rowspacing)}
while (rows.length < this.table.length) {rows.push(this.rowspacing+"em")}
this.arraydef.rowspacing = rows.join(' ');
}
},
@ -1613,7 +1613,7 @@
var n;
if (this.string.charAt(this.i) === "[") {
n = this.GetBrackets(name,"").replace(/ /g,"");
if (n && !n.match(/^(((\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|mm|cm|in|pc))$/))
if (n && !n.match(/^((-?(\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|mm|cm|in|pc))$/))
{TEX.Error("Bracket argument to "+name+" must be a dimension")}
}
this.Push(STACKITEM.cell().With({isCR: true, name: name, linebreak: true}));
@ -1622,8 +1622,8 @@
if (n && top.arraydef.rowspacing) {
var rows = top.arraydef.rowspacing.split(/ /);
if (!top.rowspacing) {top.rowspacing = this.dimen2em(rows[0])}
while (rows.length < top.table.length) {rows.push(top.rowspacing)}
rows[top.table.length-1] = (top.rowspacing+this.dimen2em(n)) + "em";
while (rows.length < top.table.length) {rows.push(this.Em(top.rowspacing))}
rows[top.table.length-1] = this.Em(Math.max(0,top.rowspacing+this.dimen2em(n)));
top.arraydef.rowspacing = rows.join(' ');
}
} else {
@ -1633,7 +1633,7 @@
},
emPerInch: 7.2,
dimen2em: function (dim) {
var match = dim.match(/^((?:\.\d+|\d+(?:\.\d*)?))(pt|em|ex|mu|pc|in|mm|cm)/);
var match = dim.match(/^(-?(?:\.\d+|\d+(?:\.\d*)?))(pt|em|ex|mu|pc|in|mm|cm)/);
var m = parseFloat(match[1]||"1"), unit = match[2];
if (unit === "em") {return m}
if (unit === "ex") {return m * .43}
@ -1645,6 +1645,10 @@
if (unit === "mu") {return m / 18}
return 0;
},
Em: function (m) {
if (Math.abs(m) < .0006) {return "0em"}
return m.toFixed(3).replace(/\.?0+$/,"") + "em";
},
HLine: function (name,style) {
if (style == null) {style = "solid"}