Merge branch 'v2.0-candidate' of https://github.com/dpvc/MathJax into doc-update

This commit is contained in:
Davide P. Cervone 2012-02-22 11:59:48 -05:00
commit e238e7cabd
8 changed files with 160 additions and 31 deletions

File diff suppressed because one or more lines are too long

View File

@ -689,7 +689,7 @@ MathJax.Hub.Config({
// EqChunkDelay is the time (in milliseconds) to delay between chunks // EqChunkDelay is the time (in milliseconds) to delay between chunks
// (to allow the browser to respond to other user interaction). // (to allow the browser to respond to other user interaction).
// //
// Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get // Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get
// the behavior from MathJax v1.1 and below. // the behavior from MathJax v1.1 and below.
// //
EqnChunk: 50, EqnChunk: 50,
@ -838,7 +838,7 @@ MathJax.Hub.Config({
// //
// This controls whether the MathML structure is retained and CSS // This controls whether the MathML structure is retained and CSS
// classes are used to mark the original MathML elements (as in the // classes are added to mark the original MathML elements (as in the
// HTML-CSS output). By default, the SVG output jax removes unneeded // HTML-CSS output). By default, the SVG output jax removes unneeded
// nesting in order to produce a more efficient markup, but if you // nesting in order to produce a more efficient markup, but if you
// want to use CSS to style the elements as if they were MathML, you // want to use CSS to style the elements as if they were MathML, you
@ -941,7 +941,7 @@ MathJax.Hub.Config({
// this long, the menu will appear. (The menu also will appear if you // this long, the menu will appear. (The menu also will appear if you
// click on the label.) It is in milliseconds. // click on the label.) It is in milliseconds.
// //
delay: 400, delay: 150,
// //
// This is the URL for the MathJax Help menu item. // This is the URL for the MathJax Help menu item.
@ -979,6 +979,20 @@ MathJax.Hub.Config({
}, },
//============================================================================
//
// These parameters control the contextual menus that are available on the
// mathematics within the page (provided the showMathMenu value is true above).
//
MathEvents: {
//
// This is the time required for the mouse to be held still over a
// typeset equation in order for it to count as a hover (used when the
// zoom trigger is "Hover"). It is in milliseconds.
//
hover: 500
},
//============================================================================ //============================================================================
// //
// These parameters control the MMLorHTML configuration file. // These parameters control the MMLorHTML configuration file.

View File

@ -0,0 +1,16 @@
/*
* /MathJax/extensions/TeX/autoload-all.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Extension["TeX/autoload-all"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var h=MathJax.InputJax.TeX,c=h.Definitions.macros,g=h.Definitions.environment;var f={action:["mathtip","texttip","toggle"],AMSmath:["mathring","nobreakspace","negmedspace","negthickspace","intI","iiiint","idotsint","dddot","ddddot","sideset","boxed","substack","injlim","projlim","varliminf","varlimsup","varinjlim","varprojlim","DeclareMathOperator","operatorname","genfrac","tfrac","dfrac","binom","tbinom","dbinom","cfrac","shoveleft","shoveright","xrightarrow","xleftarrow"],begingroup:["begingroup","endgroup","gdef","global"],cancel:["cancel","bcancel","xcancel","cancelto"],color:["color","colorbox","fcolorbox"],enclose:["enclose"],extpfeil:["Newextarrow","xlongequal","xmapsto","xtofrom","xtwoheadleftarrow","xtwoheadrightarrow"],mhchem:["ce","cee","cf"]};for(var b in f){if(f.hasOwnProperty(b)){var e=f[b];for(var d=0,a=e.length;d<a;d++){c[e[d]]=["Extension",b]}}}g.subarray=["ExtensionEnv",null,"AMSmath"];g.smallmatrix=["ExtensionEnv",null,"AMSmath"];g.equation=["ExtensionEnv",null,"AMSmath"];g["equation*"]=["ExtensionEnv",null,"AMSmath"];MathJax.Hub.Startup.signal.Post("TeX autoload-all Ready")});MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/TeX/AMSsymbols.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/TeX/autoload-all.js"]);

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Extension["TeX/color"]={version:"2.0",config:MathJax.Hub.CombineConfig("TeX.color",{padding:"5px",border:"2px"}),colors:{Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",LimeGreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"},getColor:function(a,c){if(!a){a="named"}var b=this["get_"+a];if(!b){this.TEX.Error("Color model '"+a+"' not defined")}return b.call(this,c)},get_rgb:function(b){b=b.split(/,/);var a="#";if(b.length!==3){this.TEX.Error("RGB colors require 3 decimal numbers")}for(var c=0;c<3;c++){if(!b[c].match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var d=parseFloat(b[c]);if(d<0||d>1){this.TEX.Error("RGB values must be between 0 and 1")}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error("Grey-scale values must be between 0 and 1")}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors[a]){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.macros.definecolor="DefineColor";d.Definitions.macros.colorbox="ColorBox";d.Definitions.macros.fcolorbox="fColorBox";d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js"); MathJax.Extension["TeX/color"]={version:"2.0",config:MathJax.Hub.CombineConfig("TeX.color",{padding:"5px",border:"2px"}),colors:{Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",LimeGreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"},getColor:function(a,c){if(!a){a="named"}var b=this["get_"+a];if(!b){this.TEX.Error("Color model '"+a+"' not defined")}return b.call(this,c)},get_rgb:function(b){b=b.split(/,/);var a="#";if(b.length!==3){this.TEX.Error("RGB colors require 3 decimal numbers")}for(var c=0;c<3;c++){if(!b[c].match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var d=parseFloat(b[c]);if(d<0||d>1){this.TEX.Error("RGB values must be between 0 and 1")}d=Math.floor(d*255).toString(16);if(d.length<2){d="0"+d}a+=d}return a},get_gray:function(a){if(!a.match(/^(\d+(\.\d*)?|\.\d+)$/)){this.TEX.Error("Invalid decimal number")}var b=parseFloat(a);if(b<0||b>1){this.TEX.Error("Grey-scale values must be between 0 and 1")}b=Math.floor(b*255).toString(16);if(b.length<2){b="0"+b}return"#"+b+b+b},get_named:function(a){if(this.colors[a]){return this.colors[a]}return a},padding:function(){var c="+"+this.config.padding;var a=this.config.padding.replace(/^.*?([a-z]*)$/,"$1");var b="+"+(2*parseFloat(c))+a;return{width:b,height:c,depth:c,lspace:this.config.padding}}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;var c=d.Stack.Item;var b=MathJax.Extension["TeX/color"];b.TEX=d;d.Definitions.macros.color="Color";d.Definitions.macros.definecolor="DefineColor";d.Definitions.macros.colorbox="ColorBox";d.Definitions.macros.fcolorbox="fColorBox";d.Parse.Augment({Color:function(h){var g=this.GetBrackets(h),e=this.GetArgument(h);e=b.getColor(g,e);var f=c.style().With({styles:{mathcolor:e}});this.stack.env.color=e;this.Push(f)},DefineColor:function(g){var f=this.GetArgument(g),e=this.GetArgument(g),h=this.GetArgument(g);b.colors[f]=b.getColor(e,h)},ColorBox:function(g){var f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f)}).With(b.padding()))},fColorBox:function(g){var h=this.GetArgument(g),f=this.GetArgument(g),e=this.InternalMath(this.GetArgument(g));this.Push(a.mpadded.apply(a,e).With({mathbackground:b.getColor("named",f),style:"border: "+b.config.border+" solid "+b.getColor("named",h)}).With(b.padding()))}});MathJax.Hub.Startup.signal.Post("TeX color Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/color.js");

View File

@ -366,7 +366,7 @@ MathJax.fileversion = "2.0";
}; };
// //
// An array of priorities hooks that are executed sequentially // An array of prioritized hooks that are executed sequentially
// with a given set of data. // with a given set of data.
// //
var HOOKS = MathJax.Object.Subclass({ var HOOKS = MathJax.Object.Subclass({
@ -590,6 +590,7 @@ MathJax.fileversion = "2.0";
BASE.Callback.ExecuteHooks = EXECUTEHOOKS; BASE.Callback.ExecuteHooks = EXECUTEHOOKS;
})("MathJax"); })("MathJax");
/**********************************************************/ /**********************************************************/
(function (BASENAME) { (function (BASENAME) {
@ -2033,17 +2034,8 @@ MathJax.Hub.Startup = {
cObject.Augment(null,cdef); cObject.Augment(null,cdef);
return this; return this;
}, },
preProcess: function (element) { Translate: function (script,state) {
var load, file = this.directory+"/"+this.JAXFILE; throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method");
this.constructor.prototype.preProcess = function (element) {
if (!load.called) {return load}
throw Error(file+" failed to load properly");
}
load = AJAX.Require(file);
return load;
},
Translate: function (element) {
throw Error(this.directory+"/"+this.JAXFILE+" failed to redefine the Translate() method");
}, },
Register: function (mimetype) {}, Register: function (mimetype) {},
Config: function () { Config: function () {
@ -2067,13 +2059,17 @@ MathJax.Hub.Startup = {
[function (config,id) {return MathJax.Hub.Startup.loadArray(config.extensions,"extensions/"+id)},this.config||{},this.id], [function (config,id) {return MathJax.Hub.Startup.loadArray(config.extensions,"extensions/"+id)},this.config||{},this.id],
["Post",HUB.Startup.signal,this.id+" Jax Startup"], ["Post",HUB.Startup.signal,this.id+" Jax Startup"],
["Startup",this], ["Startup",this],
["Post",HUB.Startup.signal,this.id+" Jax Ready"], ["Post",HUB.Startup.signal,this.id+" Jax Ready"]
[function (THIS) {
THIS.preProcess = THIS.preTranslate;
THIS.Process = THIS.Translate;
THIS.postProcess = THIS.postTranslate;
},this.constructor.prototype]
); );
if (this.copyTranslate) {
queue.Push(
[function (THIS) {
THIS.preProcess = THIS.preTranslate;
THIS.Process = THIS.Translate;
THIS.postProcess = THIS.postTranslate;
},this.constructor.prototype]
);
}
return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]); return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]);
} }
} }
@ -2088,20 +2084,27 @@ MathJax.Hub.Startup = {
BASE.InputJax = JAX.Subclass({ BASE.InputJax = JAX.Subclass({
elementJax: "mml", // the element jax to load for this input jax elementJax: "mml", // the element jax to load for this input jax
Process: function (element) { copyTranslate: true,
var queue = CALLBACK.Queue(); Process: function (script,state) {
var queue = CALLBACK.Queue(), file;
// Load any needed element jax // Load any needed element jax
var jax = this.elementJax; if (!(jax instanceof Array)) {jax = [jax]} var jax = this.elementJax; if (!(jax instanceof Array)) {jax = [jax]}
for (var i = 0, m = jax.length; i < m; i++) { for (var i = 0, m = jax.length; i < m; i++) {
var file = BASE.ElementJax.directory+"/"+jax[i]+"/"+this.JAXFILE; file = BASE.ElementJax.directory+"/"+jax[i]+"/"+this.JAXFILE;
if (!this.require) {this.require = []} if (!this.require) {this.require = []}
else if (!(this.require instanceof Array)) {this.require = [this.require]}; else if (!(this.require instanceof Array)) {this.require = [this.require]};
this.require.push(file); // so Startup will wait for it to be loaded this.require.push(file); // so Startup will wait for it to be loaded
queue.Push(AJAX.Require(file)); queue.Push(AJAX.Require(file));
} }
// Load the input jax // Load the input jax
var load = queue.Push(AJAX.Require(this.directory+"/"+this.JAXFILE)); file = this.directory+"/"+this.JAXFILE;
if (!load.called) {this.constructor.prototype.Process = function () {return load}} var load = queue.Push(AJAX.Require(file));
if (!load.called) {
this.constructor.prototype.Process = function () {
if (!load.called) {return load}
throw Error(file+" failed to load properly");
}
}
// Load the associated output jax // Load the associated output jax
jax = HUB.outputJax["jax/"+jax[0]]; jax = HUB.outputJax["jax/"+jax[0]];
if (jax) {queue.Push(AJAX.Require(jax[0].directory+"/"+this.JAXFILE))} if (jax) {queue.Push(AJAX.Require(jax[0].directory+"/"+this.JAXFILE))}
@ -2125,6 +2128,16 @@ MathJax.Hub.Startup = {
/***********************************/ /***********************************/
BASE.OutputJax = JAX.Subclass({ BASE.OutputJax = JAX.Subclass({
copyTranslate: true,
preProcess: function (state) {
var load, file = this.directory+"/"+this.JAXFILE;
this.constructor.prototype.preProcess = function (state) {
if (!load.called) {return load}
throw Error(file+" failed to load properly");
}
load = AJAX.Require(file);
return load;
},
Register: function (mimetype) { Register: function (mimetype) {
var jax = HUB.outputJax; var jax = HUB.outputJax;
if (!jax[mimetype]) {jax[mimetype] = []} if (!jax[mimetype]) {jax[mimetype] = []}

View File

@ -689,7 +689,7 @@ MathJax.Hub.Config({
// EqChunkDelay is the time (in milliseconds) to delay between chunks // EqChunkDelay is the time (in milliseconds) to delay between chunks
// (to allow the browser to respond to other user interaction). // (to allow the browser to respond to other user interaction).
// //
// Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get // Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get
// the behavior from MathJax v1.1 and below. // the behavior from MathJax v1.1 and below.
// //
EqnChunk: 50, EqnChunk: 50,
@ -838,7 +838,7 @@ MathJax.Hub.Config({
// //
// This controls whether the MathML structure is retained and CSS // This controls whether the MathML structure is retained and CSS
// classes are used to mark the original MathML elements (as in the // classes are added to mark the original MathML elements (as in the
// HTML-CSS output). By default, the SVG output jax removes unneeded // HTML-CSS output). By default, the SVG output jax removes unneeded
// nesting in order to produce a more efficient markup, but if you // nesting in order to produce a more efficient markup, but if you
// want to use CSS to style the elements as if they were MathML, you // want to use CSS to style the elements as if they were MathML, you
@ -941,7 +941,7 @@ MathJax.Hub.Config({
// this long, the menu will appear. (The menu also will appear if you // this long, the menu will appear. (The menu also will appear if you
// click on the label.) It is in milliseconds. // click on the label.) It is in milliseconds.
// //
delay: 400, delay: 150,
// //
// This is the URL for the MathJax Help menu item. // This is the URL for the MathJax Help menu item.
@ -979,6 +979,20 @@ MathJax.Hub.Config({
}, },
//============================================================================
//
// These parameters control the contextual menus that are available on the
// mathematics within the page (provided the showMathMenu value is true above).
//
MathEvents: {
//
// This is the time required for the mouse to be held still over a
// typeset equation in order for it to count as a hover (used when the
// zoom trigger is "Hover"). It is in milliseconds.
//
hover: 500
},
//============================================================================ //============================================================================
// //
// These parameters control the MMLorHTML configuration file. // These parameters control the MMLorHTML configuration file.

View File

@ -0,0 +1,71 @@
/*************************************************************
*
* MathJax/extensions/TeX/autoload-all.js
*
* Provides pre-defined macros to autoload all the extensions
* so that all macros that MathJax knows about are available.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2012 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Extension["TeX/autoload-all"] = {
version: "2.0"
};
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX,
MACROS = TEX.Definitions.macros,
ENVS = TEX.Definitions.environment;
var EXTENSIONS = {
action: ["mathtip","texttip","toggle"],
AMSmath: ["mathring","nobreakspace","negmedspace","negthickspace","intI",
"iiiint","idotsint","dddot","ddddot","sideset","boxed",
"substack","injlim","projlim","varliminf","varlimsup",
"varinjlim","varprojlim","DeclareMathOperator","operatorname",
"genfrac","tfrac","dfrac","binom","tbinom","dbinom","cfrac",
"shoveleft","shoveright","xrightarrow","xleftarrow"],
begingroup: ["begingroup","endgroup","gdef","global"],
cancel: ["cancel","bcancel","xcancel","cancelto"],
color: ["color","colorbox","fcolorbox"],
enclose: ["enclose"],
extpfeil: ["Newextarrow","xlongequal","xmapsto","xtofrom",
"xtwoheadleftarrow","xtwoheadrightarrow"],
mhchem: ["ce","cee","cf"]
};
for (var name in EXTENSIONS) {if (EXTENSIONS.hasOwnProperty(name)) {
var macros = EXTENSIONS[name];
for (var i = 0, m = macros.length; i < m; i++) {
MACROS[macros[i]] = ["Extension",name];
}
}}
ENVS["subarray"] = ['ExtensionEnv',null,'AMSmath'];
ENVS["smallmatrix"] = ['ExtensionEnv',null,'AMSmath'];
ENVS["equation"] = ['ExtensionEnv',null,'AMSmath'];
ENVS["equation*"] = ['ExtensionEnv',null,'AMSmath'];
MathJax.Hub.Startup.signal.Post("TeX autoload-all Ready");
});
MathJax.Callback.Queue(
["Require",MathJax.Ajax,"[MathJax]/extensions/TeX/AMSsymbols.js"],
["loadComplete",MathJax.Ajax,"[MathJax]/extensions/TeX/autoload-all.js"]
);

View File

@ -167,6 +167,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
COLOR.TEX = TEX; // for reference in getColor above COLOR.TEX = TEX; // for reference in getColor above
TEX.Definitions.macros.color = "Color";
TEX.Definitions.macros.definecolor = "DefineColor"; TEX.Definitions.macros.definecolor = "DefineColor";
TEX.Definitions.macros.colorbox = "ColorBox"; TEX.Definitions.macros.colorbox = "ColorBox";
TEX.Definitions.macros.fcolorbox = "fColorBox"; TEX.Definitions.macros.fcolorbox = "fColorBox";