MathJax 2.0 update mostly works!
This commit is contained in:
parent
f5df298230
commit
83a8af23f8
|
@ -10,8 +10,8 @@ mathJax.loaded = false;
|
||||||
|
|
||||||
mathJax.Config = function() {
|
mathJax.Config = function() {
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
root: mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax/',
|
root: mediaWiki.config.get('wgExtensionAssetsPath') + '/Math/modules/MathJax',
|
||||||
config: "TeX-AMS-texvc_HTML.js",
|
//config: "TeX-AMS-texvc_HTML.js",
|
||||||
"v1.0-compatible": false,
|
"v1.0-compatible": false,
|
||||||
styles: { ".mtext": { "font-family": "sans-serif ! important", "font-size": "80%" } },
|
styles: { ".mtext": { "font-family": "sans-serif ! important", "font-size": "80%" } },
|
||||||
displayAlign: "left",
|
displayAlign: "left",
|
||||||
|
@ -21,14 +21,18 @@ mathJax.Config = function() {
|
||||||
MathJax.Message.styles["#MathJax_Message"].right = MathJax.Message.styles["#MathJax_Message"].left;
|
MathJax.Message.styles["#MathJax_Message"].right = MathJax.Message.styles["#MathJax_Message"].left;
|
||||||
delete MathJax.Message.styles["#MathJax_Message"].left;
|
delete MathJax.Message.styles["#MathJax_Message"].left;
|
||||||
if ( typeof(mathJax.userConfig) !== "undefined" ) MathJax.Hub.Config( mathJax.userConfig );
|
if ( typeof(mathJax.userConfig) !== "undefined" ) MathJax.Hub.Config( mathJax.userConfig );
|
||||||
if ( typeof(mathJax.fontDir) !== "undefined" ) MathJax.OutputJax.fontDir = mathJax.fontDir; else MathJax.Hub.Config({ NativeMML: {webFont: null} });
|
//if ( typeof(mathJax.fontDir) !== "undefined" ) MathJax.OutputJax.fontDir = mathJax.fontDir; else MathJax.Hub.Config({ NativeMML: {webFont: null} });
|
||||||
MathJax.Hub.Register.StartupHook("End Extensions", function() {
|
MathJax.Hub.Register.StartupHook("End Extensions", function() {
|
||||||
|
/*
|
||||||
|
// this section is newly commented out while updating to MJ 2.0
|
||||||
var TEX = MathJax.InputJax.TeX;
|
var TEX = MathJax.InputJax.TeX;
|
||||||
var MACROS = TEX.config.Macros;
|
var MACROS = TEX.config.Macros;
|
||||||
for (var id in MACROS) {
|
for (var id in MACROS) {
|
||||||
if (typeof(MACROS[id]) === "string") TEX.Macro(id, MACROS[id]);
|
if (typeof(MACROS[id]) === "string") TEX.Macro(id, MACROS[id]);
|
||||||
else TEX.Macro(id, MACROS[id][0], MACROS[id][1]);
|
else TEX.Macro(id, MACROS[id][0], MACROS[id][1]);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
// this next section was already commented out
|
||||||
/* TEX.Parse.Augment({
|
/* TEX.Parse.Augment({
|
||||||
Cr: function(name) {
|
Cr: function(name) {
|
||||||
this.GetBrackets(name);
|
this.GetBrackets(name);
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
MathJax.Ajax.Preloading(
|
||||||
|
"[MathJax]/jax/input/TeX/config.js",
|
||||||
|
"[MathJax]/jax/output/HTML-CSS/config.js",
|
||||||
|
"[MathJax]/extensions/tex2jax.js",
|
||||||
|
"[MathJax]/extensions/MathEvents.js",
|
||||||
|
"[MathJax]/extensions/MathZoom.js",
|
||||||
|
"[MathJax]/extensions/MathMenu.js",
|
||||||
|
"[MathJax]/jax/element/mml/jax.js",
|
||||||
|
"[MathJax]/extensions/toMathML.js",
|
||||||
|
"[MathJax]/extensions/TeX/noErrors.js",
|
||||||
|
"[MathJax]/extensions/TeX/noUndefined.js",
|
||||||
|
"[MathJax]/jax/input/TeX/jax.js",
|
||||||
|
"[MathJax]/extensions/TeX/AMSmath.js",
|
||||||
|
"[MathJax]/extensions/TeX/AMSsymbols.js",
|
||||||
|
"[MathJax]/jax/output/HTML-CSS/jax.js",
|
||||||
|
"[MathJax]/jax/output/HTML-CSS/autoload/mtable.js"
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue