content-mathml extension: load config from MathJax.Hub.Config

Config is loaded from `MathML.content-mathml`, and extends the CToP.settings object.
This commit is contained in:
Christian Perfect 2014-05-02 15:44:58 +01:00
parent 86a6c173cf
commit c17c4e6dfa

View File

@ -44,7 +44,7 @@
*/ */
MathJax.Extension["MathML/content-mathml"] = (function() { MathJax.Extension["MathML/content-mathml"] = (function(HUB) {
/* /*
* Content MathML to Presentation MathML conversion * Content MathML to Presentation MathML conversion
* *
@ -52,9 +52,7 @@ MathJax.Extension["MathML/content-mathml"] = (function() {
* *
*/ */
var CToP = { var CONFIG = HUB.CombineConfig("MathML.content-mathml",{
version: '2.4',
settings: {
// render `a+(-b)` as `a-b`? // render `a+(-b)` as `a-b`?
collapsePlusMinus: true, collapsePlusMinus: true,
@ -70,7 +68,11 @@ MathJax.Extension["MathML/content-mathml"] = (function() {
"gamma": '\u03B3' "gamma": '\u03B3'
} }
}, });
var CToP = {
version: '2.4',
settings: CONFIG,
/* Transform the given <math> elements from Content MathML to Presentation MathML and replace the original elements /* Transform the given <math> elements from Content MathML to Presentation MathML and replace the original elements
*/ */
@ -1629,7 +1631,7 @@ CToP.applyTokens["partialdiff"] = function(parentNode,contentMMLNode,firstArg,ar
} }
return CToP; return CToP;
})(); })(MathJax.Hub);
MathJax.Hub.Register.StartupHook("MathML Jax Ready",function () { MathJax.Hub.Register.StartupHook("MathML Jax Ready",function () {