Commit 68f6aa8c by David Baumgold

Merge pull request #1404 from edx/db/requirejs-configure-mathjax

Configure MathJax using require.js
parents fb62f0c5 97941530
......@@ -35,7 +35,7 @@ requirejs.config({
"draggabilly": "xmodule_js/common_static/js/vendor/draggabilly.pkgd",
"domReady": "xmodule_js/common_static/js/vendor/domReady",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext",
"tender": "//edxedge.tenderapp.com/tender_widget"
......@@ -116,7 +116,19 @@ requirejs.config({
exports: "tinymce"
},
"mathjax": {
exports: "MathJax"
exports: "MathJax",
init: ->
MathJax.Hub.Config
tex2jax:
inlineMath: [
["\\(","\\)"],
['[mathjaxinline]','[/mathjaxinline]']
]
displayMath: [
["\\[","\\]"],
['[mathjax]','[/mathjax]']
]
MathJax.Hub.Configured()
},
"xmodule": {
exports: "XModule"
......
......@@ -35,7 +35,7 @@ requirejs.config({
"draggabilly": "xmodule_js/common_static/js/vendor/draggabilly.pkgd",
"domReady": "xmodule_js/common_static/js/vendor/domReady",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext",
"tender": "//edxedge.tenderapp.com/tender_widget.js"
......@@ -116,7 +116,19 @@ requirejs.config({
exports: "tinymce"
},
"mathjax": {
exports: "MathJax"
exports: "MathJax",
init: ->
MathJax.Hub.Config
tex2jax:
inlineMath: [
["\\(","\\)"],
['[mathjaxinline]','[/mathjaxinline]']
]
displayMath: [
["\\[","\\]"],
['[mathjax]','[/mathjax]']
]
MathJax.Hub.Configured();
},
"xmodule": {
exports: "XModule"
......
......@@ -71,7 +71,7 @@ var require = {
// externally hosted files
"tender": "//edxedge.tenderapp.com/tender_widget",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full",
"mathjax": "//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
// and leaves the path component intact.
......@@ -159,7 +159,22 @@ var require = {
exports: "tinymce"
},
"mathjax": {
exports: "MathJax"
exports: "MathJax",
init: function() {
MathJax.Hub.Config({
tex2jax: {
inlineMath: [
["\\(","\\)"],
['[mathjaxinline]','[/mathjaxinline]']
],
displayMath: [
["\\[","\\]"],
['[mathjax]','[/mathjax]']
]
}
});
MathJax.Hub.Configured();
}
},
"xblock/core": {
exports: "XBlock",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment