Update menu items for easier access, and use more variables to access MathJax components, when possible; remove some unneeded variables from NativeMML jax.

This commit is contained in:
Davide P. Cervone 2011-08-24 15:31:06 -04:00
parent 820afa0357
commit 3edf60dc0f
29 changed files with 125 additions and 120 deletions

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

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

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

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1.4",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1.5",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"1.1.1",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%"}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"1.1.2",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%"}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"1.1.11",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",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":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px"}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var 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),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax.id==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g<d;g++){h.appendChild(document.createTextNode(k[g]));if(g<d-1){h.appendChild(document.createElement("br"))}}f.parentNode.insertBefore(h,f)}},(b.config["HTML-CSS"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.minBrowserVersion[b.Browser]||0)){c.Translate=a.minBrowserTranslate;b.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}},MathJax.Hub,MathJax.OutputJax["HTML-CSS"]]);MathJax.OutputJax["HTML-CSS"].loadComplete("config.js");
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"1.1.12",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFont:"TeX",undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",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":{"background-color":"InfoBackground",color:"InfoText",border:"1px solid black","box-shadow":"2px 2px 5px #AAAAAA","-webkit-box-shadow":"2px 2px 5px #AAAAAA","-moz-box-shadow":"2px 2px 5px #AAAAAA","-khtml-box-shadow":"2px 2px 5px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')",padding:"3px 4px"}}}});if(MathJax.Hub.Browser.isMSIE&&document.documentMode>=9){delete MathJax.OutputJax["HTML-CSS"].config.styles["#MathJax_Tooltip"].filter}if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax["HTML-CSS"].Register("jax/mml")}MathJax.Hub.Register.StartupHook("End Config",[function(b,c){var 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),k=["[Math]"],j;var h=document.createElement("span",{className:"MathJax_Preview"});if(e.inputJax.id==="TeX"){if(e.root.Get("displaystyle")){j=a.displayMathDelimiters;k=[j[0]+e.originalText+j[1]];if(a.multilineDisplay){k=k[0].split(/\n/)}}else{j=a.inlineMathDelimiters;k=[j[0]+e.originalText.replace(/^\s+/,"").replace(/\s+$/,"")+j[1]]}}for(var g=0,d=k.length;g<d;g++){h.appendChild(document.createTextNode(k[g]));if(g<d-1){h.appendChild(document.createElement("br"))}}f.parentNode.insertBefore(h,f)}},(b.config["HTML-CSS"]||{}));if(b.Browser.version!=="0.0"&&!b.Browser.versionAtLeast(a.minBrowserVersion[b.Browser]||0)){c.Translate=a.minBrowserTranslate;b.Config({showProcessingMessages:false});MathJax.Message.Set("Your browser does not support MathJax",null,4000);b.Startup.signal.Post("MathJax not supported")}},MathJax.Hub,MathJax.OutputJax["HTML-CSS"]]);MathJax.OutputJax["HTML-CSS"].loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.OutputJax.NativeMML=MathJax.OutputJax({id:"NativeMML",version:"1.1.7",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.NativeMML.Register("jax/mml")}MathJax.OutputJax.NativeMML.loadComplete("config.js");
MathJax.OutputJax.NativeMML=MathJax.OutputJax({id:"NativeMML",version:"1.1.8",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,styles:{"DIV.MathJax_MathML":{"text-align":"center",margin:".75em 0px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.NativeMML.Register("jax/mml")}MathJax.OutputJax.NativeMML.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -1197,7 +1197,6 @@ MathJax.Hub = {
outputJax: {order:{}}, // mime-type mapped to output jax list (by registration)
menuSettings: {
//format: "MathML", // the Show Source format (set in MathMenu.js)
zoom: "None", // when to do MathZoom
CTRL: false, // require CTRL for MathZoom?
ALT: false, // require Alt or Option?

View File

@ -22,7 +22,7 @@
* limitations under the License.
*/
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT) {
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT,INPUT) {
var VERSION = "1.1";
var EXTENSION = MathJax.Extension;
@ -149,8 +149,8 @@
var MENU = MathJax.Menu;
if (MENU) {
MENU.jax = jax;
MENU.menu.Find("Format").menu.items[1].name =
(jax.inputJax.id === "MathML" ? "Original" : jax.inputJax.id);
MENU.menu.Find("Show Math As").menu.items[1].name =
(INPUT[jax.inputJax.id].sourceMenuTitle||"Original Form");
return MENU.menu.Post(event);
} else {
if (!AJAX.loadingMathMenu) {
@ -498,4 +498,4 @@
["loadComplete",AJAX,"[MathJax]/extensions/MathEvents.js"]
);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.Callback,MathJax.OutputJax);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.Callback,MathJax.OutputJax,MathJax.InputJax);

View File

@ -23,8 +23,8 @@
* limitations under the License.
*/
(function (HUB,HTML,AJAX) {
var VERSION = "1.1.6";
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT) {
var VERSION = "1.1.8";
MathJax.Extension.MathMenu = {version: VERSION};
@ -34,6 +34,7 @@
var CONFIG = HUB.CombineConfig("MathMenu",{
delay: 150, // the delay for submenus
helpURL: "http://www.mathjax.org/help/user/", // the URL for the "MathJax Help" menu
closeImg: AJAX.fileURL(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
showRenderer: true, // show the "Math Renderer" menu?
showFontMenu: false, // show the "Font Preference" menu?
@ -130,12 +131,18 @@
".MathJax_MenuActive": {
"background-color": (isPC ? "Highlight" : "#606872"),
color: (isPC ? "HighlightText" : "white")
}
},
".MathJax_Menu_Close": {
position:"absolute",
width: "31px", height: "31px",
top:"-15px", left:"-15px"
},
}
});
var FALSE, HOVER;
MathJax.Hub.Register.StartupHook("MathEvents Ready",function () {
HUB.Register.StartupHook("MathEvents Ready",function () {
FALSE = MathJax.Extension.MathEvents.Event.False;
HOVER = MathJax.Extension.MathEvents.Hover;
});
@ -175,9 +182,7 @@
for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}
if (MENU.isMobile) {
HTML.addElement(menu,"img",{
src: MathJax.Ajax.fileURL(MathJax.OutputJax.imageDir+"/CloseX-31.png"),
width: 31, height: 31, menu: parent,
style: {position:"absolute", top:"-15px", left:"-15px"},
className: "MathJax_Menu_Close", menu: parent, src: CONFIG.closeImg,
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close
});
}
@ -323,10 +328,7 @@
// Preload images so they show up with the menu
//
getImages: function () {
if (MENU.isMobile) {
var close = new Image();
close.src = AJAX.fileURL(MathJax.OutputJax.imageDir+"/CloseX-31.png");
}
if (MENU.isMobile) {var close = new Image(); close.src = CONFIG.closeImg}
}
});
@ -439,7 +441,7 @@
Timer: function (event,menu) {
if (this.timer) {clearTimeout(this.timer)}
event = {clientX: event.clientX, clientY: event.clientY}; // MSIE can't pass the event below
this.timer = setTimeout(MathJax.Callback(["Mouseup",this,event,menu]),CONFIG.delay);
this.timer = setTimeout(CALLBACK(["Mouseup",this,event,menu]),CONFIG.delay);
},
Touchend: function (event,menu) {
var forceout = this.menu.posted;
@ -563,7 +565,7 @@
* Handle the ABOUT box
*/
MENU.About = function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"] || {fontInUse: ""};
var HTMLCSS = OUTPUT["HTML-CSS"] || {fontInUse: ""};
var local = (HTMLCSS.webFonts ? "" : "local "), web = (HTMLCSS.webFonts ? " web" : "");
var font = (HTMLCSS.imgFonts ? "Image" : local+HTMLCSS.fontInUse+web) + " fonts";
var jax = ["MathJax.js v"+MathJax.fileversion,["br"]];
@ -578,7 +580,7 @@
(HTMLCSS.webFonts ? " \u2014 "+HTMLCSS.allowWebFonts+" fonts" : "")
]]);
MENU.About.div = MENU.Background(MENU.About);
var about = MathJax.HTML.addElement(MENU.About.div,"div",{
var about = HTML.addElement(MENU.About.div,"div",{
id: "MathJax_About", onclick: MENU.About.Remove
},[
["b",{style:{fontSize:"120%"}},["MathJax"]]," v"+MathJax.version,["br"],
@ -626,21 +628,24 @@
if (!event) {event = window.event}
var EVENT = {screenX:event.screenX, screenY:event.screenY};
if (!MENU.jax) return;
if (CONFIG.settings.format === "MathML") {
if (this.format === "MathML") {
var MML = MathJax.ElementJax.mml;
if (MML && typeof(MML.mbase.prototype.toMathML) !== "undefined") {
// toMathML() can call MathJax.Hub.RestartAfter, so trap errors and check
try {MENU.ShowSource.Text(MENU.jax.root.toMathML(),event)} catch (err) {
if (!err.restart) {throw err}
MathJax.Callback.After([this,arguments.callee,EVENT]);
CALLBACK.After([this,MENU.ShowSource,EVENT]);
}
} else if (!AJAX.loadingToMathML) {
AJAX.loadingToMathML = true;
MENU.ShowSource.Window(event); // WeBKit needs to open window on click event
MathJax.Callback.Queue(
CALLBACK.Queue(
AJAX.Require("[MathJax]/extensions/toMathML.js"),
function () {delete AJAX.loadingToMathML},
[this,arguments.callee,EVENT] // call this function again
function () {
delete AJAX.loadingToMathML;
if (!MML.mbase.prototype.toMathML) {MML.mbase.prototype.toMathML = function () {}}
},
[this,MENU.ShowSource,EVENT] // call this function again
);
return;
}
@ -692,7 +697,7 @@
* Handle rescaling all the math
*/
MENU.Scale = function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"], nMML = MathJax.OutputJax.NativeMML;
var HTMLCSS = OUTPUT["HTML-CSS"], nMML = OUTPUT.NativeMML;
var SCALE = (HTMLCSS ? HTMLCSS.config.scale : nMML.config.scale);
var scale = prompt("Scale all mathematics (compared to surrounding text) by",SCALE+"%");
if (scale) {
@ -723,11 +728,11 @@
MENU.Renderer = function () {
var jax = HUB.config.outputJax["jax/mml"];
if (jax[0] !== CONFIG.settings.renderer) {
MathJax.Callback.Queue(
CALLBACK.Queue(
["Require",AJAX,"[MathJax]/jax/output/"+CONFIG.settings.renderer+"/config.js"],
["Post",HUB.Startup.signal,CONFIG.settings.renderer+" output selected"],
[function () {
var JAX = MathJax.OutputJax[CONFIG.settings.renderer];
var JAX = OUTPUT[CONFIG.settings.renderer];
for (var i = 0, m = jax.length; i < m; i++)
{if (jax[i] === JAX) {jax.splice(i,1); break}}
jax.unshift(JAX);
@ -741,7 +746,7 @@
* Handle setting the HTMLCSS fonts
*/
MENU.Font = function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"]; if (!HTMLCSS) return;
var HTMLCSS = OUTPUT["HTML-CSS"]; if (!HTMLCSS) return;
document.location.reload();
};
@ -767,8 +772,8 @@
MENU.skipMousedown = browser.isMobile;
}
});
MENU.isMobile = MathJax.Hub.Browser.isMobile;
MENU.noContextMenu = MathJax.Hub.Browser.noContextMenu;
MENU.isMobile = HUB.Browser.isMobile;
MENU.noContextMenu = HUB.Browser.noContextMenu;
/*************************************************************/
@ -780,8 +785,6 @@
* it wasn't set in the cookie.
*/
CONFIG.settings = HUB.config.menuSettings;
if (!CONFIG.settings.format)
{CONFIG.settings.format = (MathJax.InputJax.TeX ? "Original" : "MathML")}
if (typeof(CONFIG.settings.showRenderer) !== "undefined") {CONFIG.showRenderer = CONFIG.settings.showRenderer}
if (typeof(CONFIG.settings.showFontMenu) !== "undefined") {CONFIG.showFontMenu = CONFIG.settings.showFontMenu}
if (typeof(CONFIG.settings.showContext) !== "undefined") {CONFIG.showContext = CONFIG.settings.showContext}
@ -791,13 +794,12 @@
* The main menu
*/
MENU.menu = MENU(
ITEM.COMMAND("Show Source",MENU.ShowSource,{nativeTouch: true}),
ITEM.SUBMENU("Format",
ITEM.RADIO("MathML", "format"),
ITEM.RADIO("Original", "format", {value: "Original"})
ITEM.SUBMENU("Show Math As",
ITEM.COMMAND("MathML Code", MENU.ShowSource, {nativeTouch: true, format: "MathML"}),
ITEM.COMMAND("Original Form", MENU.ShowSource, {nativeTouch: true})
),
ITEM.RULE(),
ITEM.SUBMENU("Settings",
ITEM.SUBMENU("Math Settings",
ITEM.SUBMENU("Zoom Trigger",
ITEM.RADIO("Hover", "zoom", {action: MENU.Zoom}),
ITEM.RADIO("Click", "zoom", {action: MENU.Zoom}),
@ -839,7 +841,9 @@
ITEM.RADIO("MathJax", "context"),
ITEM.RADIO("Browser", "context")
),
ITEM.COMMAND("Scale All Math ...",MENU.Scale)
ITEM.COMMAND("Scale All Math ...",MENU.Scale),
ITEM.RULE(),
ITEM.CHECKBOX("Highlight on Hover", "discoverable")
),
ITEM.RULE(),
ITEM.COMMAND("About MathJax",MENU.About),
@ -850,21 +854,21 @@
MENU.showRenderer = function (show) {
MENU.cookie.showRenderer = CONFIG.showRenderer = show; MENU.saveCookie();
MENU.menu.Find("Settings","Math Renderer").hidden = !show;
MENU.menu.Find("Math Settings","Math Renderer").hidden = !show;
};
MENU.showFontMenu = function (show) {
MENU.cookie.showFontMenu = CONFIG.showFontMenu = show; MENU.saveCookie();
MENU.menu.Find("Settings","Font Preference").hidden = !show;
MENU.menu.Find("Math Settings","Font Preference").hidden = !show;
};
MENU.showContext = function (show) {
MENU.cookie.showContext = CONFIG.showContext = show; MENU.saveCookie();
MENU.menu.Find("Settings","Contextual Menu").hidden = !show;
MENU.menu.Find("Math Settings","Contextual Menu").hidden = !show;
};
if (MENU.isMobile) {
(function () {
var settings = CONFIG.settings;
var trigger = MENU.menu.Find("Settings","Zoom Trigger").menu;
var trigger = MENU.menu.Find("Math Settings","Zoom Trigger").menu;
trigger.items[0].disabled = trigger.items[1].disabled = true;
if (settings.zoom === "Hover" || settings.zoom == "Click") {settings.zoom = "None"}
trigger.items = trigger.items.slice(0,4);
@ -877,11 +881,12 @@
/*************************************************************/
MathJax.Callback.Queue(
["Styles",AJAX,CONFIG.styles],
CALLBACK.Queue(
HUB.Register.StartupHook("End Config",{}), // wait until config is complete complete
["getImages",MENU],
["Styles",AJAX,CONFIG.styles],
["Post",HUB.Startup.signal,"MathMenu Ready"],
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]
);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.CallBack,MathJax.OutputJax);

View File

@ -24,7 +24,7 @@
MathJax.InputJax.MathML = MathJax.InputJax({
id: "MathML",
version: "1.1.4",
version: "1.1.5",
directory: MathJax.InputJax.directory + "/MathML",
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
entityDir: MathJax.InputJax.directory + "/MathML/entities",

View File

@ -128,6 +128,8 @@
/************************************************************************/
MATHML.Augment({
sourceMenuTitle: "Original MathML",
Translate: function (script) {
if (!this.ParseXML) {this.ParseXML = this.createParser()}
var mml, math;

View File

@ -24,7 +24,7 @@
MathJax.InputJax.TeX = MathJax.InputJax({
id: "TeX",
version: "1.1.1",
version: "1.1.2",
directory: MathJax.InputJax.directory + "/TeX",
extensionDir: MathJax.InputJax.extensionDir + "/TeX",

View File

@ -1701,6 +1701,8 @@
MAXBUFFER: 5*1024 // maximum size of TeX string to process
},
sourceMenuTitle: "TeX Commands",
Translate: function (script) {
var mml, math = script.innerHTML.replace(/^\s+/,"").replace(/\s+$/,"");
if (MathJax.Hub.Browser.isKonqueror)

View File

@ -24,7 +24,7 @@
MathJax.OutputJax["HTML-CSS"] = MathJax.OutputJax({
id: "HTML-CSS",
version: "1.1.11",
version: "1.1.12",
directory: MathJax.OutputJax.directory + "/HTML-CSS",
extensionDir: MathJax.OutputJax.extensionDir + "/HTML-CSS",
autoloadDir: MathJax.OutputJax.directory + "/HTML-CSS/autoload",

View File

@ -415,6 +415,7 @@
script.parentNode.insertBefore(frame,script); var isHidden;
try {this.getScales(span); isHidden = (this.em === 0 || String(this.em) === "NaN")} catch (err) {isHidden = true}
if (isHidden) {this.hiddenDiv.appendChild(frame); this.getScales(span)}
jax.em = this.em; jax.outerEm = this.outerEm; jax.scale = this.scale;
this.initImg(span);
this.initHTML(math,span);
math.setTeXclass();
@ -432,7 +433,7 @@
},
getHoverSpan: function (jax) {return jax.root.HTMLspanElement()},
getHoverBBox: function (jax,span) {
var bbox = span.bbox, em = HTMLCSS.outerEm;
var bbox = span.bbox, em = jax.outerEm;
var BBOX = {w:bbox.w*em, h:bbox.h*em, d:bbox.d*em};
if (bbox.width) {BBOX.width = bbox.width}
return BBOX;

View File

@ -24,7 +24,7 @@
MathJax.OutputJax.NativeMML = MathJax.OutputJax({
id: "NativeMML",
version: "1.1.7",
version: "1.1.8",
directory: MathJax.OutputJax.directory + "/NativeMML",
extensionDir: MathJax.OutputJax.extensionDir + "/NativeMML",

View File

@ -28,16 +28,12 @@
var EVENT, TOUCH, HOVER; // filled in later
nMML.Augment({
LEFTBUTTON: (isMSIE ? 1 : 0), // the event.button value for left button
MENUKEY: "altKey", // the event value for alternate context menu
noContextMenuBug: HUB.Browser.isKonequeror,
msieQuirks: (isMSIE && !(document.compatMode === "BackCompat")),
msieEventBug: HUB.Browser.isIE9,
//
// User can configure styles
//
config: {styles: {}}, settings: HUB.config.menuSettings,
config: {styles: {}},
settings: HUB.config.menuSettings,
Startup: function () {
// Set up event handling
EVENT = MathJax.Extension.MathEvents.Event;