Skip to content

Commit 51fda7d

Browse files
committed
Merge pull request #563 from fred-wang/issue556
Fixes issue #556
2 parents 86a908b + be96d3d commit 51fda7d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

unpacked/MathJax.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
if (document.getElementById && document.childNodes && document.createElement) {
3131

32-
if (!window.MathJax) {window.MathJax= {}}
32+
if (window.MathJax) {window.MathJax = {AuthorConfig: window.MathJax}} else {window.MathJax = {}}
3333
if (!MathJax.Hub) { // skip if already loaded
3434

3535
MathJax.version = "2.2";
@@ -2334,6 +2334,10 @@ MathJax.Hub.Startup = {
23342334
}
23352335
}
23362336
//
2337+
// Perform author configuration from in-line MathJax = {...}
2338+
//
2339+
this.queue.Push(["Config",MathJax.Hub,MathJax.AuthorConfig]);
2340+
//
23372341
// Run the deprecated configuration script, if any (ignoring return value)
23382342
// Wait for the startup delay signal
23392343
// Run the mathjax-config blocks
@@ -2357,7 +2361,7 @@ MathJax.Hub.Startup = {
23572361
return delay;
23582362
},
23592363
//
2360-
// Run the scipts of type=text/x-mathajx-config
2364+
// Run the scripts of type=text/x-mathjax-config
23612365
//
23622366
ConfigBlocks: function () {
23632367
var scripts = document.getElementsByTagName("script");
@@ -3021,6 +3025,7 @@ MathJax.Hub.Startup = {
30213025
});
30223026
HUB.Browser.Select(MathJax.Message.browsers);
30233027

3028+
if (BASE.AuthorConfig && typeof BASE.AuthorConfig.AuthorInit === "function") {BASE.AuthorConfig.AuthorInit()}
30243029
HUB.queue = BASE.Callback.Queue();
30253030
HUB.queue.Push(
30263031
["Post",STARTUP.signal,"Begin"],

0 commit comments

Comments
 (0)