--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
decimal: ','
<script type="text/x-mathjax-config">MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {function removeCommas(n) {return n.replace(/,/g,'')}MathJax.InputJax.AsciiMath.prefilterHooks.Add(function (data) {data.math = data.math.replace(/\d{1,3}(?:\,\d\d\d)+/g,removeCommas);});});</script>
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
function addCommas(n){
var parts = n.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(".");
};
function removeCommas(n) {
return n.replace(/,/g,'')
};
MathJax.InputJax.AsciiMath.prefilterHooks.Add(function (data) {
data.math = data.math.replace(/\d{1,3}(?:\,\d{3})+/g,removeCommas);
});
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data) {
???;
});
});
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {function removeCommas(n) {
return n.replace(/,/g,'');}function addCommas(n){return n.replace(/\B(?=(\d{3})+(?!\d))/g, ",");}function recursiveAddCommas(node) {if (node.isToken) {if (node.type === 'mn') {node.data[0].data[0] = addCommas(node.data[0].data[0]);}} else {for (var i = 0, m = node.data.length; i < m; i++) {recursiveAddCommas(node.data[i]);
}}}MathJax.InputJax.AsciiMath.prefilterHooks.Add(function (data) {data.math = data.math.replace(/\d{1,3}(?:\,\d{3})+/g, removeCommas);});MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data) {
recursiveAddCommas(data.math.root);});});
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("AsciiMath Jax Ready", function () {
function addCommas(n){
var parts = n.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(".");
};
function removeCommas(n) {
return n.replace(/,/g,'')
};
function recursiveAddCommas(node) {
if (node.isToken) {
if (node.type === 'mn') {
node.data[0].data[0] = addCommas(node.data[0].data[0]);
}
}
else {
for (var i = 0, m = node.data.length; i < m; i++) {
recursiveAddCommas(node.data[i]);
}
}
}
MathJax.InputJax.AsciiMath.prefilterHooks.Add(function (data) {
data.math = data.math.replace(/\d{1,3}(?:\,\d{3})+/g,removeCommas);
});
MathJax.InputJax.AsciiMath.postfilterHooks.Add(function (data) {
recursiveAddCommas(data.math.root);
});
});
</script>