Merge branch 'issue856' into develop. Issue #856.

This commit is contained in:
Davide P. Cervone 2014-08-19 09:04:05 -04:00
commit 6ba49d616e

View File

@ -1653,7 +1653,7 @@
CrLaTeX: function (name) {
var n;
if (this.string.charAt(this.i) === "[") {
n = this.GetBrackets(name,"").replace(/ /g,"");
n = this.GetBrackets(name,"").replace(/ /g,"").replace(/,/,".");
if (n && !this.matchDimen(n)) {
TEX.Error(["BracketMustBeDimension",
"Bracket argument to %1 must be a dimension",name]);
@ -1920,14 +1920,14 @@
if (this.nextIsSpace()) {this.i++}
if (this.string.charAt(this.i) == '{') {
dimen = this.GetArgument(name);
if (dimen.match(/^\s*([-+]?(\.\d+|\d+(\.\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)\s*$/))
{return dimen.replace(/ /g,"")}
if (dimen.match(/^\s*([-+]?([.,]\d+|\d+([.,]\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)\s*$/))
{return dimen.replace(/ /g,"").replace(/,/,".")}
} else {
dimen = this.string.slice(this.i);
var match = dimen.match(/^\s*(([-+]?(\.\d+|\d+(\.\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)) ?/);
var match = dimen.match(/^\s*(([-+]?([.,]\d+|\d+([.,]\d*)?))\s*(pt|em|ex|mu|px|mm|cm|in|pc)) ?/);
if (match) {
this.i += match[0].length;
return match[1].replace(/ /g,"");
return match[1].replace(/ /g,"").replace(/,/,".");
}
}
TEX.Error(["MissingDimOrUnits",