Change jax 'name' property to 'id' to avoid conflict with read-only name property of the Function object (the ElementJax and base classes are functions)
git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@606 b8fd5906-0fad-46e2-a0d3-10d94ff285d1
This commit is contained in:
parent
7890430ddb
commit
d0800c8c3c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,6 @@
|
|||
*/
|
||||
|
||||
MathJax.Unpack([
|
||||
['MathJax.InputJax','.MathML','=',0,'({name:"','MathML",','version:"1.0.1",directory:',0,'.directory+"/',5,'extensionDir',':',0,'.',10,'+"/',5,'entityDir:',0,8,'MathML/entities",require:[MathJax.ElementJax',8,'mml/jax.js"],config:{useMathMLspacing:false}});',0,1,'.Register("math/mml");',0,1,'.loadComplete("config.js");']
|
||||
['MathJax.InputJax','.MathML','=',0,'({id:"','MathML",','version:"1.0.2",directory:',0,'.directory+"/',5,'extensionDir',':',0,'.',10,'+"/',5,'entityDir:',0,8,'MathML/entities",require:[MathJax.ElementJax',8,'mml/jax.js"],config:{useMathMLspacing:false}});',0,1,'.Register("math/mml");',0,1,'.loadComplete("config.js");']
|
||||
]);
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
*/
|
||||
|
||||
MathJax.Unpack([
|
||||
['MathJax.InputJax','.TeX','=',0,'({name:"TeX",version:"1.0",directory:',0,'.directory+"/','TeX",extensionDir:',0,'.extensionDir+"/TeX",require:[MathJax.ElementJax',6,'mml/jax.js"],config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%"}});',0,1,'.Register("math/tex");',0,1,'.loadComplete("config.js");']
|
||||
['MathJax.InputJax','.TeX','=',0,'({id:"TeX",version:"1.0.1",directory:',0,'.directory+"/','TeX",extensionDir:',0,'.extensionDir+"/TeX",require:[MathJax.ElementJax',6,'mml/jax.js"],config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%"}});',0,1,'.Register("math/tex");',0,1,'.loadComplete("config.js");']
|
||||
]);
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
*/
|
||||
|
||||
MathJax.Unpack([
|
||||
['MathJax.OutputJax','["HTML-CSS','"]=',0,'({name:"','HTML-CSS",','version:"1.0.1",directory:',0,'.directory+"/HTML-CSS','",extensionDir:',0,'.extensionDir+"/',5,'autoloadDir:',0,8,'/autoload",fontDir:',0,8,'/fonts",webfontDir:',0,'.fontDir+"/',5,'config:{scale:100,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",showMathMenu:true,styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror','":{"background-color','":"#FFFF88",color:"#CC0000','",border:"1px solid',' #CC0000",padding:"1px 3px","font-family":"serif","font-style":"normal","font-size":"90%"},".','MathJax_Preview','":{color:"#888888"},"#MathJax_Tooltip',24,'":"InfoBackground",color:"InfoText',26,' black","','box-shadow":"2px 2px 5px #AAAAAA','","-webkit-',34,'","-moz-',34,'",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\'gray\', Positive=\'true\')",padding:"3px 4px"}}}});',0,1,'"].Register("jax/mml");(function(b,c){var a;a=b.Insert({','minBrowserVersion',':{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},','inlineMathDelimiters',':["$","$"],','displayMathDelimiters',':["$$","$$"],','multilineDisplay',':true,','minBrowserTranslate',':function(f){var e=b.getJaxFor(f),l=["[Math]"],k;var h=','document.createElement("','span",{className:"',28,'"});var j=e.root.Get("displaystyle");if(e.inputJax.name==="TeX"){if(j){k=a.',47,';l=[k[0]+e.originalText','+k[1]];if(a.',49,'){l=l[0].split(/\\n/)}}else{k=a.',45,58,'.replace(/^\\s+/,"").replace(/\\s+$/,"")+k[1]]}}for(var g=0,d=l.length;g<d;g++){h.appendChild(document.createTextNode(l[g]));if(g<d-1){h.appendChild(',53,'br"))}}f.parentNode.insertBefore(h,f)}},(b.config',1,'"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.',43,'[b.Browser]||0)){c.Translate=a.',51,';MathJax.Hub.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}})(MathJax.Hub,',0,1,'"]);',0,1,'"].loadComplete("config.js");']
|
||||
['MathJax.OutputJax','["HTML-CSS','"]=',0,'({id:"','HTML-CSS",','version:"1.0.2",directory:',0,'.directory+"/HTML-CSS','",extensionDir:',0,'.extensionDir+"/',5,'autoloadDir:',0,8,'/autoload",fontDir:',0,8,'/fonts",webfontDir:',0,'.fontDir+"/',5,'config:{scale:100,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",showMathMenu:true,styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror','":{"background-color','":"#FFFF88",color:"#CC0000','",border:"1px solid',' #CC0000",padding:"1px 3px","font-family":"serif","font-style":"normal","font-size":"90%"},".','MathJax_Preview','":{color:"#888888"},"#MathJax_Tooltip',24,'":"InfoBackground",color:"InfoText',26,' black","','box-shadow":"2px 2px 5px #AAAAAA','","-webkit-',34,'","-moz-',34,'",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\'gray\', Positive=\'true\')",padding:"3px 4px"}}}});',0,1,'"].Register("jax/mml");(function(b,c){var a;a=b.Insert({','minBrowserVersion',':{Firefox:3,Opera:9.52,MSIE:6,Chrome:0.3,Safari:2,Konqueror:4},','inlineMathDelimiters',':["$","$"],','displayMathDelimiters',':["$$","$$"],','multilineDisplay',':true,','minBrowserTranslate',':function(f){var e=b.getJaxFor(f),l=["[Math]"],k;var h=','document.createElement("','span",{className:"',28,'"});var j=e.root.Get("displaystyle");if(e.inputJax.id==="TeX"){if(j){k=a.',47,';l=[k[0]+e.originalText','+k[1]];if(a.',49,'){l=l[0].split(/\\n/)}}else{k=a.',45,58,'.replace(/^\\s+/,"").replace(/\\s+$/,"")+k[1]]}}for(var g=0,d=l.length;g<d;g++){h.appendChild(document.createTextNode(l[g]));if(g<d-1){h.appendChild(',53,'br"))}}f.parentNode.insertBefore(h,f)}},(b.config',1,'"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.',43,'[b.Browser]||0)){c.Translate=a.',51,';MathJax.Hub.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}})(MathJax.Hub,',0,1,'"]);',0,1,'"].loadComplete("config.js");']
|
||||
]);
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,6 @@
|
|||
*/
|
||||
|
||||
MathJax.Unpack([
|
||||
['MathJax.OutputJax','.','NativeMML','=',0,'({name:"',2,'",version:"1.0",directory:',0,'.directory+"/',2,'",extensionDir:',0,'.extensionDir+"/',2,'",config:{scale:100,showMathMenu:true,showMathMenuMSIE:true,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});',0,'.',2,'.Register("jax/mml");(function(b){if(b.isMSIE){var a=document.createElement("object");a.id="mathplayer";a.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(a);','document.namespaces.','add("mjx","http://www.w3.org/1998/Math/MathML");',20,'mjx.doImport("#mathplayer")}})(MathJax.Hub.Browser);',0,'.',2,'.loadComplete("config.js");']
|
||||
['MathJax.OutputJax','.','NativeMML','=',0,'({id:"',2,'",version:"1.0.1",directory:',0,'.directory+"/',2,'",extensionDir:',0,'.extensionDir+"/',2,'",config:{scale:100,showMathMenu:true,showMathMenuMSIE:true,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});',0,'.',2,'.Register("jax/mml");(function(b){if(b.isMSIE){var a=document.createElement("object");a.id="mathplayer";a.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(a);','document.namespaces.','add("mjx","http://www.w3.org/1998/Math/MathML");',20,'mjx.doImport("#mathplayer")}})(MathJax.Hub.Browser);',0,'.',2,'.loadComplete("config.js");']
|
||||
]);
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ if (document.getElementById && document.childNodes && document.createElement) {
|
|||
if (!window.MathJax) {window.MathJax= {}}
|
||||
if (!MathJax.Hub) { // skip if already loaded
|
||||
|
||||
MathJax.version = "1.0.2";
|
||||
MathJax.version = "1.0.3";
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
|
@ -1640,32 +1640,32 @@ MathJax.Hub.Startup = {
|
|||
},
|
||||
Register: function (mimetype) {},
|
||||
Config: function () {
|
||||
HUB.Insert(this.config,(HUB.config[this.name]||{}));
|
||||
HUB.Insert(this.config,(HUB.config[this.id]||{}));
|
||||
if (this.config.Augment) {this.Augment(this.config.Augment)}
|
||||
},
|
||||
Startup: function () {},
|
||||
loadComplete: function (file) {
|
||||
if (file === "jax.js") {
|
||||
var queue = CALLBACK.Queue();
|
||||
queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Config"]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.id+" Jax Config"]);
|
||||
queue.Push(["Config",this]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Require"]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.id+" Jax Require"]);
|
||||
if (this.require) {
|
||||
var require = this.require; if (!(require instanceof Array)) {require = [require]}
|
||||
for (var i = 0, m = require.length; i < m; i++) {queue.Push(AJAX.Require(require[i]))}
|
||||
queue.Push(["loadArray",MathJax.Hub.Startup,this.config.require,"config"]);
|
||||
}
|
||||
queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Startup"]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.id+" Jax Startup"]);
|
||||
queue.Push(["Startup",this]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.name+" Jax Ready"]);
|
||||
queue.Push(["Post",HUB.Startup.signal,this.id+" Jax Ready"]);
|
||||
return queue.Push(["loadComplete",AJAX,this.directory+"/"+file]);
|
||||
} else {
|
||||
return AJAX.loadComplete(this.directory+"/"+file);
|
||||
}
|
||||
}
|
||||
},{
|
||||
name: "unknown",
|
||||
version: "1.0",
|
||||
id: "unknown",
|
||||
version: "1.0.1",
|
||||
directory: ROOT+"/jax",
|
||||
extensionDir: ROOT+"/extensions"
|
||||
});
|
||||
|
@ -1690,7 +1690,7 @@ MathJax.Hub.Startup = {
|
|||
if (!HUB.config.outputJax) {HUB.config.outputJax = {}}
|
||||
if (!HUB.config.outputJax[mimetype]) {
|
||||
HUB.config.outputJax[mimetype] = [];
|
||||
if (!HUB.config.menuSettings.renderer) {HUB.config.menuSettings.renderer = this.name}
|
||||
if (!HUB.config.menuSettings.renderer) {HUB.config.menuSettings.renderer = this.id}
|
||||
}
|
||||
HUB.config.outputJax[mimetype].push(this);
|
||||
},
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
(function (HUB,HTML,AJAX) {
|
||||
var VERSION = "1.0.1";
|
||||
var VERSION = "1.0.2";
|
||||
|
||||
var isPC = HUB.Browser.isPC, isMSIE = HUB.Browser.isMSIE;
|
||||
var ROUND = (isPC ? null : "5px");
|
||||
|
@ -528,7 +528,7 @@
|
|||
MENU.About.GetJax = function (jax,JAX,type) {
|
||||
for (var id in JAX) {
|
||||
if (JAX[id].isa && JAX[id].isa(JAX))
|
||||
{jax.push(JAX[id].name+" "+type+" Jax v"+JAX[id].version,["br"])}
|
||||
{jax.push(JAX[id].id+" "+type+" Jax v"+JAX[id].version,["br"])}
|
||||
}
|
||||
return jax;
|
||||
};
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
MathJax.ElementJax.mml = MathJax.ElementJax({
|
||||
mimeType: "jax/mml"
|
||||
},{
|
||||
name: "mml",
|
||||
version: "1.0",
|
||||
id: "mml",
|
||||
version: "1.0.1",
|
||||
directory: MathJax.ElementJax.directory + "/mml",
|
||||
extensionDir: MathJax.ElementJax.extensionDir + "/mml",
|
||||
optableDir: MathJax.ElementJax.directory + "/mml/optable"
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
*/
|
||||
|
||||
MathJax.InputJax.MathML = MathJax.InputJax({
|
||||
name: "MathML",
|
||||
version: "1.0.1",
|
||||
id: "MathML",
|
||||
version: "1.0.2",
|
||||
directory: MathJax.InputJax.directory + "/MathML",
|
||||
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
|
||||
entityDir: MathJax.InputJax.directory + "/MathML/entities",
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
*/
|
||||
|
||||
MathJax.InputJax.TeX = MathJax.InputJax({
|
||||
name: "TeX",
|
||||
version: "1.0",
|
||||
id: "TeX",
|
||||
version: "1.0.1",
|
||||
directory: MathJax.InputJax.directory + "/TeX",
|
||||
extensionDir: MathJax.InputJax.extensionDir + "/TeX",
|
||||
require: [MathJax.ElementJax.directory + "/mml/jax.js"],
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
*/
|
||||
|
||||
MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
|
||||
name: "HTML-CSS",
|
||||
version: "1.0.1",
|
||||
id: "HTML-CSS",
|
||||
version: "1.0.2",
|
||||
directory: MathJax.OutputJax.directory + "/HTML-CSS",
|
||||
extensionDir: MathJax.OutputJax.extensionDir + "/HTML-CSS",
|
||||
autoloadDir: MathJax.OutputJax.directory + "/HTML-CSS/autoload",
|
||||
|
@ -105,7 +105,7 @@ MathJax.OutputJax["HTML-CSS"].Register("jax/mml");
|
|||
var MJ = HUB.getJaxFor(script), text = ["[Math]"], delim
|
||||
var span = document.createElement("span",{className: "MathJax_Preview"});
|
||||
var display = MJ.root.Get("displaystyle")
|
||||
if (MJ.inputJax.name === "TeX") {
|
||||
if (MJ.inputJax.id === "TeX") {
|
||||
if (display) {
|
||||
delim = CONFIG.displayMathDelimiters;
|
||||
text = [delim[0]+MJ.originalText+delim[1]];
|
||||
|
|
|
@ -396,7 +396,7 @@
|
|||
var math = (this.parentNode.className === "MathJax_Display" ? this.parentNode : this)
|
||||
MENU.jax = HUB.getJaxFor(math.nextSibling);
|
||||
MENU.menu.items[1].menu.items[1].name =
|
||||
(MENU.jax.inputJax.name === "MathML" ? "Original" : MENU.jax.inputJax.name);
|
||||
(MENU.jax.inputJax.id === "MathML" ? "Original" : MENU.jax.inputJax.id);
|
||||
return MENU.menu.Post(event);
|
||||
} else {
|
||||
if (!AJAX.loadingMathMenu) {
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
*/
|
||||
|
||||
MathJax.OutputJax.NativeMML = MathJax.OutputJax({
|
||||
name: "NativeMML",
|
||||
version: "1.0",
|
||||
id: "NativeMML",
|
||||
version: "1.0.1",
|
||||
directory: MathJax.OutputJax.directory + "/NativeMML",
|
||||
extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
var script = (isMSIE ? this.parentNode.parentNode.nextSibling : this.parentNode.nextSibling);
|
||||
MENU.jax = HUB.getJaxFor(script);
|
||||
MENU.menu.items[1].menu.items[1].name =
|
||||
(MENU.jax.inputJax.name === "MathML" ? "Original" : MENU.jax.inputJax.name);
|
||||
(MENU.jax.inputJax.id === "MathML" ? "Original" : MENU.jax.inputJax.id);
|
||||
delete nMML.trapClick; delete nMML.trapUp;
|
||||
return MENU.menu.Post(event);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user