Merge branch 'develop' into IE10

This commit is contained in:
Davide P. Cervone 2012-09-04 09:33:06 -04:00
commit bf680988b9
96 changed files with 1149 additions and 683 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

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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJAx.Extension["HTML-CSS/handle-floats"]={version:"2.0"};MathJax.Hub.Config({"HTML-CSS":{styles:{".MathJax_Display":{display:"table-cell",padding:"1em 0 ! important",width:(MathJax.Hub.Browser.isMSIE&&(document.documentMode||0)<8?"100%":"1000em")}}}});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.OutputJax["HTML-CSS"],b=a.Translate;a.Augment({Translate:function(c,f){b.call(this,c,f);if(c.MathJax.elementJax.HTMLCSS.display){var e=c.nextSibling;if(!e||e.className!=="MathJax_MSIE_Separator"){var d=a.Element("span",{className:"MathJax_MSIE_Separator"});c.parentNode.insertBefore(d,e)}}}});MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js"); MathJax.Extension["HTML-CSS/handle-floats"]={version:"2.0.1"};MathJax.Hub.Config({"HTML-CSS":{styles:{".MathJax_Display":{display:"table-cell",padding:"1em 0 ! important",width:(MathJax.Hub.Browser.isMSIE&&(document.documentMode||0)<8?"100%":"1000em")}}}});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.OutputJax["HTML-CSS"],b=a.Translate;a.Augment({Translate:function(c,f){b.call(this,c,f);if(c.MathJax.elementJax.HTMLCSS.display){var e=c.nextSibling;if(!e||e.className!=="MathJax_MSIE_Separator"){var d=a.Element("span",{className:"MathJax_MSIE_Separator"});c.parentNode.insertBefore(d,e)}}}});MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js");

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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Extension["TeX/HTML"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX;var a=b.Definitions;a.Add({macros:{href:"HREF_attribute","class":"CLASS_attribute",style:"STYLE_attribute",cssId:"ID_attribute"}});b.Parse.Augment({HREF_attribute:function(e){var d=this.GetArgument(e),c=this.GetArgumentMML(e);this.Push(c.With({href:d}))},CLASS_attribute:function(d){var e=this.GetArgument(d),c=this.GetArgumentMML(d);if(c["class"]!=null){e=c["class"]+" "+e}this.Push(c.With({"class":e}))},STYLE_attribute:function(d){var e=this.GetArgument(d),c=this.GetArgumentMML(d);if(c.style!=null){if(e.charAt(e.length-1)!==";"){e+=";"}e=c.style+" "+e}this.Push(c.With({style:e}))},ID_attribute:function(e){var d=this.GetArgument(e),c=this.GetArgumentMML(e);this.Push(c.With({id:d}))},GetArgumentMML:function(d){var c=this.ParseArg(d);if(c.inferred&&c.data.length==1){c=c.data[0]}else{delete c.inferred}return c}});MathJax.Hub.Startup.signal.Post("TeX HTML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/HTML.js"); MathJax.Extension["TeX/HTML"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX;var a=b.Definitions;a.Add({macros:{href:"HREF_attribute","class":"CLASS_attribute",style:"STYLE_attribute",cssId:"ID_attribute"}},null,true);b.Parse.Augment({HREF_attribute:function(e){var d=this.GetArgument(e),c=this.GetArgumentMML(e);this.Push(c.With({href:d}))},CLASS_attribute:function(d){var e=this.GetArgument(d),c=this.GetArgumentMML(d);if(c["class"]!=null){e=c["class"]+" "+e}this.Push(c.With({"class":e}))},STYLE_attribute:function(d){var e=this.GetArgument(d),c=this.GetArgumentMML(d);if(c.style!=null){if(e.charAt(e.length-1)!==";"){e+=";"}e=c.style+" "+e}this.Push(c.With({style:e}))},ID_attribute:function(e){var d=this.GetArgument(e),c=this.GetArgumentMML(e);this.Push(c.With({id:d}))},GetArgumentMML:function(d){var c=this.ParseArg(d);if(c.inferred&&c.data.length==1){c=c.data[0]}else{delete c.inferred}return c}});MathJax.Hub.Startup.signal.Post("TeX HTML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/HTML.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/action"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.macros.toggle="Toggle";b.Definitions.macros.mathtip="Mathtip";b.Definitions.macros.texttip=["Macro","\\mathtip{#1}{\\text{#2}}",2];b.Parse.Augment({Toggle:function(d){var e=[],c;while((c=this.GetArgument(d))!=="\\endtoggle"){e.push(b.Parse(c,this.stack.env).mml())}this.Push(a.maction.apply(a,e).With({actiontype:a.ACTIONTYPE.TOGGLE}))},Mathtip:function(d){var c=this.ParseArg(d),e=this.ParseArg(d);this.Push(a.maction(c,e).With({actiontype:a.ACTIONTYPE.TOOLTIP}))}});MathJax.Hub.Startup.signal.Post("TeX action Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/action.js"); MathJax.Extension["TeX/action"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.Add({macros:{toggle:"Toggle",mathtip:"Mathtip",texttip:["Macro","\\mathtip{#1}{\\text{#2}}",2]}},null,true);b.Parse.Augment({Toggle:function(d){var e=[],c;while((c=this.GetArgument(d))!=="\\endtoggle"){e.push(b.Parse(c,this.stack.env).mml())}this.Push(a.maction.apply(a,e).With({actiontype:a.ACTIONTYPE.TOGGLE}))},Mathtip:function(d){var c=this.ParseArg(d),e=this.ParseArg(d);this.Push(a.maction(c,e).With({actiontype:a.ACTIONTYPE.TOOLTIP}))}});MathJax.Hub.Startup.signal.Post("TeX action Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/action.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/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","DefineColor"],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"]); MathJax.Extension["TeX/autoload-all"]={version:"2.0.3"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var h={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","textcolor","colorbox","fcolorbox","DefineColor"],enclose:["enclose"],extpfeil:["Newextarrow","xlongequal","xmapsto","xtofrom","xtwoheadleftarrow","xtwoheadrightarrow"],mhchem:["ce","cee","cf"]};var c={AMSmath:["subarray","smallmatrix","equation","equation*"]};var d,g,b,a={macros:{},environment:{}};for(d in h){if(h.hasOwnProperty(d)){if(!MathJax.Extension["TeX/"+d]){var f=h[d];for(g=0,b=f.length;g<b;g++){a.macros[f[g]]=["Extension",d]}}}}for(d in c){if(c.hasOwnProperty(d)){if(!MathJax.Extension["TeX/"+d]){var e=c[d];for(g=0,b=e.length;g<b;g++){a.environment[e[g]]=["ExtensionEnv",null,d]}}}}MathJax.InputJax.TeX.Definitions.Add(a);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/bbox"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.macros.bbox="BBox";b.Parse.Augment({BBox:function(e){var n=this.GetBrackets(e,""),m=this.ParseArg(e);var j=n.split(/,/),g,d,c;for(var k in j){var f=j[k].replace(/^\s+/,"").replace(/\s+$/,"");var l=f.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(l){var h=l[1]+l[3];if(g){b.Error("Padding specified twice in "+e)}g={height:"+"+h,depth:"+"+h,lspace:h,width:"+"+(2*l[1])+l[3]}}else{if(f.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)){if(d){b.Error("Background specified twice in "+e)}d=f}else{if(f.match(/^[-a-z]+:/i)){if(c){b.Error("Style specified twice in "+e)}c=f}else{if(f!==""){b.Error("'"+f+"' doesn't look like a color, a padding dimension, or a style")}}}}}if(g){m=a.mpadded(m).With(g)}if(d||c){m=a.mstyle(m).With({mathbackground:d,style:c})}this.Push(m)}});MathJax.Hub.Startup.signal.Post("TeX bbox Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/bbox.js"); MathJax.Extension["TeX/bbox"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml;b.Definitions.Add({macros:{bbox:"BBox"}},null,true);b.Parse.Augment({BBox:function(e){var n=this.GetBrackets(e,""),m=this.ParseArg(e);var j=n.split(/,/),g,d,c;for(var k in j){var f=j[k].replace(/^\s+/,"").replace(/\s+$/,"");var l=f.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);if(l){var h=l[1]+l[3];if(g){b.Error("Padding specified twice in "+e)}g={height:"+"+h,depth:"+"+h,lspace:h,width:"+"+(2*l[1])+l[3]}}else{if(f.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)){if(d){b.Error("Background specified twice in "+e)}d=f}else{if(f.match(/^[-a-z]+:/i)){if(c){b.Error("Style specified twice in "+e)}c=f}else{if(f!==""){b.Error("'"+f+"' doesn't look like a color, a padding dimension, or a style")}}}}}if(g){m=a.mpadded(m).With(g)}if(d||c){m=a.mstyle(m).With({mathbackground:d,style:c})}this.Push(m)}});MathJax.Hub.Startup.signal.Post("TeX bbox Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/bbox.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/begingroup"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,b=d.Definitions;var a=MathJax.Object.Subclass({macros:null,environments:null,Init:function(e,f){this.macros=(e||{});this.environments=(f||{})},Find:function(e,f){if(this[f][e]){return this[f][e]}},Def:function(e,g,f){this[f][e]=g},Undef:function(e,f){delete this[f][e]},Merge:function(e){MathJax.Hub.Insert(this.macros,e.macros);MathJax.Hub.Insert(this.environments,e.environments)},MergeGlobals:function(e){var f=this.macros;for(var g in f){if(f.hasOwnProperty(g)&&f[g].global){e.Def(g,f[g],"macros",true);delete f[g].global;delete f[g]}}},Clear:function(g){this.environments={};if(g){this.macros={}}else{var e=this.macros;for(var f in e){if(e.hasOwnProperty(f)&&!e[f].global){delete e[f]}}}return this}});var c=d.nsStack=MathJax.Object.Subclass({stack:null,top:0,isEqn:false,Init:function(e){this.isEqn=e;this.stack=[];if(!e){this.Push(a(b.macros,b.environments))}else{this.Push(a())}},Def:function(e,h,f,g){var i=this.top-1;if(g){while(i>0){this.stack[i].Undef(e,f);i--}if(!(h instanceof Array)){h=[h]}if(this.isEqn){h.global=true}}this.stack[i].Def(e,h,f)},Push:function(e){this.stack.push(e);this.top=this.stack.length},Pop:function(){var e;if(this.top>1){e=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return e},Find:function(e,g){for(var f=this.top-1;f>=0;f--){var h=this.stack[f].Find(e,g);if(h){return h}}return null},Merge:function(e){e.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(e.stack[0]);var f=[this.top,this.stack.length-this.top].concat(e.stack.slice(1));this.stack.splice.apply(this.stack,f);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(e){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.macros.begingroup="BeginGroup";b.macros.endgroup="EndGroup";b.macros.global=["Extension","newcommand"];b.macros.gdef=["Extension","newcommand"];d.Parse.Augment({BeginGroup:function(e){d.eqnStack.Push(a())},EndGroup:function(e){if(d.eqnStack.top>1){d.eqnStack.Pop()}else{if(d.rootStack.top===1){d.Error("Extra "+e+" or missing \\begingroup")}else{d.eqnStack.Clear();d.rootStack.Pop()}}},csFindMacro:function(e){return(d.eqnStack.Find(e,"macros")||d.rootStack.Find(e,"macros"))},envFindName:function(e){return(d.eqnStack.Find(e,"environments")||d.rootStack.Find(e,"environments"))}});d.rootStack=c();d.eqnStack=c(true);d.prefilterHooks.Add(function(){d.rootStack.Reset();d.eqnStack.Clear(true)});d.postfilterHooks.Add(function(){d.rootStack.Merge(d.eqnStack)});MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){b.macros.global="Global";b.macros.gdef=["Macro","\\global\\def"];d.Parse.Augment({setDef:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"environments")},Global:function(e){var f=this.i;var g=this.GetCSname(e);this.i=f;if(g!=="let"&&g!=="def"&&g!=="newcommand"){d.Error(e+" not followed by \\let, \\def, or \\newcommand")}this.stack.env.isGlobal=true}})});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js"); MathJax.Extension["TeX/begingroup"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,b=d.Definitions;var a=MathJax.Object.Subclass({macros:null,environments:null,Init:function(e,f){this.macros=(e||{});this.environments=(f||{})},Find:function(e,f){if(this[f][e]){return this[f][e]}},Def:function(e,g,f){this[f][e]=g},Undef:function(e,f){delete this[f][e]},Merge:function(e){MathJax.Hub.Insert(this.macros,e.macros);MathJax.Hub.Insert(this.environments,e.environments)},MergeGlobals:function(e){var f=this.macros;for(var g in f){if(f.hasOwnProperty(g)&&f[g].global){e.Def(g,f[g],"macros",true);delete f[g].global;delete f[g]}}},Clear:function(g){this.environments={};if(g){this.macros={}}else{var e=this.macros;for(var f in e){if(e.hasOwnProperty(f)&&!e[f].global){delete e[f]}}}return this}});var c=d.nsStack=MathJax.Object.Subclass({stack:null,top:0,isEqn:false,Init:function(e){this.isEqn=e;this.stack=[];if(!e){this.Push(a(b.macros,b.environment))}else{this.Push(a())}},Def:function(e,h,f,g){var i=this.top-1;if(g){while(i>0){this.stack[i].Undef(e,f);i--}if(!(h instanceof Array)){h=[h]}if(this.isEqn){h.global=true}}this.stack[i].Def(e,h,f)},Push:function(e){this.stack.push(e);this.top=this.stack.length},Pop:function(){var e;if(this.top>1){e=this.stack[--this.top];if(this.isEqn){this.stack.pop()}}else{if(this.isEqn){this.Clear()}}return e},Find:function(e,g){for(var f=this.top-1;f>=0;f--){var h=this.stack[f].Find(e,g);if(h){return h}}return null},Merge:function(e){e.stack[0].MergeGlobals(this);this.stack[this.top-1].Merge(e.stack[0]);var f=[this.top,this.stack.length-this.top].concat(e.stack.slice(1));this.stack.splice.apply(this.stack,f);this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(e){this.stack=[this.stack[0].Clear()];this.top=this.stack.length}},{nsFrame:a});b.Add({macros:{begingroup:"BeginGroup",endgroup:"EndGroup",global:["Extension","newcommand"],gdef:["Extension","newcommand"]}},null,true);d.Parse.Augment({BeginGroup:function(e){d.eqnStack.Push(a())},EndGroup:function(e){if(d.eqnStack.top>1){d.eqnStack.Pop()}else{if(d.rootStack.top===1){d.Error("Extra "+e+" or missing \\begingroup")}else{d.eqnStack.Clear();d.rootStack.Pop()}}},csFindMacro:function(e){return(d.eqnStack.Find(e,"macros")||d.rootStack.Find(e,"macros"))},envFindName:function(e){return(d.eqnStack.Find(e,"environments")||d.rootStack.Find(e,"environments"))}});d.rootStack=c();d.eqnStack=c(true);d.prefilterHooks.Add(function(){d.rootStack.Reset();d.eqnStack.Clear(true)});d.postfilterHooks.Add(function(){d.rootStack.Merge(d.eqnStack)});MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){b.Add({macros:{global:"Global",gdef:["Macro","\\global\\def"]}},null,true);d.Parse.Augment({setDef:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"macros",this.stack.env.isGlobal);delete this.stack.env.isGlobal},setEnv:function(e,f){f.isUser=true;d.eqnStack.Def(e,f,"environments")},Global:function(e){var f=this.i;var g=this.GetCSname(e);this.i=f;if(g!=="let"&&g!=="def"&&g!=="newcommand"){d.Error(e+" not followed by \\let, \\def, or \\newcommand")}this.stack.env.isGlobal=true}})});MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.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/boldsymbol"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;var c={};c[a.VARIANT.NORMAL]=a.VARIANT.BOLD;c[a.VARIANT.ITALIC]=a.VARIANT.BOLDITALIC;c[a.VARIANT.FRAKTUR]=a.VARIANT.BOLDFRAKTUR;c[a.VARIANT.SCRIPT]=a.VARIANT.BOLDSCRIPT;c[a.VARIANT.SANSSERIF]=a.VARIANT.BOLDSANSSERIF;c["-tex-caligraphic"]="-tex-caligraphic-bold";c["-tex-oldstyle"]="-tex-oldstyle-bold";b.macros.boldsymbol="Boldsymbol";d.Parse.Augment({mmlToken:function(f){if(this.stack.env.boldsymbol){var e=f.Get("mathvariant");if(e==null){f.mathvariant=a.VARIANT.BOLD}else{f.mathvariant=(c[e]||e)}}return f},Boldsymbol:function(h){var e=this.stack.env.boldsymbol,f=this.stack.env.font;this.stack.env.boldsymbol=true;this.stack.env.font=null;var g=this.ParseArg(h);this.stack.env.font=f;this.stack.env.boldsymbol=e;this.Push(g)}});MathJax.Hub.Startup.signal.Post("TeX boldsymbol Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.OutputJax["HTML-CSS"];var c=a.FONTDATA.FONTS;var b=a.FONTDATA.VARIANT;if(a.fontInUse==="TeX"){c["MathJax_Caligraphic-bold"]="Caligraphic/Bold/Main.js";b["-tex-caligraphic-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],offsetA:65,variantA:"bold-italic"};b["-tex-oldstyle-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"]};if(a.msieCheckGreek&&a.Font.testFont({family:"MathJax_Greek",weight:"bold",style:"italic",testString:a.msieCheckGreek})){b["bold-italic"].offsetG=913;b["bold-italic"].variantG="-Greek-Bold-Italic";b["-Greek-Bold-Italic"]={fonts:["MathJax_Greek-bold-italic"]};c["MathJax_Greek-bold-italic"]="Greek/BoldItalic/Main.js"}if(MathJax.Hub.Browser.isChrome&&!MathJax.Hub.Browser.versionAtLeast("5.0")){b["-tex-caligraphic-bold"].remap={84:[58096,"-WinChrome"]}}}else{if(a.fontInUse==="STIX"){b["-tex-caligraphic-bold"]={fonts:["STIXGeneral-bold-italic","STIXNonUnicode-bold-italic","STIXNonUnicode","STIXGeneral","STIXSizeOneSym"],offsetA:57927,noLowerCase:1};b["-tex-oldstyle-bold"]={fonts:["STIXGeneral-bold","STIXNonUnicode-bold","STIXGeneral","STIXSizeOneSym"],offsetN:57955,remap:{57956:57959,57957:57963,57958:57967,57959:57971,57960:57975,57961:57979,57962:57983,57963:57987,57964:57991}}}}});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c=MathJax.OutputJax.SVG;var b=c.FONTDATA.FONTS;var a=c.FONTDATA.VARIANT;b["MathJax_Caligraphic-bold"]="Caligraphic/Bold/Main.js";a["-tex-caligraphic-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],offsetA:65,variantA:"bold-italic"};a["-tex-oldstyle-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"]}});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.js"); MathJax.Extension["TeX/boldsymbol"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;var c={};c[a.VARIANT.NORMAL]=a.VARIANT.BOLD;c[a.VARIANT.ITALIC]=a.VARIANT.BOLDITALIC;c[a.VARIANT.FRAKTUR]=a.VARIANT.BOLDFRAKTUR;c[a.VARIANT.SCRIPT]=a.VARIANT.BOLDSCRIPT;c[a.VARIANT.SANSSERIF]=a.VARIANT.BOLDSANSSERIF;c["-tex-caligraphic"]="-tex-caligraphic-bold";c["-tex-oldstyle"]="-tex-oldstyle-bold";b.Add({macros:{boldsymbol:"Boldsymbol"}},null,true);d.Parse.Augment({mmlToken:function(f){if(this.stack.env.boldsymbol){var e=f.Get("mathvariant");if(e==null){f.mathvariant=a.VARIANT.BOLD}else{f.mathvariant=(c[e]||e)}}return f},Boldsymbol:function(h){var e=this.stack.env.boldsymbol,f=this.stack.env.font;this.stack.env.boldsymbol=true;this.stack.env.font=null;var g=this.ParseArg(h);this.stack.env.font=f;this.stack.env.boldsymbol=e;this.Push(g)}});MathJax.Hub.Startup.signal.Post("TeX boldsymbol Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.OutputJax["HTML-CSS"];var c=a.FONTDATA.FONTS;var b=a.FONTDATA.VARIANT;if(a.fontInUse==="TeX"){c["MathJax_Caligraphic-bold"]="Caligraphic/Bold/Main.js";b["-tex-caligraphic-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],offsetA:65,variantA:"bold-italic"};b["-tex-oldstyle-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"]};if(a.msieCheckGreek&&a.Font.testFont({family:"MathJax_Greek",weight:"bold",style:"italic",testString:a.msieCheckGreek})){b["bold-italic"].offsetG=913;b["bold-italic"].variantG="-Greek-Bold-Italic";b["-Greek-Bold-Italic"]={fonts:["MathJax_Greek-bold-italic"]};c["MathJax_Greek-bold-italic"]="Greek/BoldItalic/Main.js"}if(MathJax.Hub.Browser.isChrome&&!MathJax.Hub.Browser.versionAtLeast("5.0")){b["-tex-caligraphic-bold"].remap={84:[58096,"-WinChrome"]}}}else{if(a.fontInUse==="STIX"){b["-tex-caligraphic-bold"]={fonts:["STIXGeneral-bold-italic","STIXNonUnicode-bold-italic","STIXNonUnicode","STIXGeneral","STIXSizeOneSym"],offsetA:57927,noLowerCase:1};b["-tex-oldstyle-bold"]={fonts:["STIXGeneral-bold","STIXNonUnicode-bold","STIXGeneral","STIXSizeOneSym"],offsetN:57955,remap:{57956:57959,57957:57963,57958:57967,57959:57971,57960:57975,57961:57979,57962:57983,57963:57987,57964:57991}}}}});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var c=MathJax.OutputJax.SVG;var b=c.FONTDATA.FONTS;var a=c.FONTDATA.VARIANT;b["MathJax_Caligraphic-bold"]="Caligraphic/Bold/Main.js";a["-tex-caligraphic-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"],offsetA:65,variantA:"bold-italic"};a["-tex-oldstyle-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1"]}});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.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/cancel"]={version:"2.0",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var d=MathJax.InputJax.TeX,c=d.Definitions.macros,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/cancel"];b.setAttributes=function(j,f){if(f!==""){f=f.replace(/ /g,"").split(/,/);for(var h=0,e=f.length;h<e;h++){var g=f[h].split(/[:=]/);if(b.ALLOWED[g[0]]){if(g[1]==="true"){g[1]=true}if(g[1]==="false"){g[1]=false}j[g[0]]=g[1]}}}return j};c.cancel=["Cancel",a.NOTATION.UPDIAGONALSTRIKE];c.bcancel=["Cancel",a.NOTATION.DOWNDIAGONALSTRIKE];c.xcancel=["Cancel",a.NOTATION.UPDIAGONALSTRIKE+" "+a.NOTATION.DOWNDIAGONALSTRIKE];c.cancelto="CancelTo";d.Parse.Augment({Cancel:function(f,h){var e=this.GetBrackets(f,""),g=this.ParseArg(f);var i=b.setAttributes({notation:h},e);this.Push(a.menclose(g).With(i))},CancelTo:function(f,h){var j=this.ParseArg(f),e=this.GetBrackets(f,""),g=this.ParseArg(f);var i=b.setAttributes({notation:a.NOTATION.UPDIAGONALSTRIKE,arrow:true},e);j=a.mpadded(j).With({depth:"-.1em",height:"+.1em",voffset:".1em"});this.Push(a.msup(a.menclose(g).With(i),j))}});MathJax.Hub.Startup.signal.Post("TeX cancel Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/cancel.js"); MathJax.Extension["TeX/cancel"]={version:"2.0.1",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/cancel"];b.setAttributes=function(h,e){if(e!==""){e=e.replace(/ /g,"").split(/,/);for(var g=0,d=e.length;g<d;g++){var f=e[g].split(/[:=]/);if(b.ALLOWED[f[0]]){if(f[1]==="true"){f[1]=true}if(f[1]==="false"){f[1]=false}h[f[0]]=f[1]}}}return h};c.Definitions.Add({macros:{cancel:["Cancel",a.NOTATION.UPDIAGONALSTRIKE],bcancel:["Cancel",a.NOTATION.DOWNDIAGONALSTRIKE],xcancel:["Cancel",a.NOTATION.UPDIAGONALSTRIKE+" "+a.NOTATION.DOWNDIAGONALSTRIKE],cancelto:"CancelTo"}},null,true);c.Parse.Augment({Cancel:function(e,g){var d=this.GetBrackets(e,""),f=this.ParseArg(e);var h=b.setAttributes({notation:g},d);this.Push(a.menclose(f).With(h))},CancelTo:function(e,g){var i=this.ParseArg(e),d=this.GetBrackets(e,""),f=this.ParseArg(e);var h=b.setAttributes({notation:a.NOTATION.UPDIAGONALSTRIKE,arrow:true},d);i=a.mpadded(i).With({depth:"-.1em",height:"+.1em",voffset:".1em"});this.Push(a.msup(a.menclose(f).With(h),i))}});MathJax.Hub.Startup.signal.Post("TeX cancel Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/cancel.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.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"); MathJax.Extension["TeX/color"]={version:"2.0.2",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_RGB:function(b){b=b.split(/,/);var a="#";if(b.length!==3){this.TEX.Error("RGB colors require 3 numbers")}for(var c=0;c<3;c++){if(!b[c].match(/^\d+$/)){this.TEX.Error("Invalid number")}var d=parseInt(b[c]);if(d>255){this.TEX.Error("RGB values must be between 0 and 255")}d=d.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.Add({macros:{color:"Color",textcolor:"TextColor",definecolor:"DefineColor",colorbox:"ColorBox",fcolorbox:"fColorBox"}},null,true);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)},TextColor:function(h){var g=this.GetBrackets(h),f=this.GetArgument(h);f=b.getColor(g,f);var e=this.stack.env.color;this.stack.env.color=f;var i=this.ParseArg(h);if(e){this.stack.env.color}else{delete this.stack.env.color}this.Push(a.mstyle(i).With({mathcolor: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

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Extension["TeX/enclose"]={version:"2.0",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/enclose"].ALLOWED;c.Definitions.macros.enclose="Enclose";c.Parse.Augment({Enclose:function(g){var k=this.GetArgument(g),e=this.GetBrackets(g),j=this.ParseArg(g);var l={notation:k.replace(/,/g," ")};if(e){e=e.replace(/ /g,"").split(/,/);for(var h=0,d=e.length;h<d;h++){var f=e[h].split(/[:=]/);if(b[f[0]]){f[1]=f[1].replace(/^"(.*)"$/,"$1");if(f[1]==="true"){f[1]=true}if(f[1]==="false"){f[1]=false}l[f[0]]=f[1]}}}this.Push(a.menclose(j).With(l))}});MathJax.Hub.Startup.signal.Post("TeX enclose Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/enclose.js"); MathJax.Extension["TeX/enclose"]={version:"2.0.1",ALLOWED:{arrow:1,color:1,mathcolor:1,background:1,mathbackground:1,padding:1,thickness:1}};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX,a=MathJax.ElementJax.mml,b=MathJax.Extension["TeX/enclose"].ALLOWED;c.Definitions.Add({macros:{enclose:"Enclose"}},null,true);c.Parse.Augment({Enclose:function(g){var k=this.GetArgument(g),e=this.GetBrackets(g),j=this.ParseArg(g);var l={notation:k.replace(/,/g," ")};if(e){e=e.replace(/ /g,"").split(/,/);for(var h=0,d=e.length;h<d;h++){var f=e[h].split(/[:=]/);if(b[f[0]]){f[1]=f[1].replace(/^"(.*)"$/,"$1");if(f[1]==="true"){f[1]=true}if(f[1]==="false"){f[1]=false}l[f[0]]=f[1]}}}this.Push(a.menclose(j).With(l))}});MathJax.Hub.Startup.signal.Post("TeX enclose Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/enclose.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/extpfeil"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=b.Definitions;MathJax.Hub.Insert(a,{macros:{xtwoheadrightarrow:["Extension","AMSmath"],xtwoheadleftarrow:["Extension","AMSmath"],xmapsto:["Extension","AMSmath"],xlongequal:["Extension","AMSmath"],xtofrom:["Extension","AMSmath"],Newextarrow:["Extension","AMSmath"]}});MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function(){MathJax.Hub.Insert(a,{macros:{xtwoheadrightarrow:["xArrow",8608,12,16],xtwoheadleftarrow:["xArrow",8606,17,13],xmapsto:["xArrow",8614,6,7],xlongequal:["xArrow",61,7,7],xtofrom:["xArrow",8644,12,12],Newextarrow:"NewExtArrow"}})});b.Parse.Augment({NewExtArrow:function(c){var e=this.GetArgument(c),f=this.GetArgument(c),d=this.GetArgument(c);if(!e.match(/^\\([a-z]+|.)$/i)){b.Error("First argument to "+c+" must be a control sequence name")}if(!f.match(/^(\d+),(\d+)$/)){b.Error("Second argument to "+c+" must be two integers separated by a comma")}if(!d.match(/^(\d+|0x[0-9A-F]+)$/i)){b.Error("Third argument to "+c+" must be a unicode character number")}e=e.substr(1);f=f.split(",");d=parseInt(d);a.macros[e]=["xArrow",d,parseInt(f[0]),parseInt(f[1])]}});MathJax.Hub.Startup.signal.Post("TeX extpfeil Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/extpfeil.js"); MathJax.Extension["TeX/extpfeil"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var b=MathJax.InputJax.TeX,a=b.Definitions;a.Add({macros:{xtwoheadrightarrow:["Extension","AMSmath"],xtwoheadleftarrow:["Extension","AMSmath"],xmapsto:["Extension","AMSmath"],xlongequal:["Extension","AMSmath"],xtofrom:["Extension","AMSmath"],Newextarrow:["Extension","AMSmath"]}},null,true);MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function(){MathJax.Hub.Insert(a,{macros:{xtwoheadrightarrow:["xArrow",8608,12,16],xtwoheadleftarrow:["xArrow",8606,17,13],xmapsto:["xArrow",8614,6,7],xlongequal:["xArrow",61,7,7],xtofrom:["xArrow",8644,12,12],Newextarrow:"NewExtArrow"}})});b.Parse.Augment({NewExtArrow:function(c){var e=this.GetArgument(c),f=this.GetArgument(c),d=this.GetArgument(c);if(!e.match(/^\\([a-z]+|.)$/i)){b.Error("First argument to "+c+" must be a control sequence name")}if(!f.match(/^(\d+),(\d+)$/)){b.Error("Second argument to "+c+" must be two integers separated by a comma")}if(!d.match(/^(\d+|0x[0-9A-F]+)$/i)){b.Error("Third argument to "+c+" must be a unicode character number")}e=e.substr(1);f=f.split(",");d=parseInt(d);a.macros[e]=["xArrow",d,parseInt(f[0]),parseInt(f[1])]}});MathJax.Hub.Startup.signal.Post("TeX extpfeil Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/extpfeil.js");

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c="2.0";var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;b.macros.mathchoice="MathChoice";d.Parse.Augment({MathChoice:function(f){var i=this.ParseArg(f),e=this.ParseArg(f),g=this.ParseArg(f),h=this.ParseArg(f);this.Push(a.TeXmathchoice(i,e,g,h))}});a.TeXmathchoice=a.mbase.Subclass({type:"TeXmathchoice",choice:function(){var e=this.getValues("displaystyle","scriptlevel");if(e.scriptlevel>0){return Math.min(3,e.scriptlevel+1)}return(e.displaystyle?0:1)},setTeXclass:function(e){return this.Core().setTeXclass(e)},isSpacelike:function(){return this.Core().isSpacelike()},isEmbellished:function(){return this.Core().isEmbellished()},Core:function(){return this.data[this.choice()]},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){return this.Core().toSVG()}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.js"); MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c="2.0.1";var a=MathJax.ElementJax.mml;var d=MathJax.InputJax.TeX;var b=d.Definitions;b.Add({macros:{mathchoice:"MathChoice"}},null,true);d.Parse.Augment({MathChoice:function(f){var i=this.ParseArg(f),e=this.ParseArg(f),g=this.ParseArg(f),h=this.ParseArg(f);this.Push(a.TeXmathchoice(i,e,g,h))}});a.TeXmathchoice=a.mbase.Subclass({type:"TeXmathchoice",choice:function(){var e=this.getValues("displaystyle","scriptlevel");if(e.scriptlevel>0){return Math.min(3,e.scriptlevel+1)}return(e.displaystyle?0:1)},setTeXclass:function(e){return this.Core().setTeXclass(e)},isSpacelike:function(){return this.Core().isSpacelike()},isEmbellished:function(){return this.Core().isEmbellished()},Core:function(){return this.data[this.choice()]},toHTML:function(e){e=this.HTMLcreateSpan(e);e.bbox=this.Core().toHTML(e).bbox;if(e.firstChild&&e.firstChild.style.marginLeft){e.style.marginLeft=e.firstChild.style.marginLeft;e.firstChild.style.marginLeft=""}return e},toSVG:function(){return this.Core().toSVG()}});MathJax.Hub.Startup.signal.Post("TeX mathchoice Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mathchoice.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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Extension["TeX/unicode"]={version:"2.0",unicode:{},config:MathJax.Hub.CombineConfig("TeX.unicode",{fonts:"STIXGeneral,'Arial Unicode MS'"})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;var a=MathJax.ElementJax.mml;var b=MathJax.Extension["TeX/unicode"].unicode;c.Definitions.macros.unicode="Unicode";c.Parse.Augment({Unicode:function(e){var i=this.GetBrackets(e),d;if(i){if(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)){i=i.replace(/ /g,"").split(/,/);d=this.GetBrackets(e)}else{d=i;i=null}}var j=this.trimSpaces(this.GetArgument(e)),h=parseInt(j.match(/^x/)?"0"+j:j);if(!b[h]){b[h]=[800,200,d,h]}else{if(!d){d=b[h][2]}}if(i){b[h][0]=Math.floor(i[0]*1000);b[h][1]=Math.floor(i[1]*1000)}var f=this.stack.env.font,g={};if(d){b[h][2]=g.fontfamily=d.replace(/"/g,"'");if(f){if(f.match(/bold/)){g.fontweight="bold"}if(f.match(/italic|-mathit/)){g.fontstyle="italic"}}}else{if(f){g.mathvariant=f}}g.unicode=[].concat(b[h]);this.Push(a.mtext(a.entity("#"+j)).With(g))}});MathJax.Hub.Startup.signal.Post("TeX unicode Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.HTMLgetVariant;a.mbase.Augment({HTMLgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.defaultFont){d=MathJax.Hub.Insert({},d);d.defaultFont={family:c}}var e=this.unicode[2];if(e){e+=","+c}else{e=c}d.defaultFont[this.unicode[3]]=[this.unicode[0],this.unicode[1],500,0,500,{isUnknown:true,isUnicode:true,font:e}];return d}})});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.SVGgetVariant;a.mbase.Augment({SVGgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.forceFamily){d=MathJax.Hub.Insert({},d)}d.defaultFamily=c;d.noRemap=true;d.h=this.unicode[0];d.d=this.unicode[1];return d}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.js"); MathJax.Extension["TeX/unicode"]={version:"2.0.1",unicode:{},config:MathJax.Hub.CombineConfig("TeX.unicode",{fonts:"STIXGeneral,'Arial Unicode MS'"})};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var c=MathJax.InputJax.TeX;var a=MathJax.ElementJax.mml;var b=MathJax.Extension["TeX/unicode"].unicode;c.Definitions.Add({macros:{unicode:"Unicode"}},null,true);c.Parse.Augment({Unicode:function(e){var i=this.GetBrackets(e),d;if(i){if(i.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)){i=i.replace(/ /g,"").split(/,/);d=this.GetBrackets(e)}else{d=i;i=null}}var j=this.trimSpaces(this.GetArgument(e)),h=parseInt(j.match(/^x/)?"0"+j:j);if(!b[h]){b[h]=[800,200,d,h]}else{if(!d){d=b[h][2]}}if(i){b[h][0]=Math.floor(i[0]*1000);b[h][1]=Math.floor(i[1]*1000)}var f=this.stack.env.font,g={};if(d){b[h][2]=g.fontfamily=d.replace(/"/g,"'");if(f){if(f.match(/bold/)){g.fontweight="bold"}if(f.match(/italic|-mathit/)){g.fontstyle="italic"}}}else{if(f){g.mathvariant=f}}g.unicode=[].concat(b[h]);this.Push(a.mtext(a.entity("#"+j)).With(g))}});MathJax.Hub.Startup.signal.Post("TeX unicode Ready")});MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.HTMLgetVariant;a.mbase.Augment({HTMLgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.defaultFont){d=MathJax.Hub.Insert({},d);d.defaultFont={family:c}}var e=this.unicode[2];if(e){e+=","+c}else{e=c}d.defaultFont[this.unicode[3]]=[this.unicode[0],this.unicode[1],500,0,500,{isUnknown:true,isUnicode:true,font:e}];return d}})});MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.Extension["TeX/unicode"].config.fonts;var b=a.mbase.prototype.SVGgetVariant;a.mbase.Augment({SVGgetVariant:function(){var d=b.call(this);if(d.unicode){delete d.unicode;delete d.FONTS}if(!this.unicode){return d}d.unicode=true;if(!d.forceFamily){d=MathJax.Hub.Insert({},d)}d.defaultFamily=c;d.noRemap=true;d.h=this.unicode[0];d.d=this.unicode[1];return d}})});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.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/verb"]={version:"2.0"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX;var b=c.Definitions;b.macros.verb="Verb";c.Parse.Augment({Verb:function(d){var g=this.GetNext();var f=++this.i;if(g==""){c.Error(d+" requires an argument")}while(this.i<this.string.length&&this.string.charAt(this.i)!=g){this.i++}if(this.i==this.string.length){c.Error("Can't find closing delimiter for "+d)}var e=this.string.slice(f,this.i);this.i++;this.Push(a.mtext(e).With({mathvariant:a.VARIANT.MONOSPACE}))}});MathJax.Hub.Startup.signal.Post("TeX verb Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/verb.js"); MathJax.Extension["TeX/verb"]={version:"2.0.1"};MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.ElementJax.mml;var c=MathJax.InputJax.TeX;var b=c.Definitions;b.Add({macros:{verb:"Verb"}},null,true);c.Parse.Augment({Verb:function(d){var g=this.GetNext();var f=++this.i;if(g==""){c.Error(d+" requires an argument")}while(this.i<this.string.length&&this.string.charAt(this.i)!=g){this.i++}if(this.i==this.string.length){c.Error("Can't find closing delimiter for "+d)}var e=this.string.slice(f,this.i);this.i++;this.Push(a.mtext(e).With({mathvariant:a.VARIANT.MONOSPACE}))}});MathJax.Hub.Startup.signal.Post("TeX verb Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/verb.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.jsMath2jax={version:"2.0",config:{preview:"TeX"},PreProcess:function(b){if(!this.configured){this.config=MathJax.Hub.CombineConfig("jsMath2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.previewClass=MathJax.Hub.config.preRemoveClass;this.configured=true}if(typeof(b)==="string"){b=document.getElementById(b)}if(!b){b=document.body}var c=b.getElementsByTagName("span"),a;for(a=c.length-1;a>=0;a--){if(String(c[a].className).match(/(^| )math( |$)/)){this.ConvertMath(c[a],"")}}var d=b.getElementsByTagName("div");for(a=d.length-1;a>=0;a--){if(String(d[a].className).match(/(^| )math( |$)/)){this.ConvertMath(d[a],"; mode=display")}}},ConvertMath:function(c,d){if(c.getElementsByTagName("script").length===0){var b=c.parentNode,a=this.createMathTag(d,c.innerHTML);if(c.nextSibling){b.insertBefore(a,c.nextSibling)}else{b.appendChild(a)}if(this.config.preview!=="none"){this.createPreview(c)}b.removeChild(c)}},createPreview:function(a){var b;if(this.config.preview==="TeX"){b=[this.filterPreview(a.innerHTML)]}else{if(this.config.preview instanceof Array){b=this.config.preview}}if(b){b=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},b);a.parentNode.insertBefore(b,a)}},createMathTag:function(c,b){b=b.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");var a=document.createElement("script");a.type="math/tex"+c;MathJax.HTML.setScript(a,b);return a},filterPreview:function(a){return a}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.jsMath2jax]);MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js"); MathJax.Extension.jsMath2jax={version:"2.0",config:{preview:"TeX"},PreProcess:function(b){if(!this.configured){this.config=MathJax.Hub.CombineConfig("jsMath2jax",this.config);if(this.config.Augment){MathJax.Hub.Insert(this,this.config.Augment)}if(typeof(this.config.previewTeX)!=="undefined"&&!this.config.previewTeX){this.config.preview="none"}this.previewClass=MathJax.Hub.config.preRemoveClass;this.configured=true}if(typeof(b)==="string"){b=document.getElementById(b)}if(!b){b=document.body}var c=b.getElementsByTagName("span"),a;for(a=c.length-1;a>=0;a--){if(String(c[a].className).match(/(^| )math( |$)/)){this.ConvertMath(c[a],"")}}var d=b.getElementsByTagName("div");for(a=d.length-1;a>=0;a--){if(String(d[a].className).match(/(^| )math( |$)/)){this.ConvertMath(d[a],"; mode=display")}}},ConvertMath:function(c,d){if(c.getElementsByTagName("script").length===0){var b=c.parentNode,a=this.createMathTag(d,c.innerHTML);if(c.nextSibling){b.insertBefore(a,c.nextSibling)}else{b.appendChild(a)}if(this.config.preview!=="none"){this.createPreview(c)}b.removeChild(c)}},createPreview:function(a){var b;if(this.config.preview==="TeX"){b=[this.filterPreview(a.innerHTML)]}else{if(this.config.preview instanceof Array){b=this.config.preview}}if(b){b=MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},b);a.parentNode.insertBefore(b,a)}},createMathTag:function(c,b){b=b.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");var a=document.createElement("script");a.type="math/tex"+c;MathJax.HTML.setScript(a,b);return a},filterPreview:function(a){return a}};MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.jsMath2jax],8);MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js");

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var b="2.0";var a=MathJax.ElementJax.mml;SETTINGS=MathJax.Hub.config.menuSettings;a.mbase.Augment({toMathML:function(k){var g=(this.inferred&&this.parent.inferRow);if(k==null){k=""}var e=this.type,d=this.toMathMLattributes();if(e==="mspace"){return k+"<"+e+d+" />"}var j=[];var h=(this.isToken?"":k+(g?"":" "));for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){j.push(this.data[f].toMathML(h))}else{if(!this.isToken){j.push(h+"<mrow />")}}}if(this.isToken){return k+"<"+e+d+">"+j.join("")+"</"+e+">"}if(g){return j.join("\n")}if(j.length===0||(j.length===1&&j[0]==="")){return k+"<"+e+d+" />"}return k+"<"+e+d+">\n"+j.join("\n")+"\n"+k+"</"+e+">"},toMathMLattributes:function(){var j=[],g=this.defaults;var c=(this.attrNames||a.copyAttributeNames),l=a.skipAttributes;if(this.type==="math"){j.push('xmlns="http://www.w3.org/1998/Math/MathML"')}if(!this.attrNames){if(this.type==="mstyle"){g=a.math.prototype.defaults}for(var d in g){if(!l[d]&&g.hasOwnProperty(d)){var e=(d==="open"||d==="close");if(this[d]!=null&&(e||this[d]!==g[d])){var k=this[d];delete this[d];if(e||this.Get(d)!==k){j.push(d+'="'+this.toMathMLattribute(k)+'"')}this[d]=k}}}}for(var h=0,f=c.length;h<f;h++){if(c[h]==="class"){continue}k=(this.attr||{})[c[h]];if(k==null){k=this[c[h]]}if(k!=null){j.push(c[h]+'="'+this.toMathMLquote(k)+'"')}}this.toMathMLclass(j);if(j.length){return" "+j.join(" ")}else{return""}},toMathMLclass:function(c){var e=[];if(this["class"]){e.push(this["class"])}if(this.isa(a.TeXAtom)&&SETTINGS.texHints){var d=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];if(d){e.push("MJX-TeXAtom-"+d)}}if(this.mathvariant&&this.toMathMLvariants[this.mathvariant]){e.push("MJX"+this.mathvariant)}if(this.arrow){e.push("MJX-arrow")}if(this.variantForm){e.push("MJX-variant")}if(e.length){c.unshift('class="'+e.join(" ")+'"')}},toMathMLattribute:function(c){if(typeof(c)==="string"&&c.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)){return((1/18)*RegExp.$1).toFixed(3).replace(/\.?0+$/,"")+"em"}else{if(this.toMathMLvariants[c]){return this.toMathMLvariants[c]}}return this.toMathMLquote(c)},toMathMLvariants:{"-tex-caligraphic":a.VARIANT.SCRIPT,"-tex-caligraphic-bold":a.VARIANT.BOLDSCRIPT,"-tex-oldstyle":a.VARIANT.NORMAL,"-tex-oldstyle-bold":a.VARIANT.BOLD,"-tex-mathit":a.VARIANT.ITALIC},toMathMLquote:function(e){e=String(e).split("");for(var f=0,d=e.length;f<d;f++){var h=e[f].charCodeAt(0);if(h<32||h>126){e[f]="&#x"+h.toString(16).toUpperCase()+";"}else{var g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e[f]];if(g){e[f]=g}}}return e.join("")}});a.msubsup.Augment({toMathML:function(h){var e=this.type;if(this.data[this.sup]==null){e="msub"}if(this.data[this.sub]==null){e="msup"}var d=this.toMathMLattributes();delete this.data[0].inferred;var g=[];for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){g.push(this.data[f].toMathML(h+" "))}}return h+"<"+e+d+">\n"+g.join("\n")+"\n"+h+"</"+e+">"}});a.munderover.Augment({toMathML:function(h){var e=this.type;if(this.data[this.under]==null){e="mover"}if(this.data[this.over]==null){e="munder"}var d=this.toMathMLattributes();delete this.data[0].inferred;var g=[];for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){g.push(this.data[f].toMathML(h+" "))}}return h+"<"+e+d+">\n"+g.join("\n")+"\n"+h+"</"+e+">"}});a.TeXAtom.Augment({toMathML:function(d){var c=this.toMathMLattributes();if(!c&&this.data[0].data.length===1){return d.substr(2)+this.data[0].toMathML(d)}return d+"<mrow"+c+">\n"+this.data[0].toMathML(d+" ")+"\n"+d+"</mrow>"}});a.chars.Augment({toMathML:function(c){return(c||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(c){return(c||"")+"&"+this.data[0]+";<!-- "+this.toString()+" -->"}});a.xml.Augment({toMathML:function(c){return(c||"")+this.toString()}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({toMathML:function(c){return this.Core().toMathML(c)}})});MathJax.Hub.Startup.signal.Post("toMathML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/toMathML.js"); MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var b="2.0.1";var a=MathJax.ElementJax.mml;SETTINGS=MathJax.Hub.config.menuSettings;a.mbase.Augment({toMathML:function(k){var g=(this.inferred&&this.parent.inferRow);if(k==null){k=""}var e=this.type,d=this.toMathMLattributes();if(e==="mspace"){return k+"<"+e+d+" />"}var j=[];var h=(this.isToken?"":k+(g?"":" "));for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){j.push(this.data[f].toMathML(h))}else{if(!this.isToken){j.push(h+"<mrow />")}}}if(this.isToken){return k+"<"+e+d+">"+j.join("")+"</"+e+">"}if(g){return j.join("\n")}if(j.length===0||(j.length===1&&j[0]==="")){return k+"<"+e+d+" />"}return k+"<"+e+d+">\n"+j.join("\n")+"\n"+k+"</"+e+">"},toMathMLattributes:function(){var j=[],g=this.defaults;var c=(this.attrNames||a.copyAttributeNames),l=a.skipAttributes;if(this.type==="math"){j.push('xmlns="http://www.w3.org/1998/Math/MathML"')}if(!this.attrNames){if(this.type==="mstyle"){g=a.math.prototype.defaults}for(var d in g){if(!l[d]&&g.hasOwnProperty(d)){var e=(d==="open"||d==="close");if(this[d]!=null&&(e||this[d]!==g[d])){var k=this[d];delete this[d];if(e||this.Get(d)!==k){j.push(d+'="'+this.toMathMLattribute(k)+'"')}this[d]=k}}}}for(var h=0,f=c.length;h<f;h++){if(c[h]==="class"){continue}k=(this.attr||{})[c[h]];if(k==null){k=this[c[h]]}if(k!=null){j.push(c[h]+'="'+this.toMathMLquote(k)+'"')}}this.toMathMLclass(j);if(j.length){return" "+j.join(" ")}else{return""}},toMathMLclass:function(c){var e=[];if(this["class"]){e.push(this["class"])}if(this.isa(a.TeXAtom)&&SETTINGS.texHints){var d=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass];if(d){e.push("MJX-TeXAtom-"+d)}}if(this.mathvariant&&this.toMathMLvariants[this.mathvariant]){e.push("MJX"+this.mathvariant)}if(this.arrow){e.push("MJX-arrow")}if(this.variantForm){e.push("MJX-variant")}if(e.length){c.unshift('class="'+e.join(" ")+'"')}},toMathMLattribute:function(c){if(typeof(c)==="string"&&c.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)){return RegExp.$2+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"}else{if(this.toMathMLvariants[c]){return this.toMathMLvariants[c]}}return this.toMathMLquote(c)},toMathMLvariants:{"-tex-caligraphic":a.VARIANT.SCRIPT,"-tex-caligraphic-bold":a.VARIANT.BOLDSCRIPT,"-tex-oldstyle":a.VARIANT.NORMAL,"-tex-oldstyle-bold":a.VARIANT.BOLD,"-tex-mathit":a.VARIANT.ITALIC},toMathMLquote:function(e){e=String(e).split("");for(var f=0,d=e.length;f<d;f++){var h=e[f].charCodeAt(0);if(h<32||h>126){e[f]="&#x"+h.toString(16).toUpperCase()+";"}else{var g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e[f]];if(g){e[f]=g}}}return e.join("")}});a.msubsup.Augment({toMathML:function(h){var e=this.type;if(this.data[this.sup]==null){e="msub"}if(this.data[this.sub]==null){e="msup"}var d=this.toMathMLattributes();delete this.data[0].inferred;var g=[];for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){g.push(this.data[f].toMathML(h+" "))}}return h+"<"+e+d+">\n"+g.join("\n")+"\n"+h+"</"+e+">"}});a.munderover.Augment({toMathML:function(h){var e=this.type;if(this.data[this.under]==null){e="mover"}if(this.data[this.over]==null){e="munder"}var d=this.toMathMLattributes();delete this.data[0].inferred;var g=[];for(var f=0,c=this.data.length;f<c;f++){if(this.data[f]){g.push(this.data[f].toMathML(h+" "))}}return h+"<"+e+d+">\n"+g.join("\n")+"\n"+h+"</"+e+">"}});a.TeXAtom.Augment({toMathML:function(d){var c=this.toMathMLattributes();if(!c&&this.data[0].data.length===1){return d.substr(2)+this.data[0].toMathML(d)}return d+"<mrow"+c+">\n"+this.data[0].toMathML(d+" ")+"\n"+d+"</mrow>"}});a.chars.Augment({toMathML:function(c){return(c||"")+this.toMathMLquote(this.toString())}});a.entity.Augment({toMathML:function(c){return(c||"")+"&"+this.data[0]+";<!-- "+this.toString()+" -->"}});a.xml.Augment({toMathML:function(c){return(c||"")+this.toString()}});MathJax.Hub.Register.StartupHook("TeX mathchoice Ready",function(){a.TeXmathchoice.Augment({toMathML:function(c){return this.Core().toMathML(c)}})});MathJax.Hub.Startup.signal.Post("toMathML Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/toMathML.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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.0",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.0.6",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(a){return"#"+escape(a)},useLabelIds:true}}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js");

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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.0.1",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",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},"#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==="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:"2.0.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",mtextFontInherit:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_Display":{"text-align":"center",margin:"1em 0em"},".MathJax .merror":{"background-color":"#FFFF88",color:"#CC0000",border:"1px solid #CC0000",padding:"1px 3px","font-style":"normal","font-size":"90%"},"#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==="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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
(function(g){var k=g.FONTDATA.DELIMITERS;var f="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",d="MathJax_Size1",a="MathJax_Size4";var j="H",e="V";var c={61:{dir:j,HW:[[0.767,f]],stretch:{rep:[61,f]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,f]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[8608,i],rep:[8722,f]}},8612:{dir:j,HW:[],stretch:{left:[8592,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},8613:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8593,d]}},8614:{dir:j,HW:[[1,f]],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8594,f]}},8615:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8595,d]}},8624:{dir:e,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,d,0.097]}},8625:{dir:e,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,d]}},8636:{dir:j,HW:[[1,f]],stretch:{left:[8636,f],rep:[8722,f]}},8637:{dir:j,HW:[[1,f]],stretch:{left:[8637,f],rep:[8722,f]}},8638:{dir:e,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d]}},8639:{dir:e,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d]}},8640:{dir:j,HW:[[1,f]],stretch:{right:[8640,f],rep:[8722,f]}},8641:{dir:j,HW:[[1,f]],stretch:{right:[8641,f],rep:[8722,f]}},8642:{dir:e,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,d]}},8643:{dir:e,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,d]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,f]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,f]}},9140:{dir:j,HW:[],stretch:{left:[9484,i,0,-0.1],rep:[8722,f,0,0.35],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{left:[9492,i,0,0.26],rep:[8722,f,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,f,0,8994]],stretch:{left:[57680,a],rep:[57684,a],right:[57681,a]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,f,0,8995]],stretch:{left:[57682,a],rep:[57684,a],right:[57683,a]}},9184:{dir:j,HW:[],stretch:{left:[714,f,-0.1],rep:[713,f,0,0.13],right:[715,f],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{left:[715,f,-0.1,0.1],rep:[713,f],right:[714,f,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{left:[8656,f],rep:[61,f],right:[8739,d,0,-0.1]}},10503:{dir:j,HW:[],stretch:{left:[8872,i,0,-0.12],rep:[61,f],right:[8658,f]}},10574:{dir:j,HW:[],stretch:{left:[8636,f],rep:[8722,f],right:[8640,f]}},10575:{dir:e,HW:[],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{left:[8637,f],rep:[8722,f],right:[8641,f]}},10577:{dir:e,HW:[],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{left:[8636,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8640,f]}},10588:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8638,i,0.12,0,1.1]}},10589:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{left:[8637,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8641,f]}},10592:{dir:e,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8639,i,0.12,0,1.1]}},10593:{dir:e,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}}};for(var b in c){if(c.hasOwnProperty(b)){k[b]=c[b]}}MathJax.Ajax.loadComplete(g.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax["HTML-CSS"]); (function(g){var l="2.0.1";var k=g.FONTDATA.DELIMITERS;var f="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",d="MathJax_Size1",a="MathJax_Size4";var j="H",e="V";var c={61:{dir:j,HW:[[0.767,f]],stretch:{rep:[61,f]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,f]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[8608,i],rep:[8722,f]}},8612:{dir:j,HW:[],stretch:{min:1,left:[8592,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},8613:{dir:e,HW:[],stretch:{min:0.6,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8593,d]}},8614:{dir:j,HW:[[1,f]],stretch:{left:[8739,d,-0.09,-0.05,0.9],rep:[8722,f],right:[8594,f]}},8615:{dir:e,HW:[],stretch:{min:0.6,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8595,d]}},8624:{dir:e,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,d,0.097]}},8625:{dir:e,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,d]}},8636:{dir:j,HW:[[1,f]],stretch:{left:[8636,f],rep:[8722,f]}},8637:{dir:j,HW:[[1,f]],stretch:{left:[8637,f],rep:[8722,f]}},8638:{dir:e,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,d]}},8639:{dir:e,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,d]}},8640:{dir:j,HW:[[1,f]],stretch:{right:[8640,f],rep:[8722,f]}},8641:{dir:j,HW:[[1,f]],stretch:{right:[8641,f],rep:[8722,f]}},8642:{dir:e,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,d]}},8643:{dir:e,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,d]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,f]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,f]}},9140:{dir:j,HW:[],stretch:{min:0.5,left:[9484,i,0,-0.1],rep:[8722,f,0,0.35],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{min:0.5,left:[9492,i,0,0.26],rep:[8722,f,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,f,0,8994]],stretch:{left:[57680,a],rep:[57684,a],right:[57681,a]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,f,0,8995]],stretch:{left:[57682,a],rep:[57684,a],right:[57683,a]}},9184:{dir:j,HW:[],stretch:{min:1.25,left:[714,f,-0.1],rep:[713,f,0,0.13],right:[715,f],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{min:1.5,left:[715,f,-0.1,0.1],rep:[713,f],right:[714,f,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{min:1,left:[8656,f],rep:[61,f],right:[8739,d,0,-0.1]}},10503:{dir:j,HW:[],stretch:{min:0.7,left:[8872,i,0,-0.12],rep:[61,f],right:[8658,f]}},10574:{dir:j,HW:[],stretch:{min:0.5,left:[8636,f],rep:[8722,f],right:[8640,f]}},10575:{dir:e,HW:[],stretch:{min:0.5,top:[8638,i,0.12,0,1.1],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{min:0.5,left:[8637,f],rep:[8722,f],right:[8641,f]}},10577:{dir:e,HW:[],stretch:{min:0.5,top:[8639,i,0.12,0,1.1],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{min:1,left:[8636,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{min:1,left:[8739,d,-0.05,-0.05,0.9],rep:[8722,f],right:[8640,f]}},10588:{dir:e,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8638,i,0.12,0,1.1]}},10589:{dir:e,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{min:1,left:[8637,f],rep:[8722,f],right:[8739,d,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{min:1,left:[8739,d,-0.05,-0.05,0.9],rep:[8722,f],right:[8641,f]}},10592:{dir:e,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,d],top:[8639,i,0.12,0,1.1]}},10593:{dir:e,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,d],bot:[8643,i,0.12,0,1.1]}}};for(var b in c){if(c.hasOwnProperty(b)){k[b]=c[b]}}MathJax.Ajax.loadComplete(g.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax["HTML-CSS"]);

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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.OutputJax.NativeMML=MathJax.OutputJax({id:"NativeMML",version:"2.0.1",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,minScaleAdjust:50,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:"2.0.5",directory:MathJax.OutputJax.directory+"/NativeMML",extensionDir:MathJax.OutputJax.extensionDir+"/NativeMML",config:{scale:100,minScaleAdjust:50,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

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.0";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.mmultiscripts.Augment({toSVG:function(G,z){var B=this.SVG();this.SVGhandleSpace();var M=this.SVGgetScale();var j=(this.data[this.base]?this.SVGdataStretched(this.base,G,z):c.BBOX.G().Clean());var K=c.TeX.x_height*M,y=c.TeX.scriptspace*M*0.75;var x=this.SVGgetScripts(y);var k=x[0],e=x[1],n=x[2],i=x[3];var g=(this.data[1]||this).SVGgetScale();var C=c.TeX.sup_drop*g,A=c.TeX.sub_drop*g;var o=j.h-C,m=j.d+A,L=0,F;if(j.ic){L=j.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&j.scale===1&&!j.stretched&&!this.data[this.base].Get("largeop")){o=m=0}}var H=this.getValues("subscriptshift","superscriptshift"),E=this.SVGgetMu(B);H.subscriptshift=(H.subscriptshift===""?0:c.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:c.length2em(H.superscriptshift,E));var l=0;if(n){l=n.w+L}else{if(i){l=i.w-L}}B.Add(j,Math.max(0,l),0);if(!e&&!i){m=Math.max(m,c.TeX.sub1*M,H.subscriptshift);if(k){m=Math.max(m,k.h-(4/5)*K)}if(n){m=Math.max(m,n.h-(4/5)*K)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,0,-m)}}else{if(!k&&!n){var f=this.getValues("displaystyle","texprimestyle");F=c.TeX[(f.displaystyle?"sup1":(f.texprimestyle?"sup3":"sup2"))];o=Math.max(o,F*M,H.superscriptshift);if(e){o=Math.max(o,e.d+(1/4)*K)}if(i){o=Math.max(o,i.d+(1/4)*K)}if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,0,o)}}else{m=Math.max(m,c.TeX.sub2*M);var w=c.TeX.rule_thickness*M;var I=(k||n).h,J=(e||i).d;if(n){I=Math.max(I,n.h)}if(i){J=Math.max(J,i.d)}if((o-J)-(I-m)<3*w){m=3*w-o+J+I;C=(4/5)*K-(o-J);if(C>0){o+=C;m-=C}}o=Math.max(o,H.superscriptshift);m=Math.max(m,H.subscriptshift);if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,l+L-i.w,o)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,l-n.w,-m)}}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B},SVGgetScripts:function(p){var o,d,e=[];var n=1,g=this.data.length,f=0;for(var h=0;h<4;h+=2){while(n<g&&this.data[n].type!=="mprescripts"){for(var l=h;l<h+2;l++){if(this.data[n]&&this.data[n].type!=="none"){if(!e[l]){e[l]=c.BBOX.G()}e[l].Add(this.data[n].toSVG().With({x:f}))}n++}d=e[h]||{w:0};o=e[h+1]||{w:0};d.w=o.w=f=Math.max(d.w,o.w)}n++;f=0}for(l=0;l<4;l++){if(e[l]){e[l].w+=p;e[l].Clean()}}return e}});MathJax.Hub.Startup.signal.Post("SVG mmultiscripts Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/mmultiscripts.js")}); MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.0.2";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.mmultiscripts.Augment({toSVG:function(G,z){this.SVGgetStyles();var B=this.SVG();this.SVGhandleSpace(B);var M=this.SVGgetScale();var j=(this.data[this.base]?this.SVGdataStretched(this.base,G,z):c.BBOX.G().Clean());var K=c.TeX.x_height*M,y=c.TeX.scriptspace*M*0.75;var x=this.SVGgetScripts(y);var k=x[0],e=x[1],n=x[2],i=x[3];var g=(this.data[1]||this).SVGgetScale();var C=c.TeX.sup_drop*g,A=c.TeX.sub_drop*g;var o=j.h-C,m=j.d+A,L=0,F;if(j.ic){L=j.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&j.scale===1&&!j.stretched&&!this.data[this.base].Get("largeop")){o=m=0}}var H=this.getValues("subscriptshift","superscriptshift"),E=this.SVGgetMu(B);H.subscriptshift=(H.subscriptshift===""?0:c.length2em(H.subscriptshift,E));H.superscriptshift=(H.superscriptshift===""?0:c.length2em(H.superscriptshift,E));var l=0;if(n){l=n.w+L}else{if(i){l=i.w-L}}B.Add(j,Math.max(0,l),0);if(!e&&!i){m=Math.max(m,c.TeX.sub1*M,H.subscriptshift);if(k){m=Math.max(m,k.h-(4/5)*K)}if(n){m=Math.max(m,n.h-(4/5)*K)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,0,-m)}}else{if(!k&&!n){var f=this.getValues("displaystyle","texprimestyle");F=c.TeX[(f.displaystyle?"sup1":(f.texprimestyle?"sup3":"sup2"))];o=Math.max(o,F*M,H.superscriptshift);if(e){o=Math.max(o,e.d+(1/4)*K)}if(i){o=Math.max(o,i.d+(1/4)*K)}if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,0,o)}}else{m=Math.max(m,c.TeX.sub2*M);var w=c.TeX.rule_thickness*M;var I=(k||n).h,J=(e||i).d;if(n){I=Math.max(I,n.h)}if(i){J=Math.max(J,i.d)}if((o-J)-(I-m)<3*w){m=3*w-o+J+I;C=(4/5)*K-(o-J);if(C>0){o+=C;m-=C}}o=Math.max(o,H.superscriptshift);m=Math.max(m,H.subscriptshift);if(e){B.Add(e,l+j.w+y,o)}if(i){B.Add(i,l+L-i.w,o)}if(k){B.Add(k,l+j.w+y-L,-m)}if(n){B.Add(n,l-n.w,-m)}}}B.Clean();this.SVGhandleColor(B);this.SVGsaveData(B);return B},SVGgetScripts:function(p){var o,d,e=[];var n=1,g=this.data.length,f=0;for(var h=0;h<4;h+=2){while(n<g&&this.data[n].type!=="mprescripts"){for(var l=h;l<h+2;l++){if(this.data[n]&&this.data[n].type!=="none"){if(!e[l]){e[l]=c.BBOX.G()}e[l].Add(this.data[n].toSVG().With({x:f}))}n++}d=e[h]||{w:0};o=e[h+1]||{w:0};d.w=o.w=f=Math.max(d.w,o.w)}n++;f=0}for(l=0;l<4;l++){if(e[l]){e[l].w+=p;e[l].Clean()}}return e}});MathJax.Hub.Startup.signal.Post("SVG mmultiscripts Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/mmultiscripts.js")});

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.0";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.ms.Augment({toSVG:function(){var e=this.SVG();this.SVGhandleSpace(e);var d=this.getValues("lquote","rquote");var f=this.SVGgetVariant(),i=this.SVGgetScale();var h=this.data.join("");var g=[];if(d.lquote.length===1){g.push(this.SVGquoteRegExp(d.lquote))}if(d.rquote.length===1){g.push(this.SVGquoteRegExp(d.rquote))}if(g.length){h=h.replace(RegExp("("+g.join("|")+")","g"),"\\$1")}e.Add(this.SVGhandleVariant(f,i,d.lquote+h+d.rquote));e.Clean();this.SVGhandleColor(e);this.SVGsaveData(e);return e},SVGquoteRegExp:function(d){return d.replace(/([.*+?|{}()\[\]\\])/g,"\\$1")}});a.ms.prototype.defaults.mathvariant="monospace";MathJax.Hub.Startup.signal.Post("SVG ms Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/ms.js")}); MathJax.Hub.Register.StartupHook("SVG Jax Ready",function(){var b="2.0.1";var a=MathJax.ElementJax.mml,c=MathJax.OutputJax.SVG;a.ms.Augment({toSVG:function(){this.SVGgetStyles();var e=this.SVG();this.SVGhandleSpace(e);var d=this.getValues("lquote","rquote");var f=this.SVGgetVariant(),i=this.SVGgetScale();var h=this.data.join("");var g=[];if(d.lquote.length===1){g.push(this.SVGquoteRegExp(d.lquote))}if(d.rquote.length===1){g.push(this.SVGquoteRegExp(d.rquote))}if(g.length){h=h.replace(RegExp("("+g.join("|")+")","g"),"\\$1")}e.Add(this.SVGhandleVariant(f,i,d.lquote+h+d.rquote));e.Clean();this.SVGhandleColor(e);this.SVGsaveData(e);return e},SVGquoteRegExp:function(d){return d.replace(/([.*+?|{}()\[\]\\])/g,"\\$1")}});a.ms.prototype.defaults.mathvariant="monospace";MathJax.Hub.Startup.signal.Post("SVG ms Ready");MathJax.Ajax.loadComplete(c.autoloadDir+"/ms.js")});

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 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_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",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js"); MathJax.OutputJax.SVG=MathJax.OutputJax({id:"SVG",version:"2.0.8",directory:MathJax.OutputJax.directory+"/SVG",extensionDir:MathJax.OutputJax.extensionDir+"/SVG",autoloadDir:MathJax.OutputJax.directory+"/SVG/autoload",fontDir:MathJax.OutputJax.directory+"/SVG/fonts",config:{scale:100,minScaleAdjust:50,font:"TeX",blacker:10,mtextFontInherit:false,undefinedFamily:"STIXGeneral,'Arial Unicode MS',serif",addMMLclasses:false,EqnChunk:(MathJax.Hub.Browser.isMobile?10:50),EqnChunkFactor:1.5,EqnChunkDelay:100,linebreaks:{automatic:false,width:"container"},styles:{".MathJax_SVG_Display":{"text-align":"center",margin:"1em 0em"},"#MathJax_SVG_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",padding:"3px 4px"}}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.SVG.Register("jax/mml")}MathJax.OutputJax.SVG.loadComplete("config.js");

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
*/ */
(function(a){var k=a.FONTDATA.DELIMITERS;var g="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",e="MathJax_Size1",b="MathJax_Size4";var j="H",f="V";var d={61:{dir:j,HW:[[0.767,g]],stretch:{rep:[61,g]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,g]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[8608,i],rep:[8722,g]}},8612:{dir:j,HW:[],stretch:{left:[8592,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},8613:{dir:f,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8593,e]}},8614:{dir:j,HW:[[1,g]],stretch:{left:[8739,e,-0.09,-0.05,0.9],rep:[8722,g],right:[8594,g]}},8615:{dir:f,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8595,e]}},8624:{dir:f,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,e,0.097]}},8625:{dir:f,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,e]}},8636:{dir:j,HW:[[1,g]],stretch:{left:[8636,g],rep:[8722,g]}},8637:{dir:j,HW:[[1,g]],stretch:{left:[8637,g],rep:[8722,g]}},8638:{dir:f,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,e]}},8639:{dir:f,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,e]}},8640:{dir:j,HW:[[1,g]],stretch:{right:[8640,g],rep:[8722,g]}},8641:{dir:j,HW:[[1,g]],stretch:{right:[8641,g],rep:[8722,g]}},8642:{dir:f,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,e]}},8643:{dir:f,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,e]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,g]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,g]}},9140:{dir:j,HW:[],stretch:{left:[9484,i,0,-0.1],rep:[8722,g,0,0.325],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{left:[9492,i,0,0.26],rep:[8722,g,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,g,0,8994]],stretch:{left:[57680,b],rep:[57684,b],right:[57681,b]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,g,0,8995]],stretch:{left:[57682,b],rep:[57684,b],right:[57683,b]}},9184:{dir:j,HW:[],stretch:{left:[714,g,-0.1],rep:[713,g,0,0.13],right:[715,g],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{left:[715,g,-0.1,0.1],rep:[713,g],right:[714,g,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{left:[8656,g],rep:[61,g],right:[8739,e,0,-0.1]}},10503:{dir:j,HW:[],stretch:{left:[8872,i,0,-0.12],rep:[61,g],right:[8658,g]}},10574:{dir:j,HW:[],stretch:{left:[8636,g],rep:[8722,g],right:[8640,g]}},10575:{dir:f,HW:[],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,e],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{left:[8637,g],rep:[8722,g],right:[8641,g]}},10577:{dir:f,HW:[],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,e],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{left:[8636,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{left:[8739,e,-0.09,-0.05,0.9],rep:[8722,g],right:[8640,g]}},10588:{dir:f,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8638,i,0.12,0,1.1]}},10589:{dir:f,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{left:[8637,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{left:[8739,e,-0.09,-0.05,0.9],rep:[8722,g],right:[8641,g]}},10592:{dir:f,HW:[],stretch:{bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8639,i,0.12,0,1.1]}},10593:{dir:f,HW:[],stretch:{top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8643,i,0.12,0,1.1]}}};for(var c in d){if(d.hasOwnProperty(c)){k[c]=d[c]}}MathJax.Ajax.loadComplete(a.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax.SVG); (function(a){var l="2.0.1";var k=a.FONTDATA.DELIMITERS;var g="MathJax_Main",h="MathJax_Main-bold",i="MathJax_AMS",e="MathJax_Size1",b="MathJax_Size4";var j="H",f="V";var d={61:{dir:j,HW:[[0.767,g]],stretch:{rep:[61,g]}},8606:{dir:j,HW:[[1,i]],stretch:{left:[8606,i],rep:[8722,g]}},8608:{dir:j,HW:[[1,i]],stretch:{right:[8608,i],rep:[8722,g]}},8612:{dir:j,HW:[],stretch:{min:1,left:[8592,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},8613:{dir:f,HW:[],stretch:{min:0.6,bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8593,e]}},8614:{dir:j,HW:[[1,g]],stretch:{left:[8739,e,-0.09,-0.05,0.9],rep:[8722,g],right:[8594,g]}},8615:{dir:f,HW:[],stretch:{min:0.6,top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8595,e]}},8624:{dir:f,HW:[[0.722,i]],stretch:{top:[8624,i],ext:[9168,e,0.097]}},8625:{dir:f,HW:[[0.722,i]],stretch:{top:[8625,i,0.27],ext:[9168,e]}},8636:{dir:j,HW:[[1,g]],stretch:{left:[8636,g],rep:[8722,g]}},8637:{dir:j,HW:[[1,g]],stretch:{left:[8637,g],rep:[8722,g]}},8638:{dir:f,HW:[[0.888,i]],stretch:{top:[8638,i,0.12,0,1.1],ext:[9168,e]}},8639:{dir:f,HW:[[0.888,i]],stretch:{top:[8639,i,0.12,0,1.1],ext:[9168,e]}},8640:{dir:j,HW:[[1,g]],stretch:{right:[8640,g],rep:[8722,g]}},8641:{dir:j,HW:[[1,g]],stretch:{right:[8641,g],rep:[8722,g]}},8642:{dir:f,HW:[[0.888,i]],stretch:{bot:[8642,i,0.12,0,1.1],ext:[9168,e]}},8643:{dir:f,HW:[[0.888,i]],stretch:{bot:[8643,i,0.12,0,1.1],ext:[9168,e]}},8666:{dir:j,HW:[[1,i]],stretch:{left:[8666,i],rep:[8801,g]}},8667:{dir:j,HW:[[1,i]],stretch:{right:[8667,i],rep:[8801,g]}},9140:{dir:j,HW:[],stretch:{min:0.5,left:[9484,i,0,-0.1],rep:[8722,g,0,0.325],right:[9488,i,0,-0.1]}},9141:{dir:j,HW:[],stretch:{min:0.5,left:[9492,i,0,0.26],rep:[8722,g,0,0,0,0.25],right:[9496,i,0,0.26]}},9180:{dir:j,HW:[[0.778,i,0,8994],[1,g,0,8994]],stretch:{left:[57680,b],rep:[57684,b],right:[57681,b]}},9181:{dir:j,HW:[[0.778,i,0,8995],[1,g,0,8995]],stretch:{left:[57682,b],rep:[57684,b],right:[57683,b]}},9184:{dir:j,HW:[],stretch:{min:1.25,left:[714,g,-0.1],rep:[713,g,-0.05,0.13],right:[715,g],fullExtenders:true}},9185:{dir:j,HW:[],stretch:{min:1.5,left:[715,g,-0.1,0.1],rep:[713,g,-0.1],right:[714,g,-0.1,0.1],fullExtenders:true}},10502:{dir:j,HW:[],stretch:{min:1,left:[8656,g],rep:[61,g],right:[8739,e,0,-0.1]}},10503:{dir:j,HW:[],stretch:{min:0.7,left:[8872,i,0,-0.12],rep:[61,g],right:[8658,g]}},10574:{dir:j,HW:[],stretch:{min:0.5,left:[8636,g],rep:[8722,g],right:[8640,g]}},10575:{dir:f,HW:[],stretch:{min:0.5,top:[8638,i,0.12,0,1.1],ext:[9168,e],bot:[8642,i,0.12,0,1.1]}},10576:{dir:j,HW:[],stretch:{min:0.5,left:[8637,g],rep:[8722,g],right:[8641,g]}},10577:{dir:f,HW:[],stretch:{min:0.5,top:[8639,i,0.12,0,1.1],ext:[9168,e],bot:[8643,i,0.12,0,1.1]}},10586:{dir:j,HW:[],stretch:{min:1,left:[8636,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},10587:{dir:j,HW:[],stretch:{min:1,left:[8739,e,-0.05,-0.05,0.9],rep:[8722,g],right:[8640,g]}},10588:{dir:f,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8638,i,0.12,0,1.1]}},10589:{dir:f,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8642,i,0.12,0,1.1]}},10590:{dir:j,HW:[],stretch:{min:1,left:[8637,g],rep:[8722,g],right:[8739,e,0,-0.05,0.9]}},10591:{dir:j,HW:[],stretch:{min:1,left:[8739,e,-0.05,-0.05,0.9],rep:[8722,g],right:[8641,g]}},10592:{dir:f,HW:[],stretch:{min:0.7,bot:[8869,h,0,0,0.75],ext:[9168,e],top:[8639,i,0.12,0,1.1]}},10593:{dir:f,HW:[],stretch:{min:0.7,top:[8868,h,0,0,0.75],ext:[9168,e],bot:[8643,i,0.12,0,1.1]}}};for(var c in d){if(d.hasOwnProperty(c)){k[c]=d[c]}}MathJax.Ajax.loadComplete(a.fontDir+"/fontdata-extra.js")})(MathJax.OutputJax.SVG);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ if (!window.MathJax) {window.MathJax= {}}
if (!MathJax.Hub) { // skip if already loaded if (!MathJax.Hub) { // skip if already loaded
MathJax.version = "2.0"; MathJax.version = "2.0";
MathJax.fileversion = "2.0.3"; MathJax.fileversion = "2.0.6";
/**********************************************************/ /**********************************************************/
@ -966,6 +966,7 @@ MathJax.HTML = {
MathJax.Hub.Insert(obj,def); MathJax.Hub.Insert(obj,def);
} }
if (contents) { if (contents) {
if (!(contents instanceof Array)) {contents = [contents]}
for (var i = 0; i < contents.length; i++) { for (var i = 0; i < contents.length; i++) {
if (contents[i] instanceof Array) { if (contents[i] instanceof Array) {
obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2])); obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2]));
@ -1240,7 +1241,7 @@ MathJax.Hub = {
skipStartupTypeset: false, // set to true to skip PreProcess and Process during startup skipStartupTypeset: false, // set to true to skip PreProcess and Process during startup
"v1.0-compatible": true, // set to false to prevent message about configuration change "v1.0-compatible": true, // set to false to prevent message about configuration change
elements: [], // array of elements to process when none is given explicitly elements: [], // array of elements to process when none is given explicitly
positionToHash: false, // after initial typeset pass, position to #hash location? positionToHash: true, // after initial typeset pass, position to #hash location?
showMathMenu: true, // attach math context menu to typeset math? showMathMenu: true, // attach math context menu to typeset math?
showMathMenuMSIE: true, // separtely determine if MSIE should have math menu showMathMenuMSIE: true, // separtely determine if MSIE should have math menu
@ -1684,6 +1685,7 @@ MathJax.Hub = {
script.parentNode.insertBefore(error,script); script.parentNode.insertBefore(error,script);
if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""} if (script.MathJax.preview) {script.MathJax.preview.innerHTML = ""}
this.lastError = err; this.lastError = err;
this.signal.Post(["Math Processing Error",script,err]);
}, },
RestartAfter: function (callback) { RestartAfter: function (callback) {
@ -1862,8 +1864,9 @@ MathJax.Hub.Startup = {
var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax; var config = MathJax.Hub.config, jax = MathJax.Hub.outputJax;
// Save the order of the output jax since they are loading asynchronously // Save the order of the output jax since they are loading asynchronously
for (var i = 0, m = config.jax.length, k = 0; i < m; i++) { for (var i = 0, m = config.jax.length, k = 0; i < m; i++) {
if (config.jax[i].substr(0,7) === "output/") var name = config.jax[i].substr(7);
{jax.order[config.jax[i].substr(7)] = k; k++} if (config.jax[i].substr(0,7) === "output/" && jax.order[name] == null)
{jax.order[name] = k; k++}
} }
var queue = MathJax.Callback.Queue(); var queue = MathJax.Callback.Queue();
return queue.Push( return queue.Push(
@ -1911,8 +1914,17 @@ MathJax.Hub.Startup = {
// Set the location to the designated hash position // Set the location to the designated hash position
// //
Hash: function () { Hash: function () {
if (MathJax.Hub.config.positionToHash && document.location.hash) if (MathJax.Hub.config.positionToHash && document.location.hash &&
{setTimeout("document.location = document.location.hash",1)} document.body && document.body.scrollIntoView) {
var name = document.location.hash.substr(1);
var target = document.getElementById(name);
if (!target) {
var a = document.getElementsByTagName("a");
for (var i = 0, m = a.length; i < m; i++)
{if (a[i].name === name) {target = a[i]; break}}
}
if (target) {setTimeout(function () {target.scrollIntoView(true)},1)}
}
}, },
// //
@ -1939,7 +1951,7 @@ MathJax.Hub.Startup = {
// //
// Setup the onload callback // Setup the onload callback
// //
onLoad: function (when) { onLoad: function () {
var onload = this.onload = var onload = this.onload =
MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")}); MathJax.Callback(function () {MathJax.Hub.Startup.signal.Post("onLoad")});
if (document.body && document.readyState && document.readyState !== "loading") {return [onload]} if (document.body && document.readyState && document.readyState !== "loading") {return [onload]}

View File

@ -33,8 +33,8 @@
*/ */
MathJAx.Extension["HTML-CSS/handle-floats"] = { MathJax.Extension["HTML-CSS/handle-floats"] = {
version: "2.0" version: "2.0.1"
}; };
// //

View File

@ -24,7 +24,7 @@
*/ */
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT) { (function (HUB,HTML,AJAX,CALLBACK,OUTPUT) {
var VERSION = "2.0.2"; var VERSION = "2.0.5";
var SIGNAL = MathJax.Callback.Signal("menu") // signal for menu events var SIGNAL = MathJax.Callback.Signal("menu") // signal for menu events
@ -609,7 +609,7 @@
]]); ]]);
MENU.About.div = MENU.Background(MENU.About); MENU.About.div = MENU.Background(MENU.About);
var about = HTML.addElement(MENU.About.div,"div",{ var about = HTML.addElement(MENU.About.div,"div",{
id: "MathJax_About", onclick: MENU.About.Remove id: "MathJax_About"
},[ },[
["b",{style:{fontSize:"120%"}},["MathJax"]]," v"+MathJax.version,["br"], ["b",{style:{fontSize:"120%"}},["MathJax"]]," v"+MathJax.version,["br"],
"using "+font,["br"],["br"], "using "+font,["br"],["br"],
@ -618,7 +618,12 @@
"max-height":"20em", overflow:"auto", "max-height":"20em", overflow:"auto",
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset" "background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
}},jax],["br"],["br"], }},jax],["br"],["br"],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]] ["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
["img", {
src: CONFIG.closeImg,
style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
onclick: MENU.About.Remove
}]
]); ]);
var doc = (document.documentElement||{}); var doc = (document.documentElement||{});
var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0; var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
@ -666,7 +671,7 @@
// toMathML() can call MathJax.Hub.RestartAfter, so trap errors and check // toMathML() can call MathJax.Hub.RestartAfter, so trap errors and check
try {MENU.ShowSource.Text(MENU.jax.root.toMathML(),event)} catch (err) { try {MENU.ShowSource.Text(MENU.jax.root.toMathML(),event)} catch (err) {
if (!err.restart) {throw err} if (!err.restart) {throw err}
CALLBACK.After([this,MENU.ShowSource,EVENT]); CALLBACK.After([this,MENU.ShowSource,EVENT],err.restart);
} }
} else if (!AJAX.loadingToMathML) { } else if (!AJAX.loadingToMathML) {
AJAX.loadingToMathML = true; AJAX.loadingToMathML = true;
@ -729,21 +734,22 @@
* Handle rescaling all the math * Handle rescaling all the math
*/ */
MENU.Scale = function () { MENU.Scale = function () {
var HTMLCSS = OUTPUT["HTML-CSS"], nMML = OUTPUT.NativeMML; var HTMLCSS = OUTPUT["HTML-CSS"], nMML = OUTPUT.NativeMML, SVG = OUTPUT.SVG;
var SCALE = (HTMLCSS ? HTMLCSS.config.scale : nMML.config.scale); var SCALE = (HTMLCSS||nMML||SVG||{config:{scale:100}}).config.scale;
var scale = prompt("Scale all mathematics (compared to surrounding text) by",SCALE+"%"); var scale = prompt("Scale all mathematics (compared to surrounding text) by",SCALE+"%");
if (scale) { if (scale) {
if (scale.match(/^\s*\d+\s*%?\s*$/)) { if (scale.match(/^\s*\d+(\.\d*)?\s*%?\s*$/)) {
scale = parseInt(scale); scale = parseFloat(scale);
if (scale) { if (scale) {
if (scale !== SCALE) { if (scale !== SCALE) {
if (HTMLCSS) {HTMLCSS.config.scale = scale} if (HTMLCSS) {HTMLCSS.config.scale = scale}
if (nMML) {nMML.config.scale = scale} if (nMML) {nMML.config.scale = scale}
if (SVG) {SVG.config.scale = scale}
MENU.cookie.scale = scale; MENU.cookie.scale = scale;
MENU.saveCookie(); HUB.Reprocess(); MENU.saveCookie(); HUB.Reprocess();
} }
} else {alert("The scale should not be zero")} } else {alert("The scale should not be zero")}
} else {alert("The scale should be a perentage (e.g., 120%)")} } else {alert("The scale should be a percentage (e.g., 120%)")}
} }
}; };
@ -805,8 +811,11 @@
Opera: "Opera's support for MathML is limited, so switching to " + Opera: "Opera's support for MathML is limited, so switching to " +
"MathML output may cause some expressions to render poorly.", "MathML output may cause some expressions to render poorly.",
Safari: "Your browser's native MathML does not implement all the features " +
"used by MathJax, so some expressions may not render properly.",
Firefox: "Your browser's native MathML does not implement all the features " + Firefox: "Your browser's native MathML does not implement all the features " +
"used by MathJax, so some expressions may render improperly." "used by MathJax, so some expressions may not render properly."
}, },
SVG: { SVG: {

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Extension["TeX/AMSmath"] = { MathJax.Extension["TeX/AMSmath"] = {
version: "2.0", version: "2.0.2",
number: 0, // current equation number number: 0, // current equation number
startNumber: 0, // current starting equation number (for when equation is restarted) startNumber: 0, // current starting equation number (for when equation is restarted)
@ -46,6 +46,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
/******************************************************************************/ /******************************************************************************/
TEXDEF.Add({ TEXDEF.Add({
mathchar0mo: {
iiiint: ['2A0C',{texClass: MML.TEXCLASS.OP}]
},
macros: { macros: {
mathring: ['Accent','2DA'], // or 0x30A mathring: ['Accent','2DA'], // or 0x30A
@ -53,14 +57,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
negmedspace: ['Spacer',MML.LENGTH.NEGATIVEMEDIUMMATHSPACE], negmedspace: ['Spacer',MML.LENGTH.NEGATIVEMEDIUMMATHSPACE],
negthickspace: ['Spacer',MML.LENGTH.NEGATIVETHICKMATHSPACE], negthickspace: ['Spacer',MML.LENGTH.NEGATIVETHICKMATHSPACE],
intI: ['Macro','\\mathchoice{\\!}{}{}{}\\!\\!\\int'], // intI: ['Macro','\\mathchoice{\\!}{}{}{}\\!\\!\\int'],
// iint: ['MultiIntegral','\\int\\intI'], // now in core TeX input jax // iint: ['MultiIntegral','\\int\\intI'], // now in core TeX input jax
// iiint: ['MultiIntegral','\\int\\intI\\intI'], // now in core TeX input jax // iiint: ['MultiIntegral','\\int\\intI\\intI'], // now in core TeX input jax
iiiint: ['MultiIntegral','\\int\\intI\\intI\\intI'], // iiiint: ['MultiIntegral','\\int\\intI\\intI\\intI'], // now in mathchar0mo above
idotsint: ['MultiIntegral','\\int\\cdots\\int'], idotsint: ['MultiIntegral','\\int\\cdots\\int'],
dddot: ['Macro','\\mathop{#1}\\limits^{\\textstyle \\mathord{.}\\mathord{.}\\mathord{.}}',1], // dddot: ['Macro','\\mathop{#1}\\limits^{\\textstyle \\mathord{.}\\mathord{.}\\mathord{.}}',1],
ddddot: ['Macro','\\mathop{#1}\\limits^{\\textstyle \\mathord{.}\\mathord{.}\\mathord{.}\\mathord{.}}',1], // ddddot: ['Macro','\\mathop{#1}\\limits^{\\textstyle \\mathord{.}\\mathord{.}\\mathord{.}\\mathord{.}}',1],
dddot: ['Accent','20DB'],
ddddot: ['Accent','20DC'],
sideset: ['Macro','\\mathop{\\mathop{\\rlap{\\phantom{#3}}}\\nolimits#1\\!\\mathop{#3}\\nolimits#2}',3], sideset: ['Macro','\\mathop{\\mathop{\\rlap{\\phantom{#3}}}\\nolimits#1\\!\\mathop{#3}\\nolimits#2}',3],
@ -74,12 +80,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
substack: ['Macro','\\begin{subarray}{c}#1\\end{subarray}',1], substack: ['Macro','\\begin{subarray}{c}#1\\end{subarray}',1],
injlim: ['Macro','\\mathop{\\rm inj\\,lim}'], injlim: ['NamedOp','inj&thinsp;lim'],
projlim: ['Macro','\\mathop{\\rm proj\\,lim}'], projlim: ['NamedOp','proj&thinsp;lim'],
varliminf: ['Macro','\\mathop{\\underline{\\rm lim}}'], varliminf: ['Macro','\\mathop{\\underline{\\mmlToken{mi}{lim}}}'],
varlimsup: ['Macro','\\mathop{\\overline{\\rm lim}}'], varlimsup: ['Macro','\\mathop{\\overline{\\mmlToken{mi}{lim}}}'],
varinjlim: ['Macro','\\mathop{\\underrightarrow{\\rm lim\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}'], varinjlim: ['Macro','\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}'],
varprojlim: ['Macro','\\mathop{\\underleftarrow{\\rm lim\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}'], varprojlim: ['Macro','\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}'],
DeclareMathOperator: 'HandleDeclareOp', DeclareMathOperator: 'HandleDeclareOp',
operatorname: 'HandleOperatorName', operatorname: 'HandleOperatorName',
@ -121,7 +127,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
smallmatrix: ['Array',null,null,null,'c',COLS([1/3]),".2em",'S',1], smallmatrix: ['Array',null,null,null,'c',COLS([1/3]),".2em",'S',1],
'equation': ['EquationBegin','Equation',true], 'equation': ['EquationBegin','Equation',true],
'equation*': ['EquationBegin','EquationStar',false] 'equation*': ['EquationBegin','EquationStar',false],
eqnarray: ['AMSarray',null,true,true, 'rcl',MML.LENGTH.THICKMATHSPACE,".5em"],
'eqnarray*': ['AMSarray',null,false,true,'rcl',MML.LENGTH.THICKMATHSPACE,".5em"]
}, },
delimiter: { delimiter: {
@ -159,6 +168,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
*/ */
HandleLabel: function (name) { HandleLabel: function (name) {
var global = this.stack.global, label = this.GetArgument(name); var global = this.stack.global, label = this.GetArgument(name);
if (label === "") return;
if (!AMS.refUpdate) { if (!AMS.refUpdate) {
if (global.label) {TEX.Error("Multiple "+name+"'s")} if (global.label) {TEX.Error("Multiple "+name+"'s")}
global.label = label; global.label = label;
@ -462,7 +472,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
EndRow: function () { EndRow: function () {
var mtr = MML.mtr; var mtr = MML.mtr;
if (!this.global.tag && this.numbered) {this.autoTag()} if (!this.global.tag && this.numbered) {this.autoTag()}
if (this.global.tag &&! this.global.notags) { if (this.global.tag && !this.global.notags) {
this.row = [this.getTag()].concat(this.row); this.row = [this.getTag()].concat(this.row);
mtr = MML.mlabeledtr; mtr = MML.mlabeledtr;
} }

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Extension["TeX/AMSsymbols"] = { MathJax.Extension["TeX/AMSsymbols"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -55,22 +55,22 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
daleth: '2138', daleth: '2138',
// Miscellaneous symbols // Miscellaneous symbols
// hbar: '0127', // in MathJax_Main // hbar: '0127', // in TeX/jax.js
backprime: ['2035',{variantForm: true}], backprime: ['2035',{variantForm: true}],
hslash: ['210F',{variantForm: true}], hslash: '210F',
varnothing: ['2205',{variantForm: true}], varnothing: ['2205',{variantForm: true}],
blacktriangle: '25B2', blacktriangle: '25B4',
triangledown: '25BD', triangledown: ['25BD',{variantForm: true}],
blacktriangledown: '25BC', blacktriangledown: '25BE',
square: '25A1', square: '25FB',
Box: '25A1', Box: '25FB',
blacksquare: '25A0', blacksquare: '25FC',
lozenge: '25CA', lozenge: '25CA',
Diamond: '25CA', Diamond: '25CA',
blacklozenge: '29EB', blacklozenge: '29EB',
circledS: ['24C8',{mathvariant: MML.VARIANT.NORMAL}], circledS: ['24C8',{mathvariant: MML.VARIANT.NORMAL}],
bigstar: '2605', bigstar: '2605',
// angle: '2220', // in MathJax_Main // angle: '2220', // in TeX/jax.js
sphericalangle: '2222', sphericalangle: '2222',
measuredangle: '2221', measuredangle: '2221',
nexists: '2204', nexists: '2204',
@ -93,7 +93,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// Binary operators // Binary operators
dotplus: '2214', dotplus: '2214',
ltimes: '22C9', ltimes: '22C9',
smallsetminus: ['2216',{variantForm: true}], smallsetminus: '2216',
rtimes: '22CA', rtimes: '22CA',
Cap: '22D2', Cap: '22D2',
doublecap: '22D2', doublecap: '22D2',
@ -187,8 +187,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
pitchfork: '22D4', pitchfork: '22D4',
varpropto: '221D', varpropto: '221D',
backepsilon: '220D', backepsilon: '220D',
blacktriangleleft: '25C0', blacktriangleleft: '25C2',
blacktriangleright: '25B6', blacktriangleright: '25B8',
therefore: '2234', therefore: '2234',
because: '2235', because: '2235',
eqsim: '2242', eqsim: '2242',
@ -343,59 +343,4 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
}); });
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var HTMLCSS = MathJax.OutputJax["HTML-CSS"];
var VARIANT = HTMLCSS.FONTDATA.VARIANT;
if (HTMLCSS.fontInUse === "TeX") {
VARIANT["-TeX-variant"] = {
fonts: ["MathJax_AMS","MathJax_Main","MathJax_Size1"],
remap: {0x2268: 0xE00C, 0x2269: 0xE00D, 0x2270: 0xE011, 0x2271: 0xE00E,
0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2224: 0xE006, 0x2226: 0xE007,
0x2288: 0xE016, 0x2289: 0xE018, 0x228A: 0xE01A, 0x228B: 0xE01B,
0x2ACB: 0xE017, 0x2ACC: 0xE019, 0x03DC: 0xE008, 0x03F0: 0xE009}
};
if (HTMLCSS.msieIE6) {
MathJax.Hub.Insert(VARIANT["-TeX-variant"].remap,{
0x2190:[0xE2C1,"-WinIE6"], 0x2192:[0xE2C0,"-WinIE6"],
0x2223:[0xE2C2,"-WinIE6"], 0x2225:[0xE2C3,"-WinIE6"],
0x223C:[0xE2C4,"-WinIE6"], 0x25B3:[0xE2D3,"-WinIE6"]
});
}
}
if (HTMLCSS.fontInUse === "STIX") {
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEXDEF = MathJax.InputJax.TeX.Definitions;
TEXDEF.mathchar0mi.varnothing = '2205';
TEXDEF.mathchar0mi.hslash = '210F';
TEXDEF.mathchar0mi.blacktriangle = '25B4';
TEXDEF.mathchar0mi.blacktriangledown = '25BE';
TEXDEF.mathchar0mi.square = '25FB';
TEXDEF.mathchar0mi.blacksquare = '25FC';
TEXDEF.mathchar0mi.vartriangle = ['25B3',{mathsize:"71%"}];
TEXDEF.mathchar0mi.triangledown = ['25BD',{mathsize:"71%"}];
TEXDEF.mathchar0mo.blacktriangleleft = '25C2';
TEXDEF.mathchar0mo.blacktriangleright = '25B8';
TEXDEF.mathchar0mo.smallsetminus = '2216';
MathJax.Hub.Insert(VARIANT["-STIX-variant"],{
remap: {0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2270: 0xE011, 0x2271: 0xE00E,
0x22E0: 0xE04B, 0x22E1: 0xE04F, 0x2288: 0xE016, 0x2289: 0xE018}
});
});
}
});
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var SVG = MathJax.OutputJax.SVG;
var VARIANT = SVG.FONTDATA.VARIANT;
VARIANT["-TeX-variant"] = {
fonts: ["MathJax_AMS","MathJax_Main","MathJax_Size1"],
remap: {0x2268: 0xE00C, 0x2269: 0xE00D, 0x2270: 0xE011, 0x2271: 0xE00E,
0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2224: 0xE006, 0x2226: 0xE007,
0x2288: 0xE016, 0x2289: 0xE018, 0x228A: 0xE01A, 0x228B: 0xE01B,
0x2ACB: 0xE017, 0x2ACC: 0xE019, 0x03DC: 0xE008, 0x03F0: 0xE009}
};
});
MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMSsymbols.js"); MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/AMSsymbols.js");

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Extension["TeX/HTML"] = { MathJax.Extension["TeX/HTML"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -37,7 +37,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
style: 'STYLE_attribute', style: 'STYLE_attribute',
cssId: 'ID_attribute' cssId: 'ID_attribute'
} }
}); },null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({

View File

@ -32,7 +32,7 @@
*/ */
MathJax.Extension["TeX/action"] = { MathJax.Extension["TeX/action"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -42,9 +42,13 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// Set up control sequenecs // Set up control sequenecs
// //
TEX.Definitions.macros.toggle = 'Toggle'; TEX.Definitions.Add({
TEX.Definitions.macros.mathtip = 'Mathtip'; macros: {
TEX.Definitions.macros.texttip = ['Macro','\\mathtip{#1}{\\text{#2}}',2]; toggle: 'Toggle',
mathtip: 'Mathtip',
texttip: ['Macro','\\mathtip{#1}{\\text{#2}}',2]
}
},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({

View File

@ -23,14 +23,10 @@
*/ */
MathJax.Extension["TeX/autoload-all"] = { MathJax.Extension["TeX/autoload-all"] = {
version: "2.0" version: "2.0.3"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX,
MACROS = TEX.Definitions.macros,
ENVS = TEX.Definitions.environment;
var EXTENSIONS = { var EXTENSIONS = {
action: ["mathtip","texttip","toggle"], action: ["mathtip","texttip","toggle"],
@ -42,24 +38,36 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
"shoveleft","shoveright","xrightarrow","xleftarrow"], "shoveleft","shoveright","xrightarrow","xleftarrow"],
begingroup: ["begingroup","endgroup","gdef","global"], begingroup: ["begingroup","endgroup","gdef","global"],
cancel: ["cancel","bcancel","xcancel","cancelto"], cancel: ["cancel","bcancel","xcancel","cancelto"],
color: ["color","colorbox","fcolorbox","DefineColor"], color: ["color","textcolor","colorbox","fcolorbox","DefineColor"],
enclose: ["enclose"], enclose: ["enclose"],
extpfeil: ["Newextarrow","xlongequal","xmapsto","xtofrom", extpfeil: ["Newextarrow","xlongequal","xmapsto","xtofrom",
"xtwoheadleftarrow","xtwoheadrightarrow"], "xtwoheadleftarrow","xtwoheadrightarrow"],
mhchem: ["ce","cee","cf"] mhchem: ["ce","cee","cf"]
}; };
for (var name in EXTENSIONS) {if (EXTENSIONS.hasOwnProperty(name)) { var ENVIRONMENTS = {
var macros = EXTENSIONS[name]; AMSmath: ["subarray","smallmatrix","equation","equation*"]
for (var i = 0, m = macros.length; i < m; i++) { };
MACROS[macros[i]] = ["Extension",name];
var name, i, m, defs = {macros:{}, environment:{}};
for (name in EXTENSIONS) {if (EXTENSIONS.hasOwnProperty(name)) {
if (!MathJax.Extension["TeX/"+name]) {
var macros = EXTENSIONS[name];
for (i = 0, m = macros.length; i < m; i++)
{defs.macros[macros[i]] = ["Extension",name]}
} }
}} }}
ENVS["subarray"] = ['ExtensionEnv',null,'AMSmath']; for (name in ENVIRONMENTS) {if (ENVIRONMENTS.hasOwnProperty(name)) {
ENVS["smallmatrix"] = ['ExtensionEnv',null,'AMSmath']; if (!MathJax.Extension["TeX/"+name]) {
ENVS["equation"] = ['ExtensionEnv',null,'AMSmath']; var envs = ENVIRONMENTS[name];
ENVS["equation*"] = ['ExtensionEnv',null,'AMSmath']; for (i = 0, m = envs.length; i < m; i++)
{defs.environment[envs[i]] = ["ExtensionEnv",null,name]}
}
}}
MathJax.InputJax.TeX.Definitions.Add(defs);
MathJax.Hub.Startup.signal.Post("TeX autoload-all Ready"); MathJax.Hub.Startup.signal.Post("TeX autoload-all Ready");

View File

@ -43,15 +43,15 @@
*/ */
MathJax.Extension["TeX/bbox"] = { MathJax.Extension["TeX/bbox"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX, var TEX = MathJax.InputJax.TeX,
MML = MathJax.ElementJax.mml; MML = MathJax.ElementJax.mml;
TEX.Definitions.macros.bbox = "BBox"; TEX.Definitions.Add({macros: {bbox: "BBox"}},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
BBox: function (name) { BBox: function (name) {

View File

@ -23,7 +23,7 @@
*/ */
MathJax.Extension["TeX/begingroup"] = { MathJax.Extension["TeX/begingroup"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -100,7 +100,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
Init: function (eqn) { Init: function (eqn) {
this.isEqn = eqn; this.stack = []; this.isEqn = eqn; this.stack = [];
if (!eqn) {this.Push(NSFRAME(TEXDEF.macros,TEXDEF.environments))} if (!eqn) {this.Push(NSFRAME(TEXDEF.macros,TEXDEF.environment))}
else {this.Push(NSFRAME())} else {this.Push(NSFRAME())}
}, },
// //
@ -186,10 +186,14 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// Define the new macros // Define the new macros
// //
TEXDEF.macros.begingroup = "BeginGroup"; TEXDEF.Add({
TEXDEF.macros.endgroup = "EndGroup"; macros: {
TEXDEF.macros.global = ["Extension","newcommand"]; begingroup: "BeginGroup",
TEXDEF.macros.gdef = ["Extension","newcommand"]; endgroup: "EndGroup",
global: ["Extension","newcommand"],
gdef: ["Extension","newcommand"]
}
},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
// //
@ -257,8 +261,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// Add the commands that depend on the newcommand code // Add the commands that depend on the newcommand code
// //
TEXDEF.macros.global = "Global"; TEXDEF.Add({
TEXDEF.macros.gdef = ["Macro","\\global\\def"]; macros: {
global: "Global",
gdef: ["Macro","\\global\\def"]
}
},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
// //

View File

@ -23,7 +23,7 @@
*/ */
MathJax.Extension["TeX/boldsymbol"] = { MathJax.Extension["TeX/boldsymbol"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -41,7 +41,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
BOLDVARIANT["-tex-caligraphic"] = "-tex-caligraphic-bold"; BOLDVARIANT["-tex-caligraphic"] = "-tex-caligraphic-bold";
BOLDVARIANT["-tex-oldstyle"] = "-tex-oldstyle-bold"; BOLDVARIANT["-tex-oldstyle"] = "-tex-oldstyle-bold";
TEXDEF.macros.boldsymbol = 'Boldsymbol'; TEXDEF.Add({macros: {boldsymbol: 'Boldsymbol'}},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
mmlToken: function (token) { mmlToken: function (token) {

View File

@ -29,7 +29,7 @@
*/ */
MathJax.Extension["TeX/cancel"] = { MathJax.Extension["TeX/cancel"] = {
version: "2.0", version: "2.0.1",
// //
// The attributes allowed in \enclose{notation}[attributes]{math} // The attributes allowed in \enclose{notation}[attributes]{math}
@ -45,7 +45,6 @@ MathJax.Extension["TeX/cancel"] = {
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX, var TEX = MathJax.InputJax.TeX,
MACROS = TEX.Definitions.macros,
MML = MathJax.ElementJax.mml, MML = MathJax.ElementJax.mml,
CANCEL = MathJax.Extension["TeX/cancel"]; CANCEL = MathJax.Extension["TeX/cancel"];
@ -65,12 +64,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
}; };
// //
// Set up macro // Set up macros
// //
MACROS.cancel = ['Cancel',MML.NOTATION.UPDIAGONALSTRIKE]; TEX.Definitions.Add({
MACROS.bcancel = ['Cancel',MML.NOTATION.DOWNDIAGONALSTRIKE]; macros: {
MACROS.xcancel = ['Cancel',MML.NOTATION.UPDIAGONALSTRIKE+" "+MML.NOTATION.DOWNDIAGONALSTRIKE]; cancel: ['Cancel',MML.NOTATION.UPDIAGONALSTRIKE],
MACROS.cancelto = 'CancelTo'; bcancel: ['Cancel',MML.NOTATION.DOWNDIAGONALSTRIKE],
xcancel: ['Cancel',MML.NOTATION.UPDIAGONALSTRIKE+" "+MML.NOTATION.DOWNDIAGONALSTRIKE],
cancelto: 'CancelTo'
}
},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
// //

View File

@ -2,9 +2,10 @@
* *
* MathJax/extensions/TeX/color.js * MathJax/extensions/TeX/color.js
* *
* Implements LaTeX-compatible \color macro rather than MathJax's * Implements LaTeX-compatible \color macro rather than MathJax's original
* original (non-standard) version. It includes the rgb, gray, and * (non-standard) version. It includes the rgb, RGB, gray, and named color
* named color models, and the \definecolor macro. * models, and the \textcolor, \definecolor, \colorbox, and \fcolorbox
* macros.
* *
* --------------------------------------------------------------------- * ---------------------------------------------------------------------
* *
@ -27,7 +28,7 @@
// The configuration defaults, augmented by the user settings // The configuration defaults, augmented by the user settings
// //
MathJax.Extension["TeX/color"] = { MathJax.Extension["TeX/color"] = {
version: "2.0", version: "2.0.2",
config: MathJax.Hub.CombineConfig("TeX.color",{ config: MathJax.Hub.CombineConfig("TeX.color",{
padding: "5px", padding: "5px",
@ -116,21 +117,37 @@ MathJax.Extension["TeX/color"] = {
}, },
/* /*
* Get an RGB color * Get an rgb color
*/ */
get_rgb: function (rgb) { get_rgb: function (rgb) {
rgb = rgb.split(/,/); var RGB = "#"; rgb = rgb.split(/,/); var RGB = "#";
if (rgb.length !== 3) {this.TEX.Error("RGB colors require 3 decimal numbers")} if (rgb.length !== 3) {this.TEX.Error("rgb colors require 3 decimal numbers")}
for (var i = 0; i < 3; i++) { for (var i = 0; i < 3; i++) {
if (!rgb[i].match(/^(\d+(\.\d*)?|\.\d+)$/)) {this.TEX.Error("Invalid decimal number")} if (!rgb[i].match(/^(\d+(\.\d*)?|\.\d+)$/)) {this.TEX.Error("Invalid decimal number")}
var n = parseFloat(rgb[i]); var n = parseFloat(rgb[i]);
if (n < 0 || n > 1) {this.TEX.Error("RGB values must be between 0 and 1")} if (n < 0 || n > 1) {this.TEX.Error("rgb values must be between 0 and 1")}
n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n} n = Math.floor(n*255).toString(16); if (n.length < 2) {n = "0"+n}
RGB += n; RGB += n;
} }
return RGB; return RGB;
}, },
/*
* Get an RGB color
*/
get_RGB: function (rgb) {
rgb = rgb.split(/,/); var RGB = "#";
if (rgb.length !== 3) {this.TEX.Error("RGB colors require 3 numbers")}
for (var i = 0; i < 3; i++) {
if (!rgb[i].match(/^\d+$/)) {this.TEX.Error("Invalid number")}
var n = parseInt(rgb[i]);
if (n > 255) {this.TEX.Error("RGB values must be between 0 and 255")}
n = n.toString(16); if (n.length < 2) {n = "0"+n}
RGB += n;
}
return RGB;
},
/* /*
* Get a gray-scale value * Get a gray-scale value
*/ */
@ -166,11 +183,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var COLOR = MathJax.Extension["TeX/color"]; var COLOR = MathJax.Extension["TeX/color"];
COLOR.TEX = TEX; // for reference in getColor above COLOR.TEX = TEX; // for reference in getColor above
TEX.Definitions.macros.color = "Color"; TEX.Definitions.Add({
TEX.Definitions.macros.definecolor = "DefineColor"; macros: {
TEX.Definitions.macros.colorbox = "ColorBox"; color: "Color",
TEX.Definitions.macros.fcolorbox = "fColorBox"; textcolor: "TextColor",
definecolor: "DefineColor",
colorbox: "ColorBox",
fcolorbox: "fColorBox"
}
},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
@ -185,6 +207,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
this.stack.env.color = color; this.stack.env.color = color;
this.Push(mml); this.Push(mml);
}, },
TextColor: function (name) {
var model = this.GetBrackets(name),
color = this.GetArgument(name);
color = COLOR.getColor(model,color);
var old = this.stack.env.color; this.stack.env.color = color;
var math = this.ParseArg(name);
if (old) {this.stack.env.color} else {delete this.stack.env.color}
this.Push(MML.mstyle(math).With({mathcolor: color}));
},
// //
// Define the \definecolor macro // Define the \definecolor macro

View File

@ -29,7 +29,7 @@
*/ */
MathJax.Extension["TeX/enclose"] = { MathJax.Extension["TeX/enclose"] = {
version: "2.0", version: "2.0.1",
// //
// The attributes allowed in \enclose{notation}[attributes]{math} // The attributes allowed in \enclose{notation}[attributes]{math}
@ -51,7 +51,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// Set up macro // Set up macro
// //
TEX.Definitions.macros.enclose = 'Enclose'; TEX.Definitions.Add({macros: {enclose: 'Enclose'}},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
// //

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Extension["TeX/extpfeil"] = { MathJax.Extension["TeX/extpfeil"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -34,7 +34,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// Define the arrows to load the AMSmath extension // Define the arrows to load the AMSmath extension
// (since they need its xArrow method) // (since they need its xArrow method)
// //
MathJax.Hub.Insert(TEXDEF,{ TEXDEF.Add({
macros: { macros: {
xtwoheadrightarrow: ['Extension','AMSmath'], xtwoheadrightarrow: ['Extension','AMSmath'],
xtwoheadleftarrow: ['Extension','AMSmath'], xtwoheadleftarrow: ['Extension','AMSmath'],
@ -43,7 +43,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
xtofrom: ['Extension','AMSmath'], xtofrom: ['Extension','AMSmath'],
Newextarrow: ['Extension','AMSmath'] Newextarrow: ['Extension','AMSmath']
} }
}); },null,true);
// //
// Redefine the macros when AMSmath is loaded // Redefine the macros when AMSmath is loaded

View File

@ -22,16 +22,15 @@
*/ */
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var VERSION = "2.0"; var VERSION = "2.0.1";
var MML = MathJax.ElementJax.mml; var MML = MathJax.ElementJax.mml;
var TEX = MathJax.InputJax.TeX; var TEX = MathJax.InputJax.TeX;
var TEXDEF = TEX.Definitions; var TEXDEF = TEX.Definitions;
TEXDEF.macros.mathchoice = 'MathChoice'; TEXDEF.Add({macros: {mathchoice: 'MathChoice'}},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({
MathChoice: function (name) { MathChoice: function (name) {
var D = this.ParseArg(name), var D = this.ParseArg(name),
T = this.ParseArg(name), T = this.ParseArg(name),
@ -39,7 +38,6 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
SS = this.ParseArg(name); SS = this.ParseArg(name);
this.Push(MML.TeXmathchoice(D,T,S,SS)); this.Push(MML.TeXmathchoice(D,T,S,SS));
} }
}); });
MML.TeXmathchoice = MML.mbase.Subclass({ MML.TeXmathchoice = MML.mbase.Subclass({

View File

@ -23,13 +23,12 @@
*/ */
MathJax.Extension["TeX/mhchem"] = { MathJax.Extension["TeX/mhchem"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX, var TEX = MathJax.InputJax.TeX;
MACROS = TEX.Definitions.macros;
/* /*
* This is the main class for handing the \ce and related commands. * This is the main class for handing the \ce and related commands.
@ -81,6 +80,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
'<->': "leftrightarrow", '<->': "leftrightarrow",
'<=>': "rightleftharpoons", '<=>': "rightleftharpoons",
'<=>>': "Rightleftharpoons", '<=>>': "Rightleftharpoons",
'<<=>': "Leftrightharpoons",
'^': "uparrow", '^': "uparrow",
'v': "downarrow" 'v': "downarrow"
}, },
@ -136,7 +136,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
}, },
// //
// Make a number of fraction preceeding an atom, // Make a number or fraction preceeding an atom,
// or a subscript for an atom. // or a subscript for an atom.
// //
ParseNumber: function () { ParseNumber: function () {
@ -204,7 +204,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
ParseLess: function (c) { ParseLess: function (c) {
this.FinishAtom(); this.FinishAtom();
var arrow = this.Match(/^(<->?|<=>>?)/); var arrow = this.Match(/^(<->?|<=>>?|<<=>)/);
if (!arrow) {this.tex += c; this.i++} else {this.AddArrow(arrow)} if (!arrow) {this.tex += c; this.i++} else {this.AddArrow(arrow)}
}, },
@ -215,7 +215,8 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
c = this.string.charAt(++this.i); c = this.string.charAt(++this.i);
if (c === "{") { if (c === "{") {
this.i++; var m = this.Find("}"); this.i++; var m = this.Find("}");
if (m === "-.") {this.sup += "{-}{\\cdot}"} else if (m) {this.sup += CE(m).Parse()} if (m === "-.") {this.sup += "{-}{\\cdot}"}
else if (m) {this.sup += CE(m).Parse().replace(/^\{-\}/,"-")}
} else if (c === " " || c === "") { } else if (c === " " || c === "") {
this.tex += "{\\"+this.Arrows["^"]+"}"; this.i++; this.tex += "{\\"+this.Arrows["^"]+"}"; this.i++;
} else { } else {
@ -228,7 +229,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
ParseSubscript: function (c) { ParseSubscript: function (c) {
if (this.string.charAt(++this.i) == "{") { if (this.string.charAt(++this.i) == "{") {
this.i++; this.sub += CE(this.Find("}")).Parse(); this.i++; this.sub += CE(this.Find("}")).Parse().replace(/^\{-\}/,"-");
} else { } else {
var n = this.Match(/^\d+/); var n = this.Match(/^\d+/);
if (n) {this.sub += n} if (n) {this.sub += n}
@ -300,15 +301,15 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// right-justify super- and subscripts when they are before the atom // right-justify super- and subscripts when they are before the atom
// //
var n = Math.abs(this.sup.length-this.sub.length); var sup = this.sup, sub = this.sub;
if (n) { if (!sup.match(/\d/)) {sup += "\\vphantom{0}"} // force common heights
var zeros = "0000000000".substr(0,n); if (!sub.match(/\d/)) {sub += "\\vphantom{0}"}
var script = (this.sup.length > this.sub.length ? "sub" : "sup"); this.tex += "\\raise 1pt{\\scriptstyle\\begin{CEscriptstack}"+sup+"\\\\"+
this[script] = "\\phantom{"+zeros+"}" + this[script]; sub+"\\end{CEscriptstack}}\\kern-.125em ";
} } else {
if (!this.sup) {this.sup = "\\Space{0pt}{0pt}{.2em}"} // forces subscripts to align properly
this.tex += "^{"+this.sup+"}_{"+this.sub+"}";
} }
if (!this.sup) {this.sup = "\\Space{0pt}{0pt}{.2em}"} // forces subscripts to align properly
this.tex += "^{"+this.sup+"}_{"+this.sub+"}";
this.sup = this.sub = ""; this.sup = this.sub = "";
} }
this.atom = false; this.atom = false;
@ -358,37 +359,77 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
}); });
MathJax.Extension["TeX/mhchem"].CE = CE;
/***************************************************************************/ /***************************************************************************/
// TEX.Definitions.Add({
// Set up the macros for chemistry macros: {
// //
MACROS.ce = 'CE'; // Set up the macros for chemistry
MACROS.cf = 'CE'; //
MACROS.cee = 'CE'; ce: 'CE',
cf: 'CE',
cee: 'CE',
//
// Make these load AMSmath package (redefined below when loaded)
//
xleftrightarrow: ['Extension','AMSmath'],
xrightleftharpoons: ['Extension','AMSmath'],
xRightleftharpoons: ['Extension','AMSmath'],
xLeftrightharpoons: ['Extension','AMSmath'],
// FIXME: These don't work well in FF NativeMML mode
longrightleftharpoons: ["Macro","\\stackrel{\\textstyle{{-}\\!\\!{\\rightharpoonup}}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"],
longRightleftharpoons: ["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\small\\smash\\leftharpoondown}"],
longLeftrightharpoons: ["Macro","\\stackrel{\\rightharpoonup}{{{\\leftharpoondown}\\!\\!\\textstyle{-}}}"],
//
// Add \hyphen used in some mhchem examples
//
hyphen: ["Macro","\\text{-}"],
//
// Needed for \bond for the ~ forms
//
tripledash: ["Macro","\\raise3mu{\\tiny\\text{-}\\kern2mu\\text{-}\\kern2mu\\text{-}}"]
},
//
// Needed for \bond for the ~ forms
//
environment: {
CEstack: ['Array',null,null,null,'r',null,"0.001em",'T',1],
CEscriptstack: ['Array',null,null,null,'r',null,"0.2em",'S',1]
}
},null,true);
if (!MathJax.Extension["TeX/AMSmath"]) {
TEX.Definitions.Add({
macros: {
xrightarrow: ['Extension','AMSmath'],
xleftarrow: ['Extension','AMSmath']
}
},null,true);
}
// //
// Include some missing arrows (some are hacks) // These arrows need to wait until AMSmath is loaded
// //
MACROS.xleftrightarrow = ['xArrow',0x2194,6,6]; MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
MACROS.xrightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: doesn't stretch in HTML-CSS output TEX.Definitions.Add({
MACROS.xRightleftharpoons = ['xArrow',0x21CC,5,7]; // FIXME: how should this be handled? macros: {
//
// FIXME: These don't work well in FF NativeMML mode // Some of these are hacks for now
MACROS.longrightleftharpoons = ["Macro","\\stackrel{\\textstyle{{-}\\!\\!{\\rightharpoonup}}}{\\smash{{\\leftharpoondown}\\!\\!{-}}}"]; //
MACROS.longRightleftharpoons = ["Macro","\\stackrel{\\textstyle{-}\\!\\!{\\rightharpoonup}}{\\small\\smash\\leftharpoondown}"]; xleftrightarrow: ['xArrow',0x2194,6,6],
xrightleftharpoons: ['xArrow',0x21CC,5,7], // FIXME: doesn't stretch in HTML-CSS output
// xRightleftharpoons: ['xArrow',0x21CC,5,7], // FIXME: how should this be handled?
// Needed for \bond for the ~ forms xLeftrightharpoons: ['xArrow',0x21CC,5,7]
// }
MACROS.tripledash = ["Macro","\\raise3mu{\\tiny\\text{-}\\kern2mu\\text{-}\\kern2mu\\text{-}}"]; },null,true);
TEX.Definitions.environment.CEstack = ['Array',null,null,null,'r',null,"0.001em",'T',1] });
//
// Add \hyphen used in some mhchem examples
//
MACROS.hyphen = ["Macro","\\text{-}"];
TEX.Parse.Augment({ TEX.Parse.Augment({

View File

@ -59,7 +59,7 @@
// The configuration defaults, augmented by the user settings // The configuration defaults, augmented by the user settings
// //
MathJax.Extension["TeX/unicode"] = { MathJax.Extension["TeX/unicode"] = {
version: "2.0", version: "2.0.1",
unicode: {}, unicode: {},
config: MathJax.Hub.CombineConfig("TeX.unicode",{ config: MathJax.Hub.CombineConfig("TeX.unicode",{
fonts: "STIXGeneral,'Arial Unicode MS'" fonts: "STIXGeneral,'Arial Unicode MS'"
@ -74,7 +74,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
// //
// Add \unicode macro // Add \unicode macro
// //
TEX.Definitions.macros.unicode = 'Unicode'; TEX.Definitions.Add({macros: {unicode: 'Unicode'}},null,true);
// //
// Implementation of \unicode in parser // Implementation of \unicode in parser
// //

View File

@ -23,7 +23,7 @@
*/ */
MathJax.Extension["TeX/verb"] = { MathJax.Extension["TeX/verb"] = {
version: "2.0" version: "2.0.1"
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
@ -32,7 +32,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX; var TEX = MathJax.InputJax.TeX;
var TEXDEF = TEX.Definitions; var TEXDEF = TEX.Definitions;
TEXDEF.macros.verb = 'Verb'; TEXDEF.Add({macros: {verb: 'Verb'}},null,true);
TEX.Parse.Augment({ TEX.Parse.Augment({

View File

@ -91,5 +91,5 @@ MathJax.Extension.jsMath2jax = {
}; };
MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.jsMath2jax]); MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.jsMath2jax],8);
MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js"); MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js");

View File

@ -23,7 +23,7 @@
*/ */
MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () { MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
var VERSION = "2.0"; var VERSION = "2.0.1";
var MML = MathJax.ElementJax.mml var MML = MathJax.ElementJax.mml
SETTINGS = MathJax.Hub.config.menuSettings; SETTINGS = MathJax.Hub.config.menuSettings;
@ -88,7 +88,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () {
if (typeof(value) === "string" && if (typeof(value) === "string" &&
value.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)) { value.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)) {
// FIXME: should take scriptlevel into account // FIXME: should take scriptlevel into account
return ((1/18)*RegExp.$1).toFixed(3).replace(/\.?0+$/,"")+"em"; return RegExp.$2+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em";
} }
else if (this.toMathMLvariants[value]) {return this.toMathMLvariants[value]} else if (this.toMathMLvariants[value]) {return this.toMathMLvariants[value]}
return this.toMathMLquote(value); return this.toMathMLquote(value);

View File

@ -27,7 +27,7 @@ MathJax.ElementJax.mml = MathJax.ElementJax({
mimeType: "jax/mml" mimeType: "jax/mml"
},{ },{
id: "mml", id: "mml",
version: "2.0", version: "2.0.4",
directory: MathJax.ElementJax.directory + "/mml", directory: MathJax.ElementJax.directory + "/mml",
extensionDir: MathJax.ElementJax.extensionDir + "/mml", extensionDir: MathJax.ElementJax.extensionDir + "/mml",
optableDir: MathJax.ElementJax.directory + "/mml/optable" optableDir: MathJax.ElementJax.directory + "/mml/optable"
@ -395,7 +395,7 @@ MathJax.ElementJax.mml.Augment({
}, },
setBaseTeXclasses: function (prev) { setBaseTeXclasses: function (prev) {
this.getPrevClass(prev); this.texClass = null; this.getPrevClass(prev); this.texClass = null;
if (this.isEmbellished()) { if (this.isEmbellished() || this.data[0].isa(MML.mi)) {
prev = this.data[0].setTeXclass(prev); prev = this.data[0].setTeXclass(prev);
this.updateTeXclass(this.Core()); this.updateTeXclass(this.Core());
} else {if (this.data[0]) {this.data[0].setTeXclass()}; prev = this} } else {if (this.data[0]) {this.data[0].setTeXclass()}; prev = this}
@ -429,7 +429,17 @@ MathJax.ElementJax.mml.Augment({
MML.VARIANT.ITALIC : MML.VARIANT.NORMAL); MML.VARIANT.ITALIC : MML.VARIANT.NORMAL);
} }
return ""; return "";
} },
setTeXclass: function (prev) {
this.getPrevClass(prev);
var name = this.data.join("");
if (name.length > 1 && name.match(/^[a-z][a-z0-9]*$/i) &&
this.texClass === MML.TEXCLASS.ORD) {
this.texClass = MML.TEXCLASS.OP;
this.autoOP = true;
}
return this;
}
}); });
MML.mn = MML.mbase.Subclass({ MML.mn = MML.mbase.Subclass({
@ -567,9 +577,24 @@ MathJax.ElementJax.mml.Augment({
setTeXclass: function (prev) { setTeXclass: function (prev) {
this.getValues("lspace","rspace"); // sets useMMLspacing this.getValues("lspace","rspace"); // sets useMMLspacing
if (this.useMMLspacing) {this.texClass = MML.TEXCLASS.NONE; return this} if (this.useMMLspacing) {this.texClass = MML.TEXCLASS.NONE; return this}
this.texClass = this.Get("texClass"); if (this.texClass === MML.TEXCLASS.NONE) {return prev} this.texClass = this.Get("texClass");
if (prev) {this.prevClass = prev.texClass || MML.TEXCLASS.ORD; this.prevLevel = prev.Get("scriptlevel")} if (this.data.join("") === "\u2061") {
else {this.prevClass = MML.TEXCLASS.NONE} // force previous node to be texClass OP, and skip this node
prev.texClass = MML.TEXCLASS.OP;
this.texClass = this.prevClass = MML.TEXCLASS.NONE;
return prev;
}
return this.adjustTeXclass(prev);
},
adjustTeXclass: function (prev) {
if (this.texClass === MML.TEXCLASS.NONE) {return prev}
if (prev) {
if (prev.autoOP && (this.texClass === MML.TEXCLASS.BIN ||
this.texClass === MML.TEXCLASS.REL))
{prev.texClass = MML.TEXCLASS.ORD}
this.prevClass = prev.texClass || MML.TEXCLASS.ORD;
this.prevLevel = prev.Get("scriptlevel")
} else {this.prevClass = MML.TEXCLASS.NONE}
if (this.texClass === MML.TEXCLASS.BIN && if (this.texClass === MML.TEXCLASS.BIN &&
(this.prevClass === MML.TEXCLASS.NONE || (this.prevClass === MML.TEXCLASS.NONE ||
this.prevClass === MML.TEXCLASS.BIN || this.prevClass === MML.TEXCLASS.BIN ||
@ -1009,6 +1034,9 @@ MathJax.ElementJax.mml.Augment({
}, },
inheritFromMe: true, inheritFromMe: true,
noInherit: { noInherit: {
mover: {align: true},
munder: {align: true},
munderover: {align: true},
mtable: { mtable: {
align: true, rowalign: true, columnalign: true, groupalign: true, align: true, rowalign: true, columnalign: true, groupalign: true,
alignmentscope: true, columnwidth: true, width: true, rowspacing: true, alignmentscope: true, columnwidth: true, width: true, rowspacing: true,
@ -1234,7 +1262,6 @@ MathJax.ElementJax.mml.Augment({
var nNode, i, m; var nNode, i, m;
if (node.nodeType === 1) { // ELEMENT_NODE if (node.nodeType === 1) { // ELEMENT_NODE
nNode = document.createElement(node.nodeName); nNode = document.createElement(node.nodeName);
if (node.className) {nNode.className=iNode.className}
for (i = 0, m = node.attributes.length; i < m; i++) { for (i = 0, m = node.attributes.length; i < m; i++) {
var attribute = node.attributes[i]; var attribute = node.attributes[i];
if (attribute.specified && attribute.nodeValue != null && attribute.nodeValue != '') if (attribute.specified && attribute.nodeValue != null && attribute.nodeValue != '')
@ -1261,11 +1288,14 @@ MathJax.ElementJax.mml.Augment({
type: "texatom", type: "texatom",
inferRow: true, inferRow: true,
texClass: MML.TEXCLASS.ORD, texClass: MML.TEXCLASS.ORD,
Core: MML.mbase.childCore,
CoreMO: MML.mbase.childCoreMO,
isEmbellished: MML.mbase.childEmbellished,
setTeXclass: function (prev) { setTeXclass: function (prev) {
this.getPrevClass(prev);
this.data[0].setTeXclass(); this.data[0].setTeXclass();
return this; return this.adjustTeXclass(prev);
} },
adjustTeXclass: MML.mo.prototype.adjustTeXclass
}); });
MML.NULL = MML.mbase().With({type:"null"}); MML.NULL = MML.mbase().With({type:"null"});

View File

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

View File

@ -135,6 +135,16 @@
type: "close", isClose: true type: "close", isClose: true
}); });
STACKITEM.prime = STACKITEM.Subclass({
type: "prime",
checkItem: function (item) {
if (this.data[0].type !== "msubsup")
{return [MML.msup(this.data[0],this.data[1]),item]}
this.data[0].SetData(this.data[0].sup,this.data[1]);
return [this.data[0],item];
}
});
STACKITEM.subsup = STACKITEM.Subclass({ STACKITEM.subsup = STACKITEM.Subclass({
type: "subsup", type: "subsup",
stopError: "Missing superscript or subscript argument", stopError: "Missing superscript or subscript argument",
@ -142,6 +152,10 @@
var script = ["","subscript","superscript"][this.position]; var script = ["","subscript","superscript"][this.position];
if (item.type === "open" || item.type === "left") {return true} if (item.type === "open" || item.type === "left") {return true}
if (item.type === "mml") { if (item.type === "mml") {
if (this.primes) {
if (this.position !== 2) {this.data[0].SetData(2,this.primes)}
else {item.data[0] = MML.mrow(this.primes.With({variantForm:true}),item.data[0])}
}
this.data[0].SetData(this.position,item.data[0]); this.data[0].SetData(this.position,item.data[0]);
return STACKITEM.mml(this.data[0]); return STACKITEM.mml(this.data[0]);
} }
@ -335,9 +349,11 @@
} }
}); });
STACKITEM.not.remap = { STACKITEM.not.remap = {
0x2190:0x219A, 0x2192:0x219B, 0x2194:0x21AE,
0x21D0:0x21CD, 0x21D2:0x21CF, 0x21D4:0x21CE,
0x2208:0x2209, 0x220B:0x220C, 0x2223:0x2224, 0x2225:0x2226, 0x2208:0x2209, 0x220B:0x220C, 0x2223:0x2224, 0x2225:0x2226,
0x223C:0x2241, 0x007E:0x2241, 0x2243:0x2244, 0x2245:0x2247, 0x223C:0x2241, 0x007E:0x2241, 0x2243:0x2244, 0x2245:0x2247,
0x2248:0x2249, 0x003D:0x2260, 0x2261:0x2262, 0x2248:0x2249, 0x224D:0x226D, 0x003D:0x2260, 0x2261:0x2262,
0x003C:0x226E, 0x003E:0x226F, 0x2264:0x2270, 0x2265:0x2271, 0x003C:0x226E, 0x003E:0x226F, 0x2264:0x2270, 0x2265:0x2271,
0x2272:0x2274, 0x2273:0x2275, 0x2276:0x2278, 0x2277:0x2279, 0x2272:0x2274, 0x2273:0x2275, 0x2276:0x2278, 0x2277:0x2279,
0x227A:0x2280, 0x227B:0x2281, 0x2282:0x2284, 0x2283:0x2285, 0x227A:0x2280, 0x227B:0x2281, 0x2282:0x2284, 0x2283:0x2285,
@ -442,9 +458,9 @@
varphi: '03C6', varphi: '03C6',
// Ord symbols // Ord symbols
S: '00A7', S: ['00A7',{mathvariant: MML.VARIANT.NORMAL}],
aleph: ['2135',{mathvariant: MML.VARIANT.NORMAL}], aleph: ['2135',{mathvariant: MML.VARIANT.NORMAL}],
hbar: '210F', hbar: ['210F',{variantForm:true}],
imath: '0131', imath: '0131',
jmath: '0237', jmath: '0237',
ell: '2113', ell: '2113',
@ -453,14 +469,14 @@
Im: ['2111',{mathvariant: MML.VARIANT.NORMAL}], Im: ['2111',{mathvariant: MML.VARIANT.NORMAL}],
partial: ['2202',{mathvariant: MML.VARIANT.NORMAL}], partial: ['2202',{mathvariant: MML.VARIANT.NORMAL}],
infty: ['221E',{mathvariant: MML.VARIANT.NORMAL}], infty: ['221E',{mathvariant: MML.VARIANT.NORMAL}],
prime: ['2032',{mathvariant: MML.VARIANT.NORMAL}], prime: ['2032',{mathvariant: MML.VARIANT.NORMAL, variantForm:true}],
emptyset: ['2205',{mathvariant: MML.VARIANT.NORMAL}], emptyset: ['2205',{mathvariant: MML.VARIANT.NORMAL}],
nabla: ['2207',{mathvariant: MML.VARIANT.NORMAL}], nabla: ['2207',{mathvariant: MML.VARIANT.NORMAL}],
top: ['22A4',{mathvariant: MML.VARIANT.NORMAL}], top: ['22A4',{mathvariant: MML.VARIANT.NORMAL}],
bot: ['22A5',{mathvariant: MML.VARIANT.NORMAL}], bot: ['22A5',{mathvariant: MML.VARIANT.NORMAL}],
angle: ['2220',{mathvariant: MML.VARIANT.NORMAL}], angle: ['2220',{mathvariant: MML.VARIANT.NORMAL}],
triangle: ['25B3',{mathvariant: MML.VARIANT.NORMAL}], triangle: ['25B3',{mathvariant: MML.VARIANT.NORMAL}],
backslash: ['2216',{mathvariant: MML.VARIANT.NORMAL}], backslash: ['2216',{mathvariant: MML.VARIANT.NORMAL, variantForm:true}],
forall: ['2200',{mathvariant: MML.VARIANT.NORMAL}], forall: ['2200',{mathvariant: MML.VARIANT.NORMAL}],
exists: ['2203',{mathvariant: MML.VARIANT.NORMAL}], exists: ['2203',{mathvariant: MML.VARIANT.NORMAL}],
neg: ['00AC',{mathvariant: MML.VARIANT.NORMAL}], neg: ['00AC',{mathvariant: MML.VARIANT.NORMAL}],
@ -527,7 +543,7 @@
pm: '00B1', pm: '00B1',
circ: '2218', circ: '2218',
bigcirc: '25EF', bigcirc: '25EF',
setminus: '2216', setminus: ['2216',{variantForm:true}],
cdot: '22C5', cdot: '22C5',
ast: '2217', ast: '2217',
times: '00D7', times: '00D7',
@ -862,18 +878,18 @@
hphantom: ['Phantom',0,1], hphantom: ['Phantom',0,1],
smash: 'Smash', smash: 'Smash',
acute: ['Accent', "02CA"], // or 0301 acute: ['Accent', "00B4"], // or 0301 or 02CA
grave: ['Accent', "02CB"], // or 0300 grave: ['Accent', "0060"], // or 0300 or 02CB
ddot: ['Accent', "00A8"], // or 0308 ddot: ['Accent', "00A8"], // or 0308
tilde: ['Accent', "02DC"], // or 0303 tilde: ['Accent', "007E"], // or 0303 or 02DC
bar: ['Accent', "02C9"], // or 0304 bar: ['Accent', "00AF"], // or 0304 or 02C9
breve: ['Accent', "02D8"], // or 0306 breve: ['Accent', "02D8"], // or 0306
check: ['Accent', "02C7"], // or 030C check: ['Accent', "02C7"], // or 030C
hat: ['Accent', "02C6"], // or 0302 hat: ['Accent', "005E"], // or 0302 or 02C6
vec: ['Accent', "20D7"], vec: ['Accent', "2192"], // or 20D7
dot: ['Accent', "02D9"], // or 0307 dot: ['Accent', "02D9"], // or 0307
widetilde: ['Accent', "02DC",1], // or 0303 widetilde: ['Accent', "007E",1], // or 0303 or 02DC
widehat: ['Accent', "02C6",1], // or 0302 widehat: ['Accent', "005E",1], // or 0302 or 02C6
matrix: 'Matrix', matrix: 'Matrix',
array: 'Matrix', array: 'Matrix',
@ -968,12 +984,13 @@
vmatrix: ['Array',null,'\\vert','\\vert','c'], vmatrix: ['Array',null,'\\vert','\\vert','c'],
Vmatrix: ['Array',null,'\\Vert','\\Vert','c'], Vmatrix: ['Array',null,'\\Vert','\\Vert','c'],
cases: ['Array',null,'\\{','.','ll',null,".1em"], cases: ['Array',null,'\\{','.','ll',null,".1em"],
eqnarray: ['Array',null,null,null,'rcl',MML.LENGTH.THICKMATHSPACE,".5em",'D'],
'eqnarray*': ['Array',null,null,null,'rcl',MML.LENGTH.THICKMATHSPACE,".5em",'D'],
equation: [null,'Equation'], equation: [null,'Equation'],
'equation*': [null,'Equation'], 'equation*': [null,'Equation'],
eqnarray: ['ExtensionEnv',null,'AMSmath'],
'eqnarray*': ['ExtensionEnv',null,'AMSmath'],
align: ['ExtensionEnv',null,'AMSmath'], align: ['ExtensionEnv',null,'AMSmath'],
'align*': ['ExtensionEnv',null,'AMSmath'], 'align*': ['ExtensionEnv',null,'AMSmath'],
aligned: ['ExtensionEnv',null,'AMSmath'], aligned: ['ExtensionEnv',null,'AMSmath'],
@ -1139,13 +1156,12 @@
Superscript: function (c) { Superscript: function (c) {
if (this.GetNext().match(/\d/)) // don't treat numbers as a unit if (this.GetNext().match(/\d/)) // don't treat numbers as a unit
{this.string = this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)} {this.string = this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}
var position, base = this.stack.Prev(); if (!base) {base = MML.mi("")} var position, primes, base, top = this.stack.Top();
if (top.type === "prime") {base = top.data[0]; primes = top.data[1]; this.stack.Pop()}
else {base = this.stack.Prev(); if (!base) {base = MML.mi("")}}
if (base.isEmbellishedWrapper) {base = base.data[0].data[0]} if (base.isEmbellishedWrapper) {base = base.data[0].data[0]}
if (base.type === "msubsup") { if (base.type === "msubsup") {
if (base.data[base.sup]) { if (base.data[base.sup]) {TEX.Error("Double exponent: use braces to clarify")}
if (!base.data[base.sup].isPrime) {TEX.Error("Double exponent: use braces to clarify")}
base = MML.msubsup(base,null,null);
}
position = base.sup; position = base.sup;
} else if (base.movesupsub) { } else if (base.movesupsub) {
if (base.type !== "munderover" || base.data[base.over]) { if (base.type !== "munderover" || base.data[base.over]) {
@ -1157,12 +1173,14 @@
base = MML.msubsup(base,null,null); base = MML.msubsup(base,null,null);
position = base.sup; position = base.sup;
} }
this.Push(STACKITEM.subsup(base).With({position: position})); this.Push(STACKITEM.subsup(base).With({position: position, primes: primes}));
}, },
Subscript: function (c) { Subscript: function (c) {
if (this.GetNext().match(/\d/)) // don't treat numbers as a unit if (this.GetNext().match(/\d/)) // don't treat numbers as a unit
{this.string = this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)} {this.string = this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}
var position, base = this.stack.Prev(); if (!base) {base = MML.mi("")} var position, primes, base, top = this.stack.Top();
if (top.type === "prime") {base = top.data[0]; primes = top.data[1]; this.stack.Pop()}
else {base = this.stack.Prev(); if (!base) {base = MML.mi("")}}
if (base.isEmbellishedWrapper) {base = base.data[0].data[0]} if (base.isEmbellishedWrapper) {base = base.data[0].data[0]}
if (base.type === "msubsup") { if (base.type === "msubsup") {
if (base.data[base.sub]) {TEX.Error("Double subscripts: use braces to clarify")} if (base.data[base.sub]) {TEX.Error("Double subscripts: use braces to clarify")}
@ -1177,7 +1195,7 @@
base = MML.msubsup(base,null,null); base = MML.msubsup(base,null,null);
position = base.sub; position = base.sub;
} }
this.Push(STACKITEM.subsup(base).With({position: position})); this.Push(STACKITEM.subsup(base).With({position: position, primes: primes}));
}, },
PRIME: "\u2032", SMARTQUOTE: "\u2019", PRIME: "\u2032", SMARTQUOTE: "\u2019",
Prime: function (c) { Prime: function (c) {
@ -1187,8 +1205,8 @@
var sup = ""; this.i--; var sup = ""; this.i--;
do {sup += this.PRIME; this.i++, c = this.GetNext()} do {sup += this.PRIME; this.i++, c = this.GetNext()}
while (c === "'" || c === this.SMARTQUOTE); while (c === "'" || c === this.SMARTQUOTE);
sup = this.mmlToken(MML.mo(MML.chars(sup)).With({isPrime: true})); sup = ["","\u2032","\u2033","\u2034","\u2057"][sup.length] || sup;
this.Push(MML.msup(base,sup)); this.Push(STACKITEM.prime(base,this.mmlToken(MML.mo(sup))));
}, },
mi2mo: function (mi) { mi2mo: function (mi) {
var mo = MML.mo(); mo.Append.apply(mo,mi.data); var id; var mo = MML.mo(); mo.Append.apply(mo,mi.data); var id;
@ -1286,7 +1304,7 @@
}, },
Limits: function (name,limits) { Limits: function (name,limits) {
var op = this.stack.Prev("nopop"); var op = this.stack.Prev("nopop");
if (op.texClass !== MML.TEXCLASS.OP) {TEX.Error(name+" is allowed only on operators")} if (!op || op.texClass !== MML.TEXCLASS.OP) {TEX.Error(name+" is allowed only on operators")}
op.movesupsub = (limits ? true : false); op.movesupsub = (limits ? true : false);
op.movablelimits = false; op.movablelimits = false;
}, },
@ -1592,9 +1610,12 @@
}, },
CrLaTeX: function (name) { CrLaTeX: function (name) {
var n = this.GetBrackets(name,"").replace(/ /g,""); var n;
if (n && !n.match(/^(((\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|mm|cm|in|pc))$/)) if (this.string.charAt(this.i) === "[") {
{TEX.Error("Bracket argument to "+name+" must be a dimension")} n = this.GetBrackets(name,"").replace(/ /g,"");
if (n && !n.match(/^(((\.\d+|\d+(\.\d*)?))(pt|em|ex|mu|mm|cm|in|pc))$/))
{TEX.Error("Bracket argument to "+name+" must be a dimension")}
}
this.Push(STACKITEM.cell().With({isCR: true, name: name, linebreak: true})); this.Push(STACKITEM.cell().With({isCR: true, name: name, linebreak: true}));
var top = this.stack.Top(); var top = this.stack.Top();
if (top.isa(STACKITEM.array)) { if (top.isa(STACKITEM.array)) {
@ -1986,7 +2007,7 @@
this.prefilterHooks.Execute(data); math = data.math; this.prefilterHooks.Execute(data); math = data.math;
try { try {
mml = TEX.Parse(math).mml(); mml = TEX.Parse(math).mml();
// mml = MML.semantics(mml,MML.annotation(math).With({encoding:"application:x-tex"})); // mml = MML.semantics(mml,MML.annotation(math).With({encoding:"application/x-tex"}));
} catch(err) { } catch(err) {
if (!err.texError) {throw err} if (!err.texError) {throw err}
mml = this.formatError(err,math,display,script); mml = this.formatError(err,math,display,script);

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var VERSION = "2.0"; var VERSION = "2.0.2";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"]; HTMLCSS = MathJax.OutputJax["HTML-CSS"];
@ -38,8 +38,8 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var stack = HTMLCSS.createStack(span); var stack = HTMLCSS.createStack(span);
var scale = this.HTMLgetScale(), mu = this.HTMLgetMu(span), LABEL = -1; var scale = this.HTMLgetScale(), mu = this.HTMLgetMu(span), LABEL = -1;
var H = [], D = [], W = [], A = [], C = [], i, j, J = -1, m, M, s, row, entries = []; var H = [], D = [], W = [], A = [], C = [], i, j, J = -1, m, M, s, row, cell, mo, entries = [];
var LHD = HTMLCSS.FONTDATA.baselineskip * scale * values.useHeight, var LHD = HTMLCSS.FONTDATA.baselineskip * scale * values.useHeight, HD,
LH = HTMLCSS.FONTDATA.lineH * scale, LD = HTMLCSS.FONTDATA.lineD * scale; LH = HTMLCSS.FONTDATA.lineH * scale, LD = HTMLCSS.FONTDATA.lineD * scale;
// //
@ -62,7 +62,26 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
for (i = 0, m = this.data.length; i < m; i++) { for (i = 0, m = this.data.length; i < m; i++) {
row = this.data[i]; s = (row.type === "mlabeledtr" ? LABEL : 0); row = this.data[i]; s = (row.type === "mlabeledtr" ? LABEL : 0);
for (j = s, M = row.data.length + s; j < M; j++) { for (j = s, M = row.data.length + s; j < M; j++) {
if (row.data[j-s].isMultiline) {A[i][j].style.width = "100%"} cell = row.data[j-s];
if (cell.isMultiline) {A[i][j].style.width = "100%"}
if (cell.isEmbellished()) {
mo = cell.CoreMO();
var min = mo.Get("minsize",true);
if (min) {
var bbox = mo.HTMLspanElement().bbox;
if (mo.HTMLcanStretch("Vertical")) {
HD = bbox.h + bbox.d;
if (HD) {
min = HTMLCSS.length2em(min,mu,HD);
if (min*bbox.h/HD > H[j]) {H[j] = min*bbox.h/HD}
if (min*bbox.d/HD > D[j]) {D[j] = min*bbox.d/HD}
}
} else if (mo.HTMLcanStretch("Horizontal")) {
min = HTMLCSS.length2em(min,mu,bbox.w);
if (min > W[j]) {W[j] = min}
}
}
}
if (A[i][j].bbox.h > H[i]) {H[i] = A[i][j].bbox.h} if (A[i][j].bbox.h > H[i]) {H[i] = A[i][j].bbox.h}
if (A[i][j].bbox.d > D[i]) {D[i] = A[i][j].bbox.d} if (A[i][j].bbox.d > D[i]) {D[i] = A[i][j].bbox.d}
if (A[i][j].bbox.w > W[j]) {W[j] = A[i][j].bbox.w} if (A[i][j].bbox.w > W[j]) {W[j] = A[i][j].bbox.w}
@ -122,7 +141,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
// //
// Determine array total height // Determine array total height
// //
var HD = H[0] + D[A.length-1]; HD = H[0] + D[A.length-1];
for (i = 0, m = A.length-1; i < m; i++) {HD += Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])} for (i = 0, m = A.length-1; i < m; i++) {HD += Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])}
// //
// Determine frame and line sizes // Determine frame and line sizes
@ -245,13 +264,13 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
for (i = 0, m = A.length; i < m; i++) { for (i = 0, m = A.length; i < m; i++) {
if (A[i][j]) { if (A[i][j]) {
s = (this.data[i].type === "mlabeledtr" ? LABEL : 0); s = (this.data[i].type === "mlabeledtr" ? LABEL : 0);
var cell = this.data[i].data[j-s]; cell = this.data[i].data[j-s];
if (cell.HTMLcanStretch("Horizontal")) { if (cell.HTMLcanStretch("Horizontal")) {
A[i][j].bbox = cell.HTMLstretchH(C[j],W[j]).bbox A[i][j].bbox = cell.HTMLstretchH(C[j],W[j]).bbox;
} else if (cell.HTMLcanStretch("Vertical")) { } else if (cell.HTMLcanStretch("Vertical")) {
var mo = cell.CoreMO(); mo = cell.CoreMO();
var symmetric = mo.symmetric; mo.symmetric = false; var symmetric = mo.symmetric; mo.symmetric = false;
A[i][j].bbox = cell.HTMLstretchV(C[j],H[i],D[i]).bbox; A[i][j].bbox = cell.HTMLstretchV(C[j],H[i],D[i]).bbox; A[i][j].HH = null;
mo.symmetric = symmetric; mo.symmetric = symmetric;
} }
align = cell.rowalign||this.data[i].rowalign||RALIGN[i]; align = cell.rowalign||this.data[i].rowalign||RALIGN[i];
@ -259,7 +278,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
bottom: A[i][j].bbox.d - D[i], bottom: A[i][j].bbox.d - D[i],
center: ((H[i]-D[i]) - (A[i][j].bbox.h-A[i][j].bbox.d))/2, center: ((H[i]-D[i]) - (A[i][j].bbox.h-A[i][j].bbox.d))/2,
baseline: 0, axis: 0})[align]; // FIXME: handle axis better? baseline: 0, axis: 0})[align]; // FIXME: handle axis better?
align = (cell.columnalign||RCALIGN[i][j]||CALIGN[j]) align = (cell.columnalign||RCALIGN[i][j]||CALIGN[j]);
HTMLCSS.alignBox(A[i][j],align,y+dy); HTMLCSS.alignBox(A[i][j],align,y+dy);
} }
if (i < A.length-1) {y -= Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])} if (i < A.length-1) {y -= Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])}
@ -431,7 +450,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
}, },
HTMLhandleSpace: function (span) { HTMLhandleSpace: function (span) {
span.bbox.keepPadding = true; span.bbox.exact = true; span.bbox.keepPadding = true; span.bbox.exact = true;
if (!this.hasFrame) {span.style.paddingLeft = span.style.paddingRight = ".1667em"} if (!this.hasFrame) {span.style.paddingLeft = span.style.paddingRight = HTMLCSS.Em(1/6)}
this.SUPER(arguments).HTMLhandleSpace.call(this,span); this.SUPER(arguments).HTMLhandleSpace.call(this,span);
} }
}); });

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
var VERSION = "2.0.1"; var VERSION = "2.0.3";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
HTMLCSS = MathJax.OutputJax["HTML-CSS"]; HTMLCSS = MathJax.OutputJax["HTML-CSS"];
@ -146,10 +146,9 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
// Get the current breakpoint position and other data // Get the current breakpoint position and other data
// //
var index = info.index.slice(0), i = info.index.shift(), var index = info.index.slice(0), i = info.index.shift(),
m = this.data.length, W, scanW = info.W, m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
broken = (info.index.length > 0), better = false; if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w; info.w = 0}
if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w}; scanW = info.scanW = info.W; info.nest++;
info.w = 0; info.nest++; info.scanW = scanW;
// //
// Look through the line for breakpoints, // Look through the line for breakpoints,
// (as long as we are not too far past the breaking width) // (as long as we are not too far past the breaking width)
@ -157,23 +156,25 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
while (i < m && info.scanW < 1.33*HTMLCSS.linebreakWidth) { while (i < m && info.scanW < 1.33*HTMLCSS.linebreakWidth) {
if (this.data[i]) { if (this.data[i]) {
if (this.data[i].HTMLbetterBreak(info,state)) { if (this.data[i].HTMLbetterBreak(info,state)) {
better = true; index = [i].concat(info.index); W = info.W; better = true; index = [i].concat(info.index); W = info.W; w = info.w;
if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true}
} }
if (!broken) { if (!broken) {scanW = this.HTMLaddWidth(i,info,scanW)}
var span = this.data[i].HTMLspanElement();
scanW += span.bbox.w;
if (span.style.paddingLeft) {scanW += parseFloat(span.style.paddingLeft)}
if (span.style.paddingRight) {scanW += parseFloat(span.style.paddingRight)}
info.W = info.scanW = scanW;
}
} }
info.index = []; i++; broken = false; info.index = []; i++; broken = false;
} }
info.nest--; info.index = index; info.nest--; info.index = index;
if (better) {info.W = W} if (better) {info.W = W; info.w = w}
return better; return better;
}, },
HTMLaddWidth: function (i,info,scanW) {
var span = this.data[i].HTMLspanElement();
scanW += span.bbox.w;
if (span.style.paddingLeft) {scanW += HTMLCSS.unEm(span.style.paddingLeft)}
if (span.style.paddingRight) {scanW += HTMLCSS.unEm(span.style.paddingRight)}
info.W = info.scanW = scanW; info.w = 0;
return scanW;
},
/****************************************************************/ /****************************************************************/
// //
@ -262,7 +263,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} else { } else {
// //
// Otherwise, move the remainder of the initial item // Otherwise, move the remainder of the initial item
// and any others up tp the last one // and any others up to the last one
// //
var last = state.last; state.last = false; var last = state.last; state.last = false;
while (i < j) { while (i < j) {
@ -366,7 +367,88 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
} else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst} } else if (state.first) {state.nextIsFirst = true} else {delete state.nextIsFirst}
} }
}); });
/**************************************************************************/
MML.mfenced.Augment({
HTMLbetterBreak: function (info,state) {
//
// Get the current breakpoint position and other data
//
var index = info.index.slice(0), i = info.index.shift(),
m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w; info.w = 0}
scanW = info.scanW = info.W; info.nest++;
//
// Create indices that include the delimiters and separators
//
if (!this.dataI) {
this.dataI = [];
if (this.data.open) {this.dataI.push("open")}
if (m) {this.dataI.push(0)}
for (var j = 1; j < m; j++) {
if (this.data["sep"+j]) {this.dataI.push("sep"+j)}
this.dataI.push(j);
}
if (this.data.close) {this.dataI.push("close")}
}
m = this.dataI.length;
//
// Look through the line for breakpoints, including the open, close, and separators
// (as long as we are not too far past the breaking width)
//
while (i < m && info.scanW < 1.33*HTMLCSS.linebreakWidth) {
var k = this.dataI[i];
if (this.data[k]) {
if (this.data[k].HTMLbetterBreak(info,state)) {
better = true; index = [i].concat(info.index); W = info.W; w = info.w;
if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true}
}
if (!broken) {scanW = this.HTMLaddWidth(k,info,scanW)}
}
info.index = []; i++; broken = false;
}
info.nest--; info.index = index;
if (better) {info.W = W; info.w = w}
return better;
},
HTMLmoveLine: function (start,end,span,state,values) {
var i = start[0], j = end[0];
if (i == null) {i = -1}; if (j == null) {j = this.dataI.length-1}
if (i === j && start.length > 1) {
//
// If starting and ending in the same element move the subpiece to the new line
// Add the closing fence, if present
//
this.data[this.dataI[i]].HTMLmoveSlice(start.slice(1),end.slice(1),span,state,values,"paddingLeft");
} else {
//
// Otherwise, move the remainder of the initial item
// and any others (including open and separators) up to the last one
//
var last = state.last; state.last = false; var k = this.dataI[i];
while (i < j) {
if (this.data[k]) {
if (start.length <= 1) {this.data[k].HTMLmoveSpan(span,state,values)}
else {this.data[k].HTMLmoveSlice(start.slice(1),[],span,state,values,"paddingLeft")}
}
i++; k = this.dataI[i]; state.first = false; start = [];
}
//
// If the last item is complete, move it and the closing fence,
// otherwise move the first part of it up to the split
//
state.last = last;
if (this.data[k]) {
if (end.length <= 1) {this.data[k].HTMLmoveSpan(span,state,values)}
else {this.data[k].HTMLmoveSlice([],end.slice(1),span,state,values,"paddingRight")}
}
}
}
});
/**************************************************************************/ /**************************************************************************/
MML.mo.Augment({ MML.mo.Augment({
@ -394,7 +476,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
// //
var W = info.scanW, mo = (info.embellished||this); delete info.embellished; var W = info.scanW, mo = (info.embellished||this); delete info.embellished;
var span = mo.HTMLspanElement(), w = span.bbox.w; var span = mo.HTMLspanElement(), w = span.bbox.w;
if (span.style.paddingLeft) {w += parseFloat(span.style.paddingLeft)} if (span.style.paddingLeft) {w += HTMLCSS.unEm(span.style.paddingLeft)}
if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0} if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?) if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?)
var offset = HTMLCSS.linebreakWidth - W; var offset = HTMLCSS.linebreakWidth - W;
@ -445,8 +527,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
// Get the default penalty for this location // Get the default penalty for this location
// //
var W = info.scanW, span = this.HTMLspanElement(), w = span.bbox.w; var W = info.scanW, span = this.HTMLspanElement(), w = span.bbox.w;
if (span.style.paddingLeft) {w += parseFloat(span.style.paddingLeft)} if (span.style.paddingLeft) {w += HTMLCSS.unEm(span.style.paddingLeft)}
if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?) if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?)
var offset = HTMLCSS.linebreakWidth - W; var offset = HTMLCSS.linebreakWidth - W;
// //

View File

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

View File

@ -22,8 +22,8 @@
* limitations under the License. * limitations under the License.
*/ */
(function (HTMLCSS,HTML) { (function (HTMLCSS,MML,HTML) {
var VERSION = "2.0"; var VERSION = "2.0.1";
HTMLCSS.allowWebFonts = false; HTMLCSS.allowWebFonts = false;
@ -31,6 +31,7 @@
BOLD = "STIXGeneral-bold", BOLD = "STIXGeneral-bold",
ITALIC = "STIXGeneral-italic", ITALIC = "STIXGeneral-italic",
NONUNI = "STIXNonUnicode", NONUNI = "STIXNonUnicode",
NONUNII = "STIXNonUnicode-italic",
SIZE1 = "STIXSizeOneSym", SIZE1 = "STIXSizeOneSym",
SIZE2 = "STIXSizeTwoSym", SIZE2 = "STIXSizeTwoSym",
SIZE3 = "STIXSizeThreeSym", SIZE3 = "STIXSizeThreeSym",
@ -66,15 +67,16 @@
}, },
VARIANT: { VARIANT: {
"normal": {fonts: [GENERAL,NONUNI,SIZE1]}, "normal": {fonts: [GENERAL,NONUNI,SIZE1],
remap: {0x2205: [0x2205,"-STIX-variant"]}}, // \emptyset
"bold": {fonts: [BOLD,"STIXNonUnicode-bold","STIXSizeOneSym-bold"], bold:true}, "bold": {fonts: [BOLD,"STIXNonUnicode-bold","STIXSizeOneSym-bold"], bold:true},
"italic": {fonts: [ITALIC,"STIXNonUnicode-italic",GENERAL,NONUNI,SIZE1], italic:true}, "italic": {fonts: [ITALIC,NONUNII,GENERAL,NONUNI,SIZE1], italic:true},
"bold-italic": {fonts: ["STIXGeneral-bold-italic","STIXNonUnicode-bold-italic"], bold:true, italic:true}, "bold-italic": {fonts: ["STIXGeneral-bold-italic","STIXNonUnicode-bold-italic"], bold:true, italic:true},
"double-struck": {offsetA: 0x1D538, offsetN: 0x1D7D8, "double-struck": {offsetA: 0x1D538, offsetN: 0x1D7D8,
remap: {0x1D53A: 0x2102, 0x1D53F: 0x210D, 0x1D545: 0x2115, 0x1D547: 0x2119, remap: {0x1D53A: 0x2102, 0x1D53F: 0x210D, 0x1D545: 0x2115, 0x1D547: 0x2119,
0x1D548: 0x211A, 0x1D549: 0x211D, 0x1D551: 0x2124}}, 0x1D548: 0x211A, 0x1D549: 0x211D, 0x1D551: 0x2124}},
"fraktur": {offsetA: 0x1D504, "fraktur": {offsetA: 0x1D504,
remap: {0x1D506: 0x212D, 0x1D50B: 0x210C, 0x1D50C: 0x2111, 0x1D515: 0x211C, 0x1D51D: 0x2128}}, remap: {0x1D506: 0x212D, 0x1D50B: 0x210C, 0x1D50C: 0x2111, 0x1D515: 0x211C, 0x1D51D: 0x2128}},
"bold-fraktur": {fonts: [BOLD], offsetA: 0x1D56C, bold:true}, "bold-fraktur": {fonts: [BOLD], offsetA: 0x1D56C, bold:true},
"script": {fonts: [ITALIC], offsetA: 0x1D49C, "script": {fonts: [ITALIC], offsetA: 0x1D49C,
remap: {0x1D49D: 0x212C, 0x1D4A0: 0x2130, 0x1D4A1: 0x2131, 0x1D4A3: 0x210B, remap: {0x1D49D: 0x212C, 0x1D4A0: 0x2130, 0x1D4A1: 0x2131, 0x1D4A3: 0x210B,
@ -83,16 +85,20 @@
"bold-script": {fonts: [ITALIC], offsetA: 0x1D4D0, bold:true}, "bold-script": {fonts: [ITALIC], offsetA: 0x1D4D0, bold:true},
"sans-serif": {offsetA: 0x1D5A0, offsetN: 0x1D7E2, offsetG: 0xE17D}, "sans-serif": {offsetA: 0x1D5A0, offsetN: 0x1D7E2, offsetG: 0xE17D},
"bold-sans-serif": {offsetA: 0x1D5D4, offsetG: 0x1D756, offsetN: 0x1D7EC, bold:true}, "bold-sans-serif": {offsetA: 0x1D5D4, offsetG: 0x1D756, offsetN: 0x1D7EC, bold:true},
"sans-serif-italic": {fonts: [ITALIC], offsetA: 0x1D608, offsetN: 0xE1B4, offsetG: 0xE1BF, italic:true}, "sans-serif-italic": {fonts: [ITALIC,NONUNII], offsetA: 0x1D608, offsetN: 0xE1B4, offsetG: 0xE1BF, italic:true},
"sans-serif-bold-italic": {fonts: ["STIXGeneral-bold-italic"], offsetA: 0x1D63C, offsetN: 0xE1F6, offsetG: 0x1D790, bold:true, italic:true}, "sans-serif-bold-italic": {fonts: ["STIXGeneral-bold-italic","STIXNonUnicode-bold-italic"], offsetA: 0x1D63C, offsetN: 0xE1F6, offsetG: 0x1D790, bold:true, italic:true},
"monospace": {offsetA: 0x1D670, offsetN: 0x1D7F6}, "monospace": {offsetA: 0x1D670, offsetN: 0x1D7F6},
"-STIX-variant": {fonts:["STIXVariants",NONUNI,GENERAL]}, "-STIX-variant": {fonts:["STIXVariants",NONUNI,GENERAL],
"-tex-caligraphic": {fonts: [ITALIC,"STIXNonUnicode-italic",NONUNI,SIZE1], offsetA: 0xE22D, noLowerCase: 1}, remap: {0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2270: 0xE011, 0x2271: 0xE00E,
0x22E0: 0xE04B, 0x22E1: 0xE04F, 0x2288: 0xE016, 0x2289: 0xE018,
0x25B3: 0x25B5, 0x25BD: 0x25BF,
0x2205: [0x2205,MML.VARIANT.NORMAL]}}, // \varnothing
"-tex-caligraphic": {fonts: [ITALIC,NONUNII,NONUNI,SIZE1], offsetA: 0xE22D, noLowerCase: 1},
"-tex-oldstyle": {offsetN: 0xE261, "-tex-oldstyle": {offsetN: 0xE261,
remap: {0xE262: 0xE265, 0xE263: 0xE269, 0xE264: 0xE26D, 0xE265: 0xE271, remap: {0xE262: 0xE265, 0xE263: 0xE269, 0xE264: 0xE26D, 0xE265: 0xE271,
0xE266: 0xE275, 0xE267: 0xE279, 0xE268: 0xE27D, 0xE269: 0xE281, 0xE266: 0xE275, 0xE267: 0xE279, 0xE268: 0xE27D, 0xE269: 0xE281,
0xE26A: 0xE285}}, 0xE26A: 0xE285}},
"-tex-mathit": {fonts: [ITALIC,"STIXNonUnicode-italic",GENERAL,NONUNI,SIZE1], italic:true, noIC:true}, "-tex-mathit": {fonts: [ITALIC,NONUNII,GENERAL,NONUNI,SIZE1], italic:true, noIC:true},
"-largeOp": {fonts:[SIZE1,"STIXIntegralsD",NONUNI,GENERAL]}, "-largeOp": {fonts:[SIZE1,"STIXIntegralsD",NONUNI,GENERAL]},
"-smallOp": {} "-smallOp": {}
}, },
@ -101,7 +107,7 @@
{name: "alpha", low: 0x61, high: 0x7A, offset: "A", add: 26}, {name: "alpha", low: 0x61, high: 0x7A, offset: "A", add: 26},
{name: "Alpha", low: 0x41, high: 0x5A, offset: "A"}, {name: "Alpha", low: 0x41, high: 0x5A, offset: "A"},
{name: "number", low: 0x30, high: 0x39, offset: "N"}, {name: "number", low: 0x30, high: 0x39, offset: "N"},
{name: "greek", low: 0x03B1, high: 0x03C9, offset: "G", add: 25}, {name: "greek", low: 0x03B1, high: 0x03C9, offset: "G", add: 26},
{name: "Greek", low: 0x0391, high: 0x03F6, offset: "G", {name: "Greek", low: 0x0391, high: 0x03F6, offset: "G",
remap: {0x03F5: 53, 0x03D1: 54, 0x03F0: 55, 0x03D5: 56, 0x03F1: 57, 0x03D6: 58, 0x03F4: 17}} remap: {0x03F5: 53, 0x03D1: 54, 0x03F0: 55, 0x03D5: 56, 0x03F1: 57, 0x03D6: 58, 0x03F4: 17}}
], ],
@ -336,7 +342,7 @@
stretch: {top:[0x23AB,SIZE1], ext:[0x23AA,SIZE1], bot:[0x23AD,SIZE1]} stretch: {top:[0x23AB,SIZE1], ext:[0x23AA,SIZE1], bot:[0x23AD,SIZE1]}
}, },
0x002D: {alias: 0x23AF, dir:H}, // minus 0x002D: {alias: 0x23AF, dir:H}, // minus
0x005E: {alias: 0x02D6, dir:H}, // wide hat 0x005E: {alias: 0x02C6, dir:H}, // wide hat
0x005F: {alias: 0x23AF, dir:H}, // low line 0x005F: {alias: 0x23AF, dir:H}, // low line
0x007E: {alias: 0x02DC, dir:H}, // wide tilde 0x007E: {alias: 0x02DC, dir:H}, // wide tilde
0x00AF: {alias: 0x23AF, dir:H}, // macron 0x00AF: {alias: 0x23AF, dir:H}, // macron
@ -454,18 +460,6 @@
} }
}); });
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
var TEX = MathJax.InputJax.TeX;
TEX.isSTIX = true;
TEX.Definitions.mathchar0mi.hbar = ['210F',{variantForm: true}];
TEX.Definitions.mathchar0mi.emptyset[1].variantForm = true;
TEX.Definitions.mathchar0mi.backslash[1].variantForm = true;
TEX.Definitions.mathchar0mi.triangle[1].mathsize = "71%";
TEX.Definitions.mathchar0mo.setminus = ['2216',{variantForm: true}];
});
HTMLCSS.FONTDATA.FONTS['STIXGeneral'] = { HTMLCSS.FONTDATA.FONTS['STIXGeneral'] = {
directory: 'General/Regular', directory: 'General/Regular',
family: 'STIXGeneral', family: 'STIXGeneral',
@ -1567,5 +1561,5 @@
QUEUE.push(["loadComplete",MathJax.Ajax,HTMLCSS.fontDir + "/fontdata.js"]); QUEUE.push(["loadComplete",MathJax.Ajax,HTMLCSS.fontDir + "/fontdata.js"]);
MathJax.Callback.Queue.apply(MathJax.Callback,QUEUE); MathJax.Callback.Queue.apply(MathJax.Callback,QUEUE);
})(MathJax.OutputJax["HTML-CSS"],MathJax.HTML); })(MathJax.OutputJax["HTML-CSS"],MathJax.ElementJax.mml,MathJax.HTML);

View File

@ -22,6 +22,7 @@
*/ */
(function (HTMLCSS) { (function (HTMLCSS) {
var VERSION = "2.0.1";
var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS; var DELIMITERS = HTMLCSS.FONTDATA.DELIMITERS;
@ -48,12 +49,12 @@
0x21A4: // left arrow from bar 0x21A4: // left arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x21A5: // up arrow from bar 0x21A5: // up arrow from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]} stretch: {min:.6, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]}
}, },
0x21A6: // right arrow from bar 0x21A6: // right arrow from bar
{ {
@ -63,7 +64,7 @@
0x21A7: // down arrow from bar 0x21A7: // down arrow from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]} stretch: {min:.6, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
}, },
0x21B0: // up arrow with top leftwards 0x21B0: // up arrow with top leftwards
{ {
@ -128,12 +129,12 @@
0x23B4: // top square bracket 0x23B4: // top square bracket
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.35], right:[0x2510,AMS,0,-.1]} stretch: {min:.5, left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.35], right:[0x2510,AMS,0,-.1]}
}, },
0x23B5: // bottom square bracket 0x23B5: // bottom square bracket
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]} stretch: {min:.5, left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]}
}, },
0x23DC: // top paren 0x23DC: // top paren
{ {
@ -148,82 +149,82 @@
0x23E0: // top tortoise shell 0x23E0: // top tortoise shell
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true} stretch: {min:1.25, left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true}
}, },
0x23E1: // bottom tortoise shell 0x23E1: // bottom tortoise shell
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true} stretch: {min:1.5, left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true}
}, },
0x2906: // leftwards double arrow from bar 0x2906: // leftwards double arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]} stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]}
}, },
0x2907: // rightwards double arrow from bar 0x2907: // rightwards double arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]} stretch: {min:.7, left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]}
}, },
0x294E: // left barb up right barb up harpoon 0x294E: // left barb up right barb up harpoon
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} stretch: {min:.5, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
}, },
0x294F: // up barb right down barb right harpoon 0x294F: // up barb right down barb right harpoon
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]} stretch: {min:.5, top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
}, },
0x2950: // left barb dow right barb down harpoon 0x2950: // left barb dow right barb down harpoon
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
}, },
0x2951: // up barb left down barb left harpoon 0x2951: // up barb left down barb left harpoon
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]} stretch: {min:.5, top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
}, },
0x295A: // leftwards harpoon with barb up from bar 0x295A: // leftwards harpoon with barb up from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x295B: // rightwards harpoon with barb up from bar 0x295B: // rightwards harpoon with barb up from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
}, },
0x295C: // up harpoon with barb right from bar 0x295C: // up harpoon with barb right from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]} stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]}
}, },
0x295D: // down harpoon with barb right from bar 0x295D: // down harpoon with barb right from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]} stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
}, },
0x295E: // leftwards harpoon with barb down from bar 0x295E: // leftwards harpoon with barb down from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x295F: // rightwards harpoon with barb down from bar 0x295F: // rightwards harpoon with barb down from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
}, },
0x2960: // up harpoon with barb left from bar 0x2960: // up harpoon with barb left from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]} stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]}
}, },
0x2961: // down harpoon with barb left from bar 0x2961: // down harpoon with barb left from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]} stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
} }
}; };

View File

@ -23,7 +23,7 @@
*/ */
(function (HTMLCSS,MML,AJAX) { (function (HTMLCSS,MML,AJAX) {
var VERSION = "2.0"; var VERSION = "2.0.4";
var MAIN = "MathJax_Main", var MAIN = "MathJax_Main",
BOLD = "MathJax_Main-bold", BOLD = "MathJax_Main-bold",
@ -71,12 +71,18 @@
offsetG: 0x03B1, variantG: "italic", offsetG: 0x03B1, variantG: "italic",
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"italic"]}}, 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58,
0x2216:[0x2216,"-TeX-variant"], // \smallsetminus
0x210F:[0x210F,"-TeX-variant"], // \hbar
0x2032:[0x27,"sans-serif-italic"], // HACK: a smaller prime
0x29F8:[0x002F,MML.VARIANT.ITALIC]}},
"bold": {fonts:[BOLD,SIZE1,AMS], bold:true, "bold": {fonts:[BOLD,SIZE1,AMS], bold:true,
offsetG: 0x03B1, variantG: "bold-italic", offsetG: 0x03B1, variantG: "bold-italic",
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"bold-italic"], 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"bold-italic"],
0x219A:"\u2190\u0338", 0x219B:"\u2192\u0338", 0x21AE:"\u2194\u0338",
0x21CD:"\u21D0\u0338", 0x21CE:"\u21D4\u0338", 0x21CF:"\u21D2\u0338",
0x2204:"\u2203\u0338", 0x2224:"\u2223\u0338", 0x2226:"\u2225\u0338", 0x2204:"\u2203\u0338", 0x2224:"\u2223\u0338", 0x2226:"\u2225\u0338",
0x2241:"\u223C\u0338", 0x2247:"\u2245\u0338", 0x2241:"\u223C\u0338", 0x2247:"\u2245\u0338",
0x226E:"<\u0338", 0x226F:">\u0338", 0x226E:"<\u0338", 0x226F:">\u0338",
@ -113,6 +119,15 @@
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}}, 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}},
"-TeX-variant": {fonts:[AMS,MAIN,SIZE1], // HACK: to get larger prime for \prime
remap: {
0x2268: 0xE00C, 0x2269: 0xE00D, 0x2270: 0xE011, 0x2271: 0xE00E,
0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2224: 0xE006, 0x2226: 0xE007,
0x2288: 0xE016, 0x2289: 0xE018, 0x228A: 0xE01A, 0x228B: 0xE01B,
0x2ACB: 0xE017, 0x2ACC: 0xE019, 0x03DC: 0xE008, 0x03F0: 0xE009,
0x2216:[0x2216,MML.VARIANT.NORMAL], // \setminus
0x210F:[0x210F,MML.VARIANT.NORMAL] // \hslash
}},
"-largeOp": {fonts:[SIZE2,SIZE1,MAIN]}, "-largeOp": {fonts:[SIZE2,SIZE1,MAIN]},
"-smallOp": {fonts:[SIZE1,MAIN]} "-smallOp": {fonts:[SIZE1,MAIN]}
}, },
@ -141,13 +156,16 @@
0x2022: 0x2219, 0x2044: 0x2F, // bullet, fraction slash 0x2022: 0x2219, 0x2044: 0x2F, // bullet, fraction slash
0x2305: 0x22BC, 0x2306: 0x2A5E, // barwedge, doublebarwedge 0x2305: 0x22BC, 0x2306: 0x2A5E, // barwedge, doublebarwedge
0x25AA: 0x25A0, 0x25B4: 0x25B2, // blacksquare, blacktriangle 0x25AA: 0x25A0, 0x25B4: 0x25B2, // blacksquare, blacktriangle
0x25B5: 0x25B3, 0x25BE: 0x25BC, // triangle, blacktriangledown 0x25B5: 0x25B3, 0x25B8: 0x25B6, // triangle, blacktriangleright
0x25BF: 0x25BD, 0x25C2: 0x25C0, // triangledown, blacktriangleleft 0x25BE: 0x25BC, 0x25BF: 0x25BD, // blacktriangledown, triangledown
0x25C2: 0x25C0, // blacktriangleleft
0x2329: 0x27E8, 0x232A: 0x27E9, // langle, rangle 0x2329: 0x27E8, 0x232A: 0x27E9, // langle, rangle
0x3008: 0x27E8, 0x3009: 0x27E9, // langle, rangle 0x3008: 0x27E8, 0x3009: 0x27E9, // langle, rangle
0x2758: 0x2223, // VerticalSeparator 0x2758: 0x2223, // VerticalSeparator
0x2A2F: 0xD7, // cross product 0x2A2F: 0xD7, // cross product
0x25FB: 0x25A1, 0x25FC: 0x25A0, // square, blacksquare
// //
// Letter-like symbols (that appear elsewhere) // Letter-like symbols (that appear elsewhere)
// //
@ -186,9 +204,10 @@
// //
0x2204: "\u2203\u0338", // \not\exists 0x2204: "\u2203\u0338", // \not\exists
0x220C: "\u220B\u0338", // \not\ni 0x220C: "\u220B\u0338", // \not\ni
0x2244: "\u2243\u0338", // \not\cong 0x2244: "\u2243\u0338", // \not\simeq
0x2249: "\u2248\u0338", // \not\approx 0x2249: "\u2248\u0338", // \not\approx
0x2262: "\u2261\u0338", // \not\equiv 0x2262: "\u2261\u0338", // \not\equiv
0x226D: "\u224D\u0338", // \not\asymp
0x2274: "\u2272\u0338", // \not\lesssim 0x2274: "\u2272\u0338", // \not\lesssim
0x2275: "\u2273\u0338", // \not\gtrsim 0x2275: "\u2273\u0338", // \not\gtrsim
0x2278: "\u2276\u0338", // \not\lessgtr 0x2278: "\u2276\u0338", // \not\lessgtr
@ -198,15 +217,21 @@
0x22E2: "\u2291\u0338", // \not\sqsubseteq 0x22E2: "\u2291\u0338", // \not\sqsubseteq
0x22E3: "\u2292\u0338", // \not\sqsupseteq 0x22E3: "\u2292\u0338", // \not\sqsupseteq
0x2A0C: "\u222C\u222C", // quadruple integral
0x2033: "\u2032\u2032", // double prime 0x2033: "\u2032\u2032", // double prime
0x2034: "\u2032\u2032\u2032", // triple prime 0x2034: "\u2032\u2032\u2032", // triple prime
0x2036: "\u2035\u2035", // double back prime 0x2036: "\u2035\u2035", // double back prime
0x2037: "\u2035\u2035\u2035", // trile back prime 0x2037: "\u2035\u2035\u2035", // trile back prime
0x2057: "\u2032\u2032\u2032\u2032" // quadruple prime 0x2057: "\u2032\u2032\u2032\u2032", // quadruple prime
0x20DB: "...", // combining three dots above (only works with mover/under)
0x20DC: "...." // combining four dots above (only works with mover/under)
}, },
REMAPACCENT: { REMAPACCENT: {
"\u2192":"\u20D7" "\u2192":"\u20D7",
"\u2032":"'",
"\u2035":"`"
}, },
REMAPACCENTUNDER: { REMAPACCENTUNDER: {
}, },
@ -449,12 +474,12 @@
0x23DE: // horizontal brace down 0x23DE: // horizontal brace down
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0xE150,SIZE4], mid:[[0xE153,0xE152],SIZE4], right:[0xE151,SIZE4], rep:[0xE154,SIZE4]} stretch: {min:.9, left:[0xE150,SIZE4], mid:[[0xE153,0xE152],SIZE4], right:[0xE151,SIZE4], rep:[0xE154,SIZE4]}
}, },
0x23DF: // horizontal brace up 0x23DF: // horizontal brace up
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0xE152,SIZE4], mid:[[0xE151,0xE150],SIZE4], right:[0xE153,SIZE4], rep:[0xE154,SIZE4]} stretch: {min:.9, left:[0xE152,SIZE4], mid:[[0xE151,0xE150],SIZE4], right:[0xE153,SIZE4], rep:[0xE154,SIZE4]}
}, },
0x27E8: // \langle 0x27E8: // \langle
{ {
@ -564,13 +589,6 @@
} }
}; };
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
var TEX = MathJax.InputJax.TeX;
TEX.Definitions.mathchar0mi.ell = ['2113',{mathvariant: MML.VARIANT.NORMAL}];
TEX.Definitions.mathchar0mi.hbar = ['210F',{mathvariant: MML.VARIANT.NORMAL}];
TEX.Definitions.mathchar0mi.S = ['00A7',{mathvariant: MML.VARIANT.SCRIPT}];
});
HTMLCSS.FONTDATA.FONTS['MathJax_Caligraphic'] = { HTMLCSS.FONTDATA.FONTS['MathJax_Caligraphic'] = {
directory: 'Caligraphic/Regular', directory: 'Caligraphic/Regular',
family: 'MathJax_Caligraphic', family: 'MathJax_Caligraphic',
@ -1790,6 +1808,11 @@
"bold": VARBOLD, "bold": VARBOLD,
"italic": VARNORMAL, "italic": VARNORMAL,
"bold-italic": VARBOLD, "bold-italic": VARBOLD,
"-TeX-variant": {remap:{
0x2190:[0xE2C1,"-WinIE6"], 0x2192:[0xE2C0,"-WinIE6"],
0x2223:[0xE2C2,"-WinIE6"], 0x2225:[0xE2C3,"-WinIE6"],
0x223C:[0xE2C4,"-WinIE6"], 0x25B3:[0xE2D3,"-WinIE6"]
}},
"-largeOp": {fonts:[WinIE6,SIZE2,SIZE1,MAIN], "-largeOp": {fonts:[WinIE6,SIZE2,SIZE1,MAIN],
remap: {0x220F:0xE290, 0x2211:0xE291, 0x222B:0xE295, 0x222E:0xE296}}, remap: {0x220F:0xE290, 0x2211:0xE291, 0x222B:0xE295, 0x222E:0xE296}},
"-smallOp": {fonts:[WinIE6,SIZE1,MAIN], "-smallOp": {fonts:[WinIE6,SIZE1,MAIN],

View File

@ -449,13 +449,13 @@
// Remove any existing output // Remove any existing output
// //
prev = script.previousSibling; prev = script.previousSibling;
if (prev && String(prev.className).match(/^MathJax(_Display)?$/)) if (prev && String(prev.className).match(/^MathJax(_Display)?( MathJax_Processing)?$/))
{prev.parentNode.removeChild(prev)} {prev.parentNode.removeChild(prev)}
// //
// Add the span, and a div if in display mode, // Add the span, and a div if in display mode,
// then set the role and mark it as being processed // then set the role and mark it as being processed
// //
jax = script.MathJax.elementJax; jax = script.MathJax.elementJax; if (!jax) continue;
jax.HTMLCSS = {display: (jax.root.Get("display") === "block")} jax.HTMLCSS = {display: (jax.root.Get("display") === "block")}
span = div = this.Element("span",{ span = div = this.Element("span",{
className:"MathJax", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id, className:"MathJax", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
@ -491,7 +491,7 @@
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode) continue;
test = script.previousSibling; div = test.previousSibling; test = script.previousSibling; div = test.previousSibling;
jax = script.MathJax.elementJax; jax = script.MathJax.elementJax; if (!jax) continue;
ex = test.firstChild.offsetHeight/60; ex = test.firstChild.offsetHeight/60;
em = test.lastChild.firstChild.offsetHeight/60; em = test.lastChild.firstChild.offsetHeight/60;
if (relwidth) {maxwidth = div.previousSibling.firstChild.offsetWidth} if (relwidth) {maxwidth = div.previousSibling.firstChild.offsetWidth}
@ -513,7 +513,8 @@
// //
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode) continue;
test = scripts[i].previousSibling; jax = scripts[i].MathJax.elementJax; test = scripts[i].previousSibling;
jax = scripts[i].MathJax.elementJax; if (!jax) continue;
if (relwidth) { if (relwidth) {
span = test.previousSibling; span = test.previousSibling;
if (!jax.HTMLCSS.isHidden) {span = span.previousSibling} if (!jax.HTMLCSS.isHidden) {span = span.previousSibling}
@ -524,7 +525,7 @@
// //
// Set state variables used for displaying equations in chunks // Set state variables used for displaying equations in chunks
// //
state.HTMLCSSeqn = state.HTMLCSSlast = 0; state.HTMLCSSeqn = state.HTMLCSSlast = 0; state.HTMLCSSi = -1;
state.HTMLCSSchunk = this.config.EqnChunk; state.HTMLCSSchunk = this.config.EqnChunk;
state.HTMLCSSdelay = false; state.HTMLCSSdelay = false;
}, },
@ -583,7 +584,7 @@
// //
// Check if we should show this chunk of equations // Check if we should show this chunk of equations
// //
state.HTMLCSSeqn++; state.HTMLCSSeqn += (state.i - state.HTMLCSSi); state.HTMLCSSi = state.i;
if (state.HTMLCSSeqn >= state.HTMLCSSlast + state.HTMLCSSchunk) { if (state.HTMLCSSeqn >= state.HTMLCSSlast + state.HTMLCSSchunk) {
this.postTranslate(state); this.postTranslate(state);
state.HTMLCSSchunk = Math.floor(state.HTMLCSSchunk*this.config.EqnChunkFactor); state.HTMLCSSchunk = Math.floor(state.HTMLCSSchunk*this.config.EqnChunkFactor);
@ -600,7 +601,7 @@
// //
for (var i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) { for (var i = state.HTMLCSSlast, m = state.HTMLCSSeqn; i < m; i++) {
var script = scripts[i]; var script = scripts[i];
if (script) { if (script && script.MathJax.elementJax) {
// //
// Remove the processed marker // Remove the processed marker
// //
@ -806,6 +807,16 @@
if (Math.abs(m) < .0006) {return "0em"} if (Math.abs(m) < .0006) {return "0em"}
return m.toFixed(3).replace(/\.?0+$/,"") + "em"; return m.toFixed(3).replace(/\.?0+$/,"") + "em";
}, },
unEm: function (m) {
return parseFloat(m);
},
Px: function (m) {
m *= this.em; var s = (m < 0? "-" : "");
return s+Math.abs(m).toFixed(1).replace(/\.?0+$/,"") + "px";
},
unPx: function (m) {
return parseFloat(m)/this.em;
},
Percent: function (m) { Percent: function (m) {
return (100*m).toFixed(1).replace(/\.?0+$/,"") + "%"; return (100*m).toFixed(1).replace(/\.?0+$/,"") + "%";
}, },
@ -893,17 +904,13 @@
if (before) {span.insertBefore(space,span.firstChild)} else {span.appendChild(space)} if (before) {span.insertBefore(space,span.firstChild)} else {span.appendChild(space)}
return space; return space;
}, },
createSpace: function (span,h,d,w,color) { createSpace: function (span,h,d,w,color,isSpace) {
if (h < -d) {d = -h} // make sure h is above d if (h < -d) {d = -h} // make sure h is above d
var H = this.Em(h+d), D = this.Em(-d); var H = this.Em(h+d), D = this.Em(-d);
if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)} if (this.msieInlineBlockAlignBug) {D = this.Em(HTMLCSS.getHD(span.parentNode).d-d)}
if (span.isBox || span.className == "mspace") { if (span.isBox || isSpace) {
var scale = (span.scale == null ? 1 : span.scale); var scale = (span.scale == null ? 1 : span.scale);
span.bbox = { span.bbox = {exactW: true, h: h*scale, d: d*scale, w: w*scale, rw: w*scale, lw: 0};
exactW: true,
h: h*scale, d: d*scale,
w: w*scale, rw: w*scale, lw: 0
};
span.style.height = H; span.style.verticalAlign = D; span.style.height = H; span.style.verticalAlign = D;
span.HH = (h+d)*scale; span.HH = (h+d)*scale;
} else { } else {
@ -981,7 +988,7 @@
return box; return box;
}, },
addBox: function (span,box) { addBox: function (span,box) {
box.style.position = "absolute"; box.isBox = true; box.style.position = "absolute"; box.isBox = box.isMathJax = true;
return span.appendChild(box); return span.appendChild(box);
}, },
placeBox: function (span,x,y,noclip) { placeBox: function (span,x,y,noclip) {
@ -996,6 +1003,7 @@
else {HH = span.offsetHeight/this.em} else {HH = span.offsetHeight/this.em}
if (!span.noAdjust) { if (!span.noAdjust) {
HH += 1; HH += 1;
HH = Math.round(HH*this.em)/this.em; // make this an integer number of pixels (for Chrome)
if (this.msieInlineBlockAlignBug) { if (this.msieInlineBlockAlignBug) {
this.addElement(span,"img",{ this.addElement(span,"img",{
className:"MathJax_strut", border:0, src:"about:blank", isMathJax:true, className:"MathJax_strut", border:0, src:"about:blank", isMathJax:true,
@ -1005,6 +1013,8 @@
this.addElement(span,"span",{ this.addElement(span,"span",{
isMathJax: true, style:{display:"inline-block",width:0,height:this.Em(HH)} isMathJax: true, style:{display:"inline-block",width:0,height:this.Em(HH)}
}); });
if (HTMLCSS.chromeHeightBug)
{HH -= (span.lastChild.offsetHeight - Math.round(HH*this.em))/this.em}
} }
} }
// Clip so that bbox doesn't include extra height and depth // Clip so that bbox doesn't include extra height and depth
@ -1112,6 +1122,7 @@
mid = this.createBox(stack); this.createChar(mid,delim.mid,scale,font); mid = this.createBox(stack); this.createChar(mid,delim.mid,scale,font);
h += mid.bbox.h + mid.bbox.d; h += mid.bbox.h + mid.bbox.d;
} }
if (delim.min && H < h*delim.min) {H = h*delim.min}
if (H > h) { if (H > h) {
ext = this.Element("span"); this.createChar(ext,delim.ext,scale,font); ext = this.Element("span"); this.createChar(ext,delim.ext,scale,font);
var eH = ext.bbox.h + ext.bbox.d, eh = eH - .05, n, N, k = (delim.mid ? 2 : 1); var eH = ext.bbox.h + ext.bbox.d, eh = eH - .05, n, N, k = (delim.mid ? 2 : 1);
@ -1122,6 +1133,7 @@
while (n-- > 0) { while (n-- > 0) {
if (!this.msieCloneNodeBug) {EXT = ext.cloneNode(true)} if (!this.msieCloneNodeBug) {EXT = ext.cloneNode(true)}
else {EXT = this.Element("span"); this.createChar(EXT,delim.ext,scale,font)} else {EXT = this.Element("span"); this.createChar(EXT,delim.ext,scale,font)}
EXT.bbox = ext.bbox;
y -= eh; this.placeBox(this.addBox(stack,EXT),0,y,true); y -= eh; this.placeBox(this.addBox(stack,EXT),0,y,true);
} }
y += dy - ext.bbox.d; y += dy - ext.bbox.d;
@ -1161,6 +1173,7 @@
mid = this.createBox(stack); this.createChar(mid,delim.mid,scale,font); mid = this.createBox(stack); this.createChar(mid,delim.mid,scale,font);
w += mid.bbox.w; w += mid.bbox.w;
} }
if (delim.min && W < w*delim.min) {W = w*delim.min}
if (W > w) { if (W > w) {
var rW = rep.bbox.rw-rep.bbox.lw, rw = rW - .05, n, N, k = (delim.mid ? 2 : 1); var rW = rep.bbox.rw-rep.bbox.lw, rw = rW - .05, n, N, k = (delim.mid ? 2 : 1);
N = n = Math.ceil((W-w)/(k*rw)); N = n = Math.ceil((W-w)/(k*rw));
@ -1168,15 +1181,17 @@
dx = (n/(n+1))*(rW - rw); rw = rW - dx; x -= rep.bbox.lw + dx; dx = (n/(n+1))*(rW - rw); rw = rW - dx; x -= rep.bbox.lw + dx;
while (k-- > 0) { while (k-- > 0) {
while (n-- > 0) { while (n-- > 0) {
if (!this.msieCloneNodeBug) {REP = rep.cloneNode(true)} if (!this.cloneNodeBug) {REP = rep.cloneNode(true)}
else {REP = this.Element("span"); this.createChar(REP,delim.rep,scale,font)} else {REP = this.Element("span"); this.createChar(REP,delim.rep,scale,font)}
REP.bbox = rep.bbox;
this.placeBox(this.addBox(stack,REP),x,0,true); x += rw; this.placeBox(this.addBox(stack,REP),x,0,true); x += rw;
} }
if (delim.mid && k) {this.placeBox(mid,x,0,true); x += mid.bbox.w - dx; n = N} if (delim.mid && k) {this.placeBox(mid,x,0,true); x += mid.bbox.w - dx; n = N}
} }
} else { } else {
dx = Math.min(w - W,left.bbox.w/2); x -= (w - W)/2;
x -= dx/2; if (delim.mid) {this.placeBox(mid,x,0,true); x += mid.bbox.w}; x -= dx/2; if (delim.mid) {this.placeBox(mid,x,0,true); x += mid.bbox.w};
x -= (w - W)/2;
} }
this.placeBox(right,x,0,true); this.placeBox(right,x,0,true);
span.bbox = { span.bbox = {
@ -1219,7 +1234,7 @@
if (this.safariVerticalAlignBug || this.konquerorVerticalAlignBug || if (this.safariVerticalAlignBug || this.konquerorVerticalAlignBug ||
(this.operaVerticalAlignBug && span.isMultiChar)) { (this.operaVerticalAlignBug && span.isMultiChar)) {
if (span.firstChild.style.display === "" && span.style.top !== "") if (span.firstChild.style.display === "" && span.style.top !== "")
{span = span.firstChild; h -= parseFloat(span.style.top)} {span = span.firstChild; h -= HTMLCSS.unEm(span.style.top)}
span.style.position = "relative"; span.style.position = "relative";
span.style.top = this.Em(-h); span.style.top = this.Em(-h);
} else { } else {
@ -1335,6 +1350,10 @@
if (text.length) {this.addText(span,text)} if (text.length) {this.addText(span,text)}
var scale = span.scale; var scale = span.scale;
HTMLCSS.createDelimiter(span,n,0,1,font); HTMLCSS.createDelimiter(span,n,0,1,font);
if (this.FONTDATA.DELIMITERS[n].dir === "V") {
span.style.verticalAlign = this.Em(span.bbox.d);
span.bbox.h += span.bbox.d; span.bbox.d = 0;
}
span.scale = scale; span.scale = scale;
c[0] = span.bbox.h*1000; c[1] = span.bbox.d*1000; c[0] = span.bbox.h*1000; c[1] = span.bbox.d*1000;
c[2] = span.bbox.w*1000; c[3] = span.bbox.lw*1000; c[4] = span.bbox.rw*1000; c[2] = span.bbox.w*1000; c[3] = span.bbox.lw*1000; c[4] = span.bbox.rw*1000;
@ -1553,11 +1572,11 @@
if (bbox.h > BBOX.h) {BBOX.h = bbox.h} if (bbox.h > BBOX.h) {BBOX.h = bbox.h}
if (bbox.D != null && bbox.D > BBOX.D) {BBOX.D = bbox.D} if (bbox.D != null && bbox.D > BBOX.D) {BBOX.D = bbox.D}
if (bbox.H != null && bbox.H > BBOX.H) {BBOX.H = bbox.H} if (bbox.H != null && bbox.H > BBOX.H) {BBOX.H = bbox.H}
if (child.style.paddingLeft) {BBOX.w += parseFloat(child.style.paddingLeft)*(child.scale||1)} if (child.style.paddingLeft) {BBOX.w += HTMLCSS.unEm(child.style.paddingLeft)*(child.scale||1)}
if (BBOX.w + bbox.lw < BBOX.lw) {BBOX.lw = BBOX.w + bbox.lw} if (BBOX.w + bbox.lw < BBOX.lw) {BBOX.lw = BBOX.w + bbox.lw}
if (BBOX.w + bbox.rw > BBOX.rw) {BBOX.rw = BBOX.w + bbox.rw} if (BBOX.w + bbox.rw > BBOX.rw) {BBOX.rw = BBOX.w + bbox.rw}
BBOX.w += bbox.w; BBOX.w += bbox.w;
if (child.style.paddingRight) {BBOX.w += parseFloat(child.style.paddingRight)*(child.scale||1)} if (child.style.paddingRight) {BBOX.w += HTMLCSS.unEm(child.style.paddingRight)*(child.scale||1)}
if (bbox.width) {BBOX.width = bbox.width} if (bbox.width) {BBOX.width = bbox.width}
if (bbox.ic) {BBOX.ic = bbox.ic} else {delete BBOX.ic} if (bbox.ic) {BBOX.ic = bbox.ic} else {delete BBOX.ic}
if (BBOX.exactW && !bbox.exactW) {delete BBOX.exactW} if (BBOX.exactW && !bbox.exactW) {delete BBOX.exactW}
@ -1574,7 +1593,10 @@
}, },
HTMLzeroBBox: function () {return {h:0, d:0, w:0, lw: 0, rw:0}}, HTMLzeroBBox: function () {return {h:0, d:0, w:0, lw: 0, rw:0}},
HTMLcanStretch: function (direction) { HTMLcanStretch: function (direction) {
if (this.isEmbellished()) {return this.Core().HTMLcanStretch(direction)} if (this.isEmbellished()) {
var core = this.Core();
if (core && core !== this) {return core.HTMLcanStretch(direction)}
}
return false; return false;
}, },
HTMLstretchH: function (box,W) {return this.HTMLspanElement()}, HTMLstretchH: function (box,W) {return this.HTMLspanElement()},
@ -1600,10 +1622,10 @@
HTMLcreateSpan: function (span) { HTMLcreateSpan: function (span) {
if (this.spanID) { if (this.spanID) {
var SPAN = this.HTMLspanElement(); var SPAN = this.HTMLspanElement();
if (SPAN) { if (SPAN && (SPAN.parentNode === span || (SPAN.parentNode||{}).parentNode === span)) {
while (SPAN.firstChild) {SPAN.removeChild(SPAN.firstChild)} while (SPAN.firstChild) {SPAN.removeChild(SPAN.firstChild)}
SPAN.bbox = {w:0, h:0, d:0, lw:0, rw:0}; SPAN.bbox = {w:0, h:0, d:0, lw:0, rw:0};
SPAN.scale = 1; SPAN.isMultChar = null; SPAN.scale = 1; SPAN.isMultChar = SPAN.HH = null;
SPAN.style.cssText = ""; SPAN.style.cssText = "";
return SPAN; return SPAN;
} }
@ -1657,8 +1679,8 @@
var bbox = span.bbox, dd = (bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0, var bbox = span.bbox, dd = (bbox.exact ? 0 : 1/HTMLCSS.em), lW = 0, rW = 0,
lpad = span.style.paddingLeft, rpad = span.style.paddingRight; lpad = span.style.paddingLeft, rpad = span.style.paddingRight;
if (this.isToken) {lW = bbox.lw; rW = bbox.rw - bbox.w} if (this.isToken) {lW = bbox.lw; rW = bbox.rw - bbox.w}
if (lpad !== "") {lW += parseFloat(lpad)*(span.scale||1)} if (lpad !== "") {lW += HTMLCSS.unEm(lpad)*(span.scale||1)}
if (rpad !== "") {rW -= parseFloat(rpad)*(span.scale||1)} if (rpad !== "") {rW -= HTMLCSS.unEm(rpad)*(span.scale||1)}
var dw = (HTMLCSS.PaddingWidthBug || bbox.keepPadding || bbox.exactW ? 0 : rW - lW); var dw = (HTMLCSS.PaddingWidthBug || bbox.keepPadding || bbox.exactW ? 0 : rW - lW);
var W = Math.max(0,HTMLCSS.getW(span) + dw); var W = Math.max(0,HTMLCSS.getW(span) + dw);
var H = bbox.h + bbox.d, D = -bbox.d, lp = 0, rp = 0; var H = bbox.h + bbox.d, D = -bbox.d, lp = 0, rp = 0;
@ -1730,7 +1752,7 @@
var space = this.texSpacing(); var space = this.texSpacing();
if (space !== "") { if (space !== "") {
space = HTMLCSS.length2em(space,this.HTMLgetScale())/(span.scale||1); space = HTMLCSS.length2em(space,this.HTMLgetScale())/(span.scale||1);
if (span.style.paddingLeft) {space += parseFloat(span.style.paddingLeft)} if (span.style.paddingLeft) {space += HTMLCSS.unEm(span.style.paddingLeft)}
span.style.paddingLeft = HTMLCSS.Em(space); span.style.paddingLeft = HTMLCSS.Em(space);
} }
} }
@ -1749,7 +1771,7 @@
values.scriptminsize = HTMLCSS.length2em(this.Get("scriptminsize")); values.scriptminsize = HTMLCSS.length2em(this.Get("scriptminsize"));
if (scale < values.scriptminsize) {scale = values.scriptminsize} if (scale < values.scriptminsize) {scale = values.scriptminsize}
} }
scale *= HTMLCSS.length2em(values.mathsize); if (this.isToken) {scale *= HTMLCSS.length2em(values.mathsize)}
return scale; return scale;
}, },
HTMLgetMu: function (span) { HTMLgetMu: function (span) {
@ -1840,9 +1862,11 @@
toHTML: function (span,variant,remap,chars) { toHTML: function (span,variant,remap,chars) {
var text = this.data.join("").replace(/[\u2061-\u2064]/g,""); // remove invisibles var text = this.data.join("").replace(/[\u2061-\u2064]/g,""); // remove invisibles
if (remap) {text = remap(text,chars)} if (remap) {text = remap(text,chars)}
if (!variant) { if (variant.fontInherit) {
var scale = Math.floor(100/HTMLCSS.scale+.5) + "%"; var scale = Math.floor(100/HTMLCSS.scale+.5) + "%";
HTMLCSS.addElement(span,"span",{style:{"font-size":scale}},[text]); HTMLCSS.addElement(span,"span",{style:{"font-size":scale}},[text]);
if (variant.bold) {span.lastChild.style.fontWeight = "bold"}
if (variant.italic) {span.lastChild.style.fontStyle = "italic"}
var HD = HTMLCSS.getHD(span), W = HTMLCSS.getW(span); var HD = HTMLCSS.getHD(span), W = HTMLCSS.getW(span);
span.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true}; span.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true};
} else { } else {
@ -1851,11 +1875,14 @@
} }
}); });
MML.entity.Augment({ MML.entity.Augment({
toHTML: function (span,variant) { toHTML: function (span,variant,remap,chars) {
var text = this.toString().replace(/[\u2061-\u2064]/g,""); // remove invisibles var text = this.toString().replace(/[\u2061-\u2064]/g,""); // remove invisibles
if (!variant) { if (remap) {text = remap(text,chars)}
if (variant.fontInherit) {
var scale = Math.floor(100/HTMLCSS.scale+.5) + "%"; var scale = Math.floor(100/HTMLCSS.scale+.5) + "%";
HTMLCSS.addElement(span,"span",{style:{"font-size":scale}},[text]); HTMLCSS.addElement(span,"span",{style:{"font-size":scale}},[text]);
if (variant.bold) {span.lastChild.style.fontWeight = "bold"}
if (variant.italic) {span.lastChild.style.fontStyle = "italic"}
var HD = HTMLCSS.getHD(span), W = HTMLCSS.getW(span); var HD = HTMLCSS.getHD(span), W = HTMLCSS.getW(span);
span.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true}; span.bbox = {h:HD.h, d:HD.d, w:W, lw:0, rw:W, exactW: true};
} else { } else {
@ -1923,10 +1950,10 @@
else if (under && this === under.CoreMO() && parent.Get("accentunder")) {mapchars = HTMLCSS.FONTDATA.REMAPACCENTUNDER} else if (under && this === under.CoreMO() && parent.Get("accentunder")) {mapchars = HTMLCSS.FONTDATA.REMAPACCENTUNDER}
} }
// //
// STIX fonts need quotes from variant font // STIX and TeX fonts need quotes from variant font
// //
if (isScript && HTMLCSS.fontInUse === "STIX" && text.match(/['`"\u00B4\u2032-\u2037]/)) if (isScript && text.match(/['`"\u00B4\u2032-\u2037\u2057]/))
{variant = HTMLCSS.FONTDATA.VARIANT["-STIX-variant"]} {variant = HTMLCSS.FONTDATA.VARIANT["-"+HTMLCSS.fontInUse+"-variant"]}
// //
// Typeset contents // Typeset contents
// //
@ -1948,7 +1975,7 @@
var p = (span.bbox.h - span.bbox.d)/2 - HTMLCSS.TeX.axis_height*span.scale; var p = (span.bbox.h - span.bbox.d)/2 - HTMLCSS.TeX.axis_height*span.scale;
if (HTMLCSS.safariVerticalAlignBug && span.lastChild.nodeName === "IMG") { if (HTMLCSS.safariVerticalAlignBug && span.lastChild.nodeName === "IMG") {
span.lastChild.style.verticalAlign = span.lastChild.style.verticalAlign =
HTMLCSS.Em(parseFloat(span.lastChild.style.verticalAlign||0)/HTMLCSS.em-p/span.scale); HTMLCSS.Em(HTMLCSS.unEm(span.lastChild.style.verticalAlign||0)/HTMLCSS.em-p/span.scale);
} else if (HTMLCSS.konquerorVerticalAlignBug && span.lastChild.nodeName === "IMG") { } else if (HTMLCSS.konquerorVerticalAlignBug && span.lastChild.nodeName === "IMG") {
span.style.position = "relative"; span.style.position = "relative";
span.lastChild.style.position="relative"; span.lastChild.style.position="relative";
@ -1973,14 +2000,14 @@
CoreParent: function () { CoreParent: function () {
var parent = this; var parent = this;
while (parent && parent.isEmbellished() && while (parent && parent.isEmbellished() &&
parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()} parent.CoreMO() === this && !parent.isa(MML.math)) {parent = parent.Parent()}
return parent; return parent;
}, },
CoreText: function (parent) { CoreText: function (parent) {
if (!parent) {return ""} if (!parent) {return ""}
if (parent.isEmbellished()) {return parent.CoreMO().data.join("")} if (parent.isEmbellished()) {return parent.CoreMO().data.join("")}
while (parent.isa(MML.mrow) && parent.data.length === 1 && parent.data[0]) while ((parent.isa(MML.mrow) || parent.isa(MML.TeXAtom)) &&
{parent = parent.data[0]} parent.data.length === 1 && parent.data[0]) {parent = parent.data[0]}
if (!parent.isToken) {return ""} else {return parent.data.join("")} if (!parent.isToken) {return ""} else {return parent.data.join("")}
}, },
HTMLremapChars: { HTMLremapChars: {
@ -2055,7 +2082,8 @@
span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span = this.HTMLhandleSize(this.HTMLcreateSpan(span));
var variant = this.HTMLgetVariant(); var variant = this.HTMLgetVariant();
// Avoid setting the font style for error text or if mtextFontInherit is set // Avoid setting the font style for error text or if mtextFontInherit is set
if (HTMLCSS.config.mtextFontInherit || this.Parent().type === "merror") {variant = null} if (HTMLCSS.config.mtextFontInherit || this.Parent().type === "merror")
{variant = {bold:variant.bold, italic:variant.italic, fontInherit: true}}
for (var i = 0, m = this.data.length; i < m; i++) for (var i = 0, m = this.data.length; i < m; i++)
{if (this.data[i]) {this.data[i].toHTML(span,variant)}} {if (this.data[i]) {this.data[i].toHTML(span,variant)}}
if (!span.bbox) {span.bbox = {w:0, h:0, d:0, rw:0, lw:0}} if (!span.bbox) {span.bbox = {w:0, h:0, d:0, rw:0, lw:0}}
@ -2086,15 +2114,15 @@
MML.mspace.Augment({ MML.mspace.Augment({
toHTML: function (span) { toHTML: function (span) {
span = this.HTMLhandleSize(this.HTMLcreateSpan(span)); span = this.HTMLcreateSpan(span);
var values = this.getValues("height","depth","width"); var values = this.getValues("height","depth","width");
var mu = this.HTMLgetMu(span); var mu = this.HTMLgetMu(span);
values.mathbackground = this.mathbackground; values.mathbackground = this.mathbackground;
if (this.background && !this.mathbackground) {values.mathbackground = this.background} if (this.background && !this.mathbackground) {values.mathbackground = this.background}
var h = HTMLCSS.length2em(values.height,mu) / span.scale, var h = HTMLCSS.length2em(values.height,mu),
d = HTMLCSS.length2em(values.depth,mu) / span.scale, d = HTMLCSS.length2em(values.depth,mu),
w = HTMLCSS.length2em(values.width,mu) / span.scale; w = HTMLCSS.length2em(values.width,mu);
HTMLCSS.createSpace(span,h,d,w,values.mathbackground); HTMLCSS.createSpace(span,h,d,w,values.mathbackground,true);
return span; return span;
} }
}); });
@ -2254,8 +2282,8 @@
HTMLhandleSpace: function (span) { HTMLhandleSpace: function (span) {
if (!this.texWithDelims) { if (!this.texWithDelims) {
var space = (this.useMMLspacing ? 0 : HTMLCSS.length2em(this.texSpacing()||0)) + .12; var space = (this.useMMLspacing ? 0 : HTMLCSS.length2em(this.texSpacing()||0)) + .12;
span.style.paddingLeft = HTMLCSS.Em(space); span.style.paddingLeft = HTMLCSS.Em(space);
span.style.paddingRight = ".12em"; span.style.paddingRight = HTMLCSS.Em(.12);
} }
} }
}); });
@ -2281,7 +2309,7 @@
if (surd.bbox.h + surd.bbox.d > H) {q = ((surd.bbox.h+surd.bbox.d) - (H-t))/2} if (surd.bbox.h + surd.bbox.d > H) {q = ((surd.bbox.h+surd.bbox.d) - (H-t))/2}
var ruleC = HTMLCSS.FONTDATA.DELIMITERS[HTMLCSS.FONTDATA.RULECHAR]; var ruleC = HTMLCSS.FONTDATA.DELIMITERS[HTMLCSS.FONTDATA.RULECHAR];
if (!ruleC || W < ruleC.HW[0][0]*scale || scale < .75) { if (!ruleC || W < ruleC.HW[0][0]*scale || scale < .75) {
HTMLCSS.createRule(rule,t,0,W); HTMLCSS.createRule(rule,0,t,W);
} else { } else {
HTMLCSS.createDelimiter(rule,HTMLCSS.FONTDATA.RULECHAR,W,scale); HTMLCSS.createDelimiter(rule,HTMLCSS.FONTDATA.RULECHAR,W,scale);
} }
@ -2365,23 +2393,19 @@
MML.maction.Augment({toHTML: MML.mbase.HTMLautoload}); MML.maction.Augment({toHTML: MML.mbase.HTMLautoload});
MML.semantics.Augment({ MML.semantics.Augment({
toHTML: function (span) { toHTML: function (span,HW,D) {
span = this.HTMLcreateSpan(span);
if (this.data[0] != null) { if (this.data[0] != null) {
span = this.data[0].toHTML(span); var SPAN = this.data[0].toHTML(span);
this.spanID = this.data[0].spanID; if (D != null) {this.data[0].HTMLstretchV(span,HW,D)}
this.HTMLhandleSpace(span); else if (HW != null) {this.data[0].HTMLstretchH(span,HW)}
span.bbox = SPAN.bbox;
} }
this.HTMLhandleSpace(span);
return span; return span;
}, },
HTMLspanElement: function () { HTMLstretchH: MML.mbase.HTMLstretchH,
return (this.data[0] != null ? this.data[0].HTMLspanElement() : null); HTMLstretchV: MML.mbase.HTMLstretchV
},
HTMLstretchH: function (box,w) {
return (this.data[0] != null ? this.data[0].HTMLstretchH(box,w) : box);
},
HTMLstretchV: function (box,h,d) {
return (this.data[0] != null ? this.data[0].HTMLstretchV(box,h,d) : box);
}
}); });
MML.munderover.Augment({ MML.munderover.Augment({
@ -2432,7 +2456,7 @@
var accent = (i != this.base && values[this.ACCENTS[i]]); var accent = (i != this.base && values[this.ACCENTS[i]]);
if (accent && box.bbox.w <= 1/HTMLCSS.em+.0001) { // images can get the width off by 1px if (accent && box.bbox.w <= 1/HTMLCSS.em+.0001) { // images can get the width off by 1px
box.bbox.w = box.bbox.rw - box.bbox.lw; box.bbox.noclip = true; box.bbox.w = box.bbox.rw - box.bbox.lw; box.bbox.noclip = true;
if (box.bbox.lw && !HTMLCSS.zeroWidthBug) if (box.bbox.lw)
{box.insertBefore(HTMLCSS.createSpace(box.parentNode,0,0,-box.bbox.lw),box.firstChild)} {box.insertBefore(HTMLCSS.createSpace(box.parentNode,0,0,-box.bbox.lw),box.firstChild)}
HTMLCSS.createBlank(box,0,0,box.bbox.rw+.1); HTMLCSS.createBlank(box,0,0,box.bbox.rw+.1);
} }
@ -2564,9 +2588,11 @@
} }
MML.mbase.prototype.displayAlign = HUB.config.displayAlign; MML.mbase.prototype.displayAlign = HUB.config.displayAlign;
MML.mbase.prototype.displayIndent = HUB.config.displayIndent; MML.mbase.prototype.displayIndent = HUB.config.displayIndent;
math = HTMLCSS.Measured(this.data[0].toHTML(box),box); var html = this.data[0].toHTML(box); html.bbox.exactW = false; // force remeasure just to be sure
math = HTMLCSS.Measured(html,box);
} }
HTMLCSS.placeBox(box,0,0); HTMLCSS.placeBox(box,0,0);
stack.style.width = Math.round(HTMLCSS.unEm(stack.style.width)*this.em)+"px"; // get width right if minimum font size is set
// //
// Adjust bbox to match outer em-size // Adjust bbox to match outer em-size
// //
@ -2672,12 +2698,11 @@
msiePlaceBoxBug: (isIE8 && !quirks), msiePlaceBoxBug: (isIE8 && !quirks),
msieClipRectBug: !isIE8, msieClipRectBug: !isIE8,
msieNegativeSpaceBug: quirks, msieNegativeSpaceBug: quirks,
msieCloneNodeBug: (isIE8 && browser.version === "8.0"), cloneNodeBug: (isIE8 && browser.version === "8.0"),
initialSkipBug: (mode < 8), // confused by initial left-margin values initialSkipBug: (mode < 8), // confused by initial left-margin values
msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths msieNegativeBBoxBug: (mode >= 8), // negative bboxes have positive widths
msieIE6: !isIE7, msieIE6: !isIE7,
msieItalicWidthBug: true, msieItalicWidthBug: true,
zeroWidthBug: (mode < 8),
FontFaceBug: true, FontFaceBug: true,
msieFontCSSBug: browser.isIE9, msieFontCSSBug: browser.isIE9,
allowWebFonts: (mode >= 9 ? "woff" : "eot") allowWebFonts: (mode >= 9 ? "woff" : "eot")
@ -2749,6 +2774,10 @@
Chrome: function (browser) { Chrome: function (browser) {
HTMLCSS.Augment({ HTMLCSS.Augment({
Em: HTMLCSS.Px, // vertical alignment is better in pixels (since around v20)
unEm: HTMLCSS.unPx,
chromeHeightBug: true, // heights can be 1px off from the explicitly set size
cloneNodeBug: true, // Chrome gets heights wrong with the cloned ones
rfuzz: .011, rfuzz: .011,
AccentBug: true, AccentBug: true,
AdjustSurd: true, AdjustSurd: true,
@ -2769,7 +2798,6 @@
operaVerticalAlignBug: true, operaVerticalAlignBug: true,
operaFontSizeBug: browser.versionAtLeast("10.61"), operaFontSizeBug: browser.versionAtLeast("10.61"),
initialSkipBug: true, initialSkipBug: true,
zeroWidthBug: true,
FontFaceBug: true, FontFaceBug: true,
PaddingWidthBug: true, PaddingWidthBug: true,
allowWebFonts: (browser.versionAtLeast("10.0") && !browser.isMini ? "otf" : false), allowWebFonts: (browser.versionAtLeast("10.0") && !browser.isMini ? "otf" : false),

View File

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

View File

@ -35,6 +35,32 @@
// //
config: { config: {
styles: { styles: {
".MathJax_MathML": {
"font-style": "normal",
"font-weight": "normal",
"line-height": "normal",
"font-size": "100%",
"font-size-adjust":"none",
"text-indent": 0,
"text-align": "left",
"text-transform": "none",
"letter-spacing": "normal",
"word-spacing": "normal",
"word-wrap": "normal",
"white-space": "nowrap",
"float": "none",
"direction": "ltr",
border: 0, padding: 0, margin: 0
},
"span.MathJax_MathML": {
display: "inline"
},
"div.MathJax_MathML": {
display: "block"
},
".MathJax_mmlExBox": { ".MathJax_mmlExBox": {
display:"block", overflow:"hidden", display:"block", overflow:"hidden",
height:"1px", width:"60ex", height:"1px", width:"60ex",
@ -149,7 +175,8 @@
// //
// Add the MathJax span // Add the MathJax span
// //
jax = script.MathJax.elementJax; math = jax.root; jax.NativeMML = {}; jax = script.MathJax.elementJax; if (!jax) continue;
math = jax.root; jax.NativeMML = {};
var type = (math.Get("display") === "block" ? "div" : "span"); var type = (math.Get("display") === "block" ? "div" : "span");
span = HTML.Element(type,{ span = HTML.Element(type,{
className: "MathJax_MathML", id:jax.inputID+"-Frame" className: "MathJax_MathML", id:jax.inputID+"-Frame"
@ -170,7 +197,7 @@
// //
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode) continue;
jax = script.MathJax.elementJax; jax = script.MathJax.elementJax; if (!jax) continue;
if (!isMSIE) { if (!isMSIE) {
test = script.previousSibling; span = test.previousSibling; test = script.previousSibling; span = test.previousSibling;
ex = test.firstChild.offsetWidth/60; ex = test.firstChild.offsetWidth/60;
@ -186,7 +213,7 @@
// //
if (!isMSIE) { if (!isMSIE) {
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode || !script.MathJax.elementJax) continue;
test = scripts[i].previousSibling; test = scripts[i].previousSibling;
test.parentNode.removeChild(test); test.parentNode.removeChild(test);
} }
@ -233,6 +260,10 @@
container.onmousedown = EVENT.Mousedown; container.onmousedown = EVENT.Mousedown;
container.onclick = EVENT.Click; container.onclick = EVENT.Click;
container.ondblclick = EVENT.DblClick; container.ondblclick = EVENT.DblClick;
if (HUB.Browser.noContextMenu) {
container.ontouchstart = TOUCH.start;
container.ontouchend = TOUCH.end;
}
} }
}, },
@ -400,7 +431,7 @@
value = String(value); value = String(value);
if (nMML.NAMEDSPACE[value]) {value = nMML.NAMEDSPACE[value]} // MP doesn't do negative spaces if (nMML.NAMEDSPACE[value]) {value = nMML.NAMEDSPACE[value]} // MP doesn't do negative spaces
else if (value.match(/^\s*(([-+])?(\d+(\.\d*)?|\.\d+))\s*mu\s*$/)) else if (value.match(/^\s*(([-+])?(\d+(\.\d*)?|\.\d+))\s*mu\s*$/))
{value = ((1/18)*RegExp.$1).toFixed(3).replace(/\.?0+$/,"")+"em"} // FIXME: should take scriptlevel into account {value = RegExp.$2+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"} // FIXME: should take scriptlevel into account
else if (this.NativeMMLvariants[value]) {value = this.NativeMMLvariants[value]} else if (this.NativeMMLvariants[value]) {value = this.NativeMMLvariants[value]}
return value; return value;
}, },
@ -475,20 +506,22 @@
}); });
if (HUB.Browser.isFirefox) { if (HUB.Browser.isFirefox) {
MML.mtable.Augment({ if (!HUB.Browser.versionAtLeast("13.0")) {
toNativeMML: function (parent) { MML.mtable.Augment({
// toNativeMML: function (parent) {
// FF doesn't handle width, so put it in styles instead //
// // Firefox < 13 doesn't handle width, so put it in styles instead
if (this.width) { //
var styles = (this.style||"").replace(/;\s*$/,"").split(";"); if (this.width) {
if (styles[0] === "") {styles.shift()} var styles = (this.style||"").replace(/;\s*$/,"").split(";");
styles.push("width:"+this.width); if (styles[0] === "") {styles.shift()}
this.style = styles.join(";"); styles.push("width:"+this.width);
} this.style = styles.join(";");
this.SUPER(arguments).toNativeMML.call(this,parent); }
} this.SUPER(arguments).toNativeMML.call(this,parent);
}); }
});
}
if (!HUB.Browser.versionAtLeast("9.0")) { if (!HUB.Browser.versionAtLeast("9.0")) {
MML.mlabeledtr.Augment({ MML.mlabeledtr.Augment({
toNativeMML: function (parent) { toNativeMML: function (parent) {

View File

@ -22,13 +22,14 @@
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var VERSION = "2.0"; var VERSION = "2.0.2";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
SVG = MathJax.OutputJax.SVG; SVG = MathJax.OutputJax.SVG;
MML.mmultiscripts.Augment({ MML.mmultiscripts.Augment({
toSVG: function (HW,D) { toSVG: function (HW,D) {
var svg = this.SVG(); this.SVGhandleSpace(); this.SVGgetStyles();
var svg = this.SVG(); this.SVGhandleSpace(svg);
var scale = this.SVGgetScale(); var scale = this.SVGgetScale();
var base = (this.data[this.base] ? this.SVGdataStretched(this.base,HW,D) : SVG.BBOX.G().Clean()); var base = (this.data[this.base] ? this.SVGdataStretched(this.base,HW,D) : SVG.BBOX.G().Clean());
var x_height = SVG.TeX.x_height * scale, var x_height = SVG.TeX.x_height * scale,

View File

@ -22,12 +22,13 @@
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var VERSION = "2.0"; var VERSION = "2.0.1";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
SVG = MathJax.OutputJax.SVG; SVG = MathJax.OutputJax.SVG;
MML.ms.Augment({ MML.ms.Augment({
toSVG: function () { toSVG: function () {
this.SVGgetStyles();
var svg = this.SVG(); this.SVGhandleSpace(svg); var svg = this.SVG(); this.SVGhandleSpace(svg);
var values = this.getValues("lquote","rquote"); var values = this.getValues("lquote","rquote");
var variant = this.SVGgetVariant(), scale = this.SVGgetScale(); var variant = this.SVGgetVariant(), scale = this.SVGgetScale();

View File

@ -22,13 +22,14 @@
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var VERSION = "2.0"; var VERSION = "2.0.2";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
SVG = MathJax.OutputJax.SVG, SVG = MathJax.OutputJax.SVG,
BBOX = SVG.BBOX; BBOX = SVG.BBOX;
MML.mtable.Augment({ MML.mtable.Augment({
toSVG: function (span) { toSVG: function (span) {
this.SVGgetStyles();
var svg = this.SVG(); var svg = this.SVG();
if (this.data.length === 0) {return svg} if (this.data.length === 0) {return svg}
var values = this.getValues("columnalign","rowalign","columnspacing","rowspacing", var values = this.getValues("columnalign","rowalign","columnspacing","rowspacing",
@ -41,8 +42,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var scale = this.SVGgetScale(), mu = this.SVGgetMu(svg); var scale = this.SVGgetScale(), mu = this.SVGgetMu(svg);
var LABEL = -1; var LABEL = -1;
var H = [], D = [], W = [], A = [], C = [], i, j, J = -1, m, M, s, row; var H = [], D = [], W = [], A = [], C = [], i, j, J = -1, m, M, s, row, cell, mo;
var LHD = SVG.FONTDATA.baselineskip * scale * values.useHeight, var LHD = SVG.FONTDATA.baselineskip * scale * values.useHeight, HD,
LH = SVG.FONTDATA.lineH * scale, LD = SVG.FONTDATA.lineD * scale; LH = SVG.FONTDATA.lineH * scale, LD = SVG.FONTDATA.lineD * scale;
// //
@ -57,8 +58,26 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
C[j] = BBOX.G(); C[j] = BBOX.G();
W[j] = -SVG.BIGDIMEN; W[j] = -SVG.BIGDIMEN;
} }
A[i][j] = row.data[j-s].toSVG(); cell = row.data[j-s];
A[i][j] = cell.toSVG();
// if (row.data[j-s].isMultiline) {A[i][j].style.width = "100%"} // if (row.data[j-s].isMultiline) {A[i][j].style.width = "100%"}
if (cell.isEmbellished()) {
mo = cell.CoreMO();
var min = mo.Get("minsize",true);
if (min) {
if (mo.SVGcanStretch("Vertical")) {
HD = mo.SVGdata.h + mo.SVGdata.d;
if (HD) {
min = SVG.length2em(min,mu,HD);
if (min*mo.SVGdata.h/HD > H[j]) {H[j] = min*mo.SVGdata.h/HD}
if (min*mo.SVGdata.d/HD > D[j]) {D[j] = min*mo.SVGdata.d/HD}
}
} else if (mo.SVGcanStretch("Horizontal")) {
min = SVG.length2em(min,mu,mo.SVGdata.w);
if (min > W[j]) {W[j] = min}
}
}
}
if (A[i][j].h > H[i]) {H[i] = A[i][j].h} if (A[i][j].h > H[i]) {H[i] = A[i][j].h}
if (A[i][j].d > D[i]) {D[i] = A[i][j].d} if (A[i][j].d > D[i]) {D[i] = A[i][j].d}
if (A[i][j].w > W[j]) {W[j] = A[i][j].w} if (A[i][j].w > W[j]) {W[j] = A[i][j].w}
@ -118,7 +137,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
// //
// Determine array total height // Determine array total height
// //
var HD = H[0] + D[A.length-1]; HD = H[0] + D[A.length-1];
for (i = 0, m = A.length-1; i < m; i++) for (i = 0, m = A.length-1; i < m; i++)
{HD += Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])} {HD += Math.max((H[i]+D[i] ? LHD : 0),D[i]+H[i+1]+RSPACE[i])}
// //
@ -229,11 +248,11 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
for (i = 0, m = A.length; i < m; i++) { for (i = 0, m = A.length; i < m; i++) {
if (A[i][j]) { if (A[i][j]) {
s = (this.data[i].type === "mlabeledtr" ? LABEL : 0); s = (this.data[i].type === "mlabeledtr" ? LABEL : 0);
var cell = this.data[i].data[j-s]; cell = this.data[i].data[j-s];
if (cell.SVGcanStretch("Horizontal")) { if (cell.SVGcanStretch("Horizontal")) {
A[i][j] = cell.SVGstretchH(W[j]); A[i][j] = cell.SVGstretchH(W[j]);
} else if (cell.SVGcanStretch("Vertical")) { } else if (cell.SVGcanStretch("Vertical")) {
var mo = cell.CoreMO(); mo = cell.CoreMO();
var symmetric = mo.symmetric; mo.symmetric = false; var symmetric = mo.symmetric; mo.symmetric = false;
A[i][j] = cell.SVGstretchV(H[i],D[i]); A[i][j] = cell.SVGstretchV(H[i],D[i]);
mo.symmetric = symmetric; mo.symmetric = symmetric;

View File

@ -22,7 +22,7 @@
*/ */
MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () { MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
var VERSION = "2.0.1"; var VERSION = "2.0.2";
var MML = MathJax.ElementJax.mml, var MML = MathJax.ElementJax.mml,
SVG = MathJax.OutputJax.SVG, SVG = MathJax.OutputJax.SVG,
BBOX = SVG.BBOX; BBOX = SVG.BBOX;
@ -149,10 +149,9 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
// Get the current breakpoint position and other data // Get the current breakpoint position and other data
// //
var index = info.index.slice(0), i = info.index.shift(), var index = info.index.slice(0), i = info.index.shift(),
m = this.data.length, W, scanW = info.W, m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
broken = (info.index.length > 0), better = false; if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w; info.w = 0}
if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w}; scanW = info.scanW = info.W; info.nest++;
info.w = 0; info.nest++; info.scanW = scanW;
// //
// Look through the line for breakpoints, // Look through the line for breakpoints,
// (as long as we are not too far past the breaking width) // (as long as we are not too far past the breaking width)
@ -160,14 +159,10 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
while (i < m && info.scanW < 1.33*SVG.linebreakWidth) { while (i < m && info.scanW < 1.33*SVG.linebreakWidth) {
if (this.data[i]) { if (this.data[i]) {
if (this.data[i].SVGbetterBreak(info,state)) { if (this.data[i].SVGbetterBreak(info,state)) {
better = true; index = [i].concat(info.index); W = info.W; better = true; index = [i].concat(info.index); W = info.W; w = info.w;
if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true} if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true}
} }
if (!broken) { if (!broken) {scanW = this.SVGaddWidth(i,info,scanW)}
var svg = this.data[i].SVGdata;
scanW += svg.w + svg.x; if (svg.X) {scanW += svg.X}
info.W = info.scanW = scanW;
}
} }
info.index = []; i++; broken = false; info.index = []; i++; broken = false;
} }
@ -175,6 +170,12 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
if (better) {info.W = W} if (better) {info.W = W}
return better; return better;
}, },
SVGaddWidth: function (i,info,scanW) {
var svg = this.data[i].SVGdata;
scanW += svg.w + svg.x; if (svg.X) {scanW += svg.X}
info.W = info.scanW = scanW; info.w = 0;
return scanW;
},
/****************************************************************/ /****************************************************************/
// //
@ -303,8 +304,8 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
/****************************************************************/ /****************************************************************/
// //
// Move an element from its original span to its new location in // Move an element from its original position to its new location in
// a split element or the new line's span // a split element or the new line's position
// //
SVGmove: function (line,state,values) { SVGmove: function (line,state,values) {
// FIXME: handle linebreakstyle === "duplicate" // FIXME: handle linebreakstyle === "duplicate"
@ -327,6 +328,87 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
/**************************************************************************/ /**************************************************************************/
MML.mfenced.Augment({
SVGbetterBreak: function (info,state) {
//
// Get the current breakpoint position and other data
//
var index = info.index.slice(0), i = info.index.shift(),
m = this.data.length, W, w, scanW, broken = (info.index.length > 0), better = false;
if (i == null) {i = -1}; if (!broken) {i++; info.W += info.w; info.w = 0}
scanW = info.scanW = info.W; info.nest++;
//
// Create indices that include the delimiters and separators
//
if (!this.dataI) {
this.dataI = [];
if (this.data.open) {this.dataI.push("open")}
if (m) {this.dataI.push(0)}
for (var j = 1; j < m; j++) {
if (this.data["sep"+j]) {this.dataI.push("sep"+j)}
this.dataI.push(j);
}
if (this.data.close) {this.dataI.push("close")}
}
m = this.dataI.length;
//
// Look through the line for breakpoints, including the open, close, and separators
// (as long as we are not too far past the breaking width)
//
while (i < m && info.scanW < 1.33*SVG.linebreakWidth) {
var k = this.dataI[i];
if (this.data[k]) {
if (this.data[k].SVGbetterBreak(info,state)) {
better = true; index = [i].concat(info.index); W = info.W; w = info.w;
if (info.penalty === PENALTY.newline) {info.index = index; info.nest--; return true}
}
if (!broken) {scanW = this.SVGaddWidth(k,info,scanW)}
}
info.index = []; i++; broken = false;
}
info.nest--; info.index = index;
if (better) {info.W = W; info.w = w}
return better;
},
SVGmoveLine: function (start,end,svg,state,values) {
var i = start[0], j = end[0];
if (i == null) {i = -1}; if (j == null) {j = this.dataI.length-1}
if (i === j && start.length > 1) {
//
// If starting and ending in the same element move the subpiece to the new line
// Add the closing fence, if present
//
this.data[this.dataI[i]].SVGmoveSlice(start.slice(1),end.slice(1),svg,state,values,"paddingLeft");
} else {
//
// Otherwise, move the remainder of the initial item
// and any others (including open and separators) up to the last one
//
var last = state.last; state.last = false; var k = this.dataI[i];
while (i < j) {
if (this.data[k]) {
if (start.length <= 1) {this.data[k].SVGmove(svg,state,values)}
else {this.data[k].SVGmoveSlice(start.slice(1),[],svg,state,values,"paddingLeft")}
}
i++; k = this.dataI[i]; state.first = false; start = [];
}
//
// If the last item is complete, move it and the closing fence,
// otherwise move the first part of it up to the split
//
state.last = last;
if (this.data[k]) {
if (end.length <= 1) {this.data[k].SVGmove(svg,state,values)}
else {this.data[k].SVGmoveSlice([],end.slice(1),svg,state,values,"paddingRight")}
}
}
}
});
/**************************************************************************/
MML.mo.Augment({ MML.mo.Augment({
// //
// Override the method for checking line breaks to properly handle <mo> // Override the method for checking line breaks to properly handle <mo>
@ -402,7 +484,6 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
// Get the default penalty for this location // Get the default penalty for this location
// //
var W = info.scanW, svg = this.SVGdata, w = svg.w + svg.x; var W = info.scanW, svg = this.SVGdata, w = svg.w + svg.x;
if (values.linebreakstyle === MML.LINEBREAKSTYLE.AFTER) {W += w; w = 0}
if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?) if (W - info.shift === 0) {return false} // don't break at zero width (FIXME?)
var offset = SVG.linebreakWidth - W; var offset = SVG.linebreakWidth - W;
// //

View File

@ -24,7 +24,7 @@
MathJax.OutputJax.SVG = MathJax.OutputJax({ MathJax.OutputJax.SVG = MathJax.OutputJax({
id: "SVG", id: "SVG",
version: "2.0", version: "2.0.8",
directory: MathJax.OutputJax.directory + "/SVG", directory: MathJax.OutputJax.directory + "/SVG",
extensionDir: MathJax.OutputJax.extensionDir + "/SVG", extensionDir: MathJax.OutputJax.extensionDir + "/SVG",
autoloadDir: MathJax.OutputJax.directory + "/SVG/autoload", autoloadDir: MathJax.OutputJax.directory + "/SVG/autoload",

View File

@ -22,6 +22,7 @@
*/ */
(function (SVG) { (function (SVG) {
var VERSION = "2.0.1";
var DELIMITERS = SVG.FONTDATA.DELIMITERS; var DELIMITERS = SVG.FONTDATA.DELIMITERS;
@ -48,12 +49,12 @@
0x21A4: // left arrow from bar 0x21A4: // left arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x2190,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x21A5: // up arrow from bar 0x21A5: // up arrow from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]} stretch: {min:.6, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x2191,SIZE1]}
}, },
0x21A6: // right arrow from bar 0x21A6: // right arrow from bar
{ {
@ -63,7 +64,7 @@
0x21A7: // down arrow from bar 0x21A7: // down arrow from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]} stretch: {min:.6, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x2193,SIZE1]}
}, },
0x21B0: // up arrow with top leftwards 0x21B0: // up arrow with top leftwards
{ {
@ -128,12 +129,12 @@
0x23B4: // top square bracket 0x23B4: // top square bracket
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.325], right:[0x2510,AMS,0,-.1]} stretch: {min:.5, left:[0x250C,AMS,0,-.1], rep:[0x2212,MAIN,0,.325], right:[0x2510,AMS,0,-.1]}
}, },
0x23B5: // bottom square bracket 0x23B5: // bottom square bracket
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]} stretch: {min:.5, left:[0x2514,AMS,0,.26], rep:[0x2212,MAIN,0,0,0,.25], right:[0x2518,AMS,0,.26]}
}, },
0x23DC: // top paren 0x23DC: // top paren
{ {
@ -148,82 +149,82 @@
0x23E0: // top tortoise shell 0x23E0: // top tortoise shell
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,0,.13], right:[0x2CB,MAIN], fullExtenders:true} stretch: {min:1.25, left:[0x2CA,MAIN,-.1], rep:[0x2C9,MAIN,-.05,.13], right:[0x2CB,MAIN], fullExtenders:true}
}, },
0x23E1: // bottom tortoise shell 0x23E1: // bottom tortoise shell
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true} stretch: {min:1.5, left:[0x2CB,MAIN,-.1,.1], rep:[0x2C9,MAIN,-.1], right:[0x2CA,MAIN,-.1,.1], fullExtenders:true}
}, },
0x2906: // leftwards double arrow from bar 0x2906: // leftwards double arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]} stretch: {min:1, left:[0x21D0,MAIN], rep:[0x3D,MAIN], right:[0x2223,SIZE1,0,-.1]}
}, },
0x2907: // rightwards double arrow from bar 0x2907: // rightwards double arrow from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]} stretch: {min:.7, left:[0x22A8,AMS,0,-.12], rep:[0x3D,MAIN], right:[0x21D2,MAIN]}
}, },
0x294E: // left barb up right barb up harpoon 0x294E: // left barb up right barb up harpoon
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} stretch: {min:.5, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
}, },
0x294F: // up barb right down barb right harpoon 0x294F: // up barb right down barb right harpoon
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]} stretch: {min:.5, top:[0x21BE,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
}, },
0x2950: // left barb dow right barb down harpoon 0x2950: // left barb dow right barb down harpoon
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} stretch: {min:.5, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
}, },
0x2951: // up barb left down barb left harpoon 0x2951: // up barb left down barb left harpoon
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]} stretch: {min:.5, top:[0x21BF,AMS,.12,0,1.1], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
}, },
0x295A: // leftwards harpoon with barb up from bar 0x295A: // leftwards harpoon with barb up from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x21BC,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x295B: // rightwards harpoon with barb up from bar 0x295B: // rightwards harpoon with barb up from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]} stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C0,MAIN]}
}, },
0x295C: // up harpoon with barb right from bar 0x295C: // up harpoon with barb right from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]} stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BE,AMS,.12,0,1.1]}
}, },
0x295D: // down harpoon with barb right from bar 0x295D: // down harpoon with barb right from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]} stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C2,AMS,.12,0,1.1]}
}, },
0x295E: // leftwards harpoon with barb down from bar 0x295E: // leftwards harpoon with barb down from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]} stretch: {min:1, left:[0x21BD,MAIN], rep:[0x2212,MAIN], right:[0x2223,SIZE1,0,-.05,.9]}
}, },
0x295F: // rightwards harpoon with barb down from bar 0x295F: // rightwards harpoon with barb down from bar
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0x2223,SIZE1,-.09,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]} stretch: {min:1, left:[0x2223,SIZE1,-.05,-.05,.9], rep:[0x2212,MAIN], right:[0x21C1,MAIN]}
}, },
0x2960: // up harpoon with barb left from bar 0x2960: // up harpoon with barb left from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]} stretch: {min:.7, bot:[0x22A5,BOLD,0,0,.75], ext:[0x23D0,SIZE1], top:[0x21BF,AMS,.12,0,1.1]}
}, },
0x2961: // down harpoon with barb left from bar 0x2961: // down harpoon with barb left from bar
{ {
dir: V, HW: [], dir: V, HW: [],
stretch: {top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]} stretch: {min:.7, top:[0x22A4,BOLD,0,0,.75], ext:[0x23D0,SIZE1], bot:[0x21C3,AMS,.12,0,1.1]}
} }
}; };

View File

@ -23,7 +23,7 @@
*/ */
(function (SVG,MML,AJAX) { (function (SVG,MML,AJAX) {
var VERSION = "2.0"; var VERSION = "2.0.3";
var MAIN = "MathJax_Main", var MAIN = "MathJax_Main",
BOLD = "MathJax_Main-bold", BOLD = "MathJax_Main-bold",
@ -69,12 +69,18 @@
offsetG: 0x03B1, variantG: "italic", offsetG: 0x03B1, variantG: "italic",
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"italic"]}}, 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58,
0x2216:[0x2216,"-TeX-variant"], // \smallsetminus
0x210F:[0x210F,"-TeX-variant"], // \hbar
0x2032:[0x27,"sans-serif-italic"], // HACK: a smaller prime
0x29F8:[0x002F,MML.VARIANT.ITALIC]}},
"bold": {fonts:[BOLD,SIZE1,AMS], bold:true, "bold": {fonts:[BOLD,SIZE1,AMS], bold:true,
offsetG: 0x03B1, variantG: "bold-italic", offsetG: 0x03B1, variantG: "bold-italic",
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"bold-italic"], 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58, 0x29F8:[0x002F,"bold-italic"],
0x219A:"\u2190\u0338", 0x219B:"\u2192\u0338", 0x21AE:"\u2194\u0338",
0x21CD:"\u21D0\u0338", 0x21CE:"\u21D4\u0338", 0x21CF:"\u21D2\u0338",
0x2204:"\u2203\u0338", 0x2224:"\u2223\u0338", 0x2226:"\u2225\u0338", 0x2204:"\u2203\u0338", 0x2224:"\u2223\u0338", 0x2226:"\u2225\u0338",
0x2241:"\u223C\u0338", 0x2247:"\u2245\u0338", 0x2241:"\u223C\u0338", 0x2247:"\u2245\u0338",
0x226E:"<\u0338", 0x226F:">\u0338", 0x226E:"<\u0338", 0x226F:">\u0338",
@ -111,6 +117,15 @@
remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48, remap: {0x391:0x41, 0x392:0x42, 0x395:0x45, 0x396:0x5A, 0x397:0x48,
0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F, 0x399:0x49, 0x39A:0x4B, 0x39C:0x4D, 0x39D:0x4E, 0x39F:0x4F,
0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}}, 0x3A1:0x50, 0x3A4:0x54, 0x3A7:0x58}},
"-TeX-variant": {fonts:[AMS,MAIN,SIZE1], // HACK: to get larger prime for \prime
remap: {
0x2268: 0xE00C, 0x2269: 0xE00D, 0x2270: 0xE011, 0x2271: 0xE00E,
0x2A87: 0xE010, 0x2A88: 0xE00F, 0x2224: 0xE006, 0x2226: 0xE007,
0x2288: 0xE016, 0x2289: 0xE018, 0x228A: 0xE01A, 0x228B: 0xE01B,
0x2ACB: 0xE017, 0x2ACC: 0xE019, 0x03DC: 0xE008, 0x03F0: 0xE009,
0x2216:[0x2216,MML.VARIANT.NORMAL], // \setminus
0x210F:[0x210F,MML.VARIANT.NORMAL] // \hslash
}},
"-largeOp": {fonts:[SIZE2,SIZE1,MAIN]}, "-largeOp": {fonts:[SIZE2,SIZE1,MAIN]},
"-smallOp": {fonts:[SIZE1,MAIN]} "-smallOp": {fonts:[SIZE1,MAIN]}
}, },
@ -140,13 +155,16 @@
0x2022: 0x2219, 0x2044: 0x2F, // bullet, fraction slash 0x2022: 0x2219, 0x2044: 0x2F, // bullet, fraction slash
0x2305: 0x22BC, 0x2306: 0x2A5E, // barwedge, doublebarwedge 0x2305: 0x22BC, 0x2306: 0x2A5E, // barwedge, doublebarwedge
0x25AA: 0x25A0, 0x25B4: 0x25B2, // blacksquare, blacktriangle 0x25AA: 0x25A0, 0x25B4: 0x25B2, // blacksquare, blacktriangle
0x25B5: 0x25B3, 0x25BE: 0x25BC, // triangle, blacktriangledown 0x25B5: 0x25B3, 0x25B8: 0x25B6, // triangle, blacktriangleright
0x25BF: 0x25BD, 0x25C2: 0x25C0, // triangledown, blacktriangleleft 0x25BE: 0x25BC, 0x25BF: 0x25BD, // blacktriangledown, triangledown
0x25C2: 0x25C0, // blacktriangleleft
0x2329: 0x27E8, 0x232A: 0x27E9, // langle, rangle 0x2329: 0x27E8, 0x232A: 0x27E9, // langle, rangle
0x3008: 0x27E8, 0x3009: 0x27E9, // langle, rangle 0x3008: 0x27E8, 0x3009: 0x27E9, // langle, rangle
0x2758: 0x2223, // VerticalSeparator 0x2758: 0x2223, // VerticalSeparator
0x2A2F: 0xD7, // cross product 0x2A2F: 0xD7, // cross product
0x25FB: 0x25A1, 0x25FC: 0x25A0, // square, blacksquare
// //
// Letter-like symbols (that appear elsewhere) // Letter-like symbols (that appear elsewhere)
// //
@ -185,9 +203,10 @@
// //
0x2204: "\u2203\u0338", // \not\exists 0x2204: "\u2203\u0338", // \not\exists
0x220C: "\u220B\u0338", // \not\ni 0x220C: "\u220B\u0338", // \not\ni
0x2244: "\u2243\u0338", // \not\cong 0x2244: "\u2243\u0338", // \not\simeq
0x2249: "\u2248\u0338", // \not\approx 0x2249: "\u2248\u0338", // \not\approx
0x2262: "\u2261\u0338", // \not\equiv 0x2262: "\u2261\u0338", // \not\equiv
0x226D: "\u224D\u0338", // \not\asymp
0x2274: "\u2272\u0338", // \not\lesssim 0x2274: "\u2272\u0338", // \not\lesssim
0x2275: "\u2273\u0338", // \not\gtrsim 0x2275: "\u2273\u0338", // \not\gtrsim
0x2278: "\u2276\u0338", // \not\lessgtr 0x2278: "\u2276\u0338", // \not\lessgtr
@ -197,15 +216,21 @@
0x22E2: "\u2291\u0338", // \not\sqsubseteq 0x22E2: "\u2291\u0338", // \not\sqsubseteq
0x22E3: "\u2292\u0338", // \not\sqsupseteq 0x22E3: "\u2292\u0338", // \not\sqsupseteq
0x2A0C: "\u222C\u222C", // quadruple integral
0x2033: "\u2032\u2032", // double prime 0x2033: "\u2032\u2032", // double prime
0x2034: "\u2032\u2032\u2032", // triple prime 0x2034: "\u2032\u2032\u2032", // triple prime
0x2036: "\u2035\u2035", // double back prime 0x2036: "\u2035\u2035", // double back prime
0x2037: "\u2035\u2035\u2035", // trile back prime 0x2037: "\u2035\u2035\u2035", // trile back prime
0x2057: "\u2032\u2032\u2032\u2032" // quadruple prime 0x2057: "\u2032\u2032\u2032\u2032", // quadruple prime
0x20DB: "...", // combining three dots above (only works with mover/under)
0x20DC: "...." // combining four dots above (only works with mover/under)
}, },
REMAPACCENT: { REMAPACCENT: {
"\u2192":"\u20D7" "\u2192":"\u20D7",
"\u2032":"'",
"\u2035":"`"
}, },
REMAPACCENTUNDER: { REMAPACCENTUNDER: {
}, },
@ -444,12 +469,12 @@
0x23DE: // horizontal brace down 0x23DE: // horizontal brace down
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0xE150,SIZE4], mid:[[0xE153,0xE152],SIZE4], right:[0xE151,SIZE4], rep:[0xE154,SIZE4]} stretch: {min:.9, left:[0xE150,SIZE4], mid:[[0xE153,0xE152],SIZE4], right:[0xE151,SIZE4], rep:[0xE154,SIZE4]}
}, },
0x23DF: // horizontal brace up 0x23DF: // horizontal brace up
{ {
dir: H, HW: [], dir: H, HW: [],
stretch: {left:[0xE152,SIZE4], mid:[[0xE151,0xE150],SIZE4], right:[0xE153,SIZE4], rep:[0xE154,SIZE4]} stretch: {min:.9, left:[0xE152,SIZE4], mid:[[0xE151,0xE150],SIZE4], right:[0xE153,SIZE4], rep:[0xE154,SIZE4]}
}, },
0x27E8: // \langle 0x27E8: // \langle
{ {
@ -546,13 +571,6 @@
}); });
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
var TEX = MathJax.InputJax.TeX;
TEX.Definitions.mathchar0mi.ell = ['2113',{mathvariant: MML.VARIANT.NORMAL}];
TEX.Definitions.mathchar0mi.hbar = ['210F',{mathvariant: MML.VARIANT.NORMAL}];
TEX.Definitions.mathchar0mi.S = ['00A7',{mathvariant: MML.VARIANT.SCRIPT}];
});
SVG.FONTDATA.FONTS['MathJax_Main'] = { SVG.FONTDATA.FONTS['MathJax_Main'] = {
directory: 'Main/Regular', directory: 'Main/Regular',
family: 'MathJax_Main', family: 'MathJax_Main',

View File

@ -170,16 +170,16 @@
// Remove any existing output // Remove any existing output
// //
prev = script.previousSibling; prev = script.previousSibling;
if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?$/)) if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/))
{prev.parentNode.removeChild(prev)} {prev.parentNode.removeChild(prev)}
// //
// Add the span, and a div if in display mode, // Add the span, and a div if in display mode,
// then set the role and mark it as being processed // then set the role and mark it as being processed
// //
jax = script.MathJax.elementJax; jax = script.MathJax.elementJax; if (!jax) continue;
jax.SVG = {display: (jax.root.Get("display") === "block")} jax.SVG = {display: (jax.root.Get("display") === "block")}
span = div = HTML.Element("span",{ span = div = HTML.Element("span",{
style: {"font-size": this.scale+"%", display:"inline-block"}, style: {"font-size": this.config.scale+"%", display:"inline-block"},
className:"MathJax_SVG", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id, className:"MathJax_SVG", id:jax.inputID+"-Frame", isMathJax:true, jaxID:this.id,
oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown, oncontextmenu:EVENT.Menu, onmousedown: EVENT.Mousedown,
onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove, onmouseover:EVENT.Mouseover, onmouseout:EVENT.Mouseout, onmousemove:EVENT.Mousemove,
@ -213,7 +213,7 @@
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode) continue;
test = script.previousSibling; div = test.previousSibling; test = script.previousSibling; div = test.previousSibling;
jax = script.MathJax.elementJax; jax = script.MathJax.elementJax; if (!jax) continue;
ex = test.firstChild.offsetHeight/60; ex = test.firstChild.offsetHeight/60;
cwidth = div.previousSibling.firstChild.offsetWidth; cwidth = div.previousSibling.firstChild.offsetWidth;
if (relwidth) {maxwidth = cwidth} if (relwidth) {maxwidth = cwidth}
@ -234,8 +234,8 @@
// //
for (i = 0; i < m; i++) { for (i = 0; i < m; i++) {
script = scripts[i]; if (!script.parentNode) continue; script = scripts[i]; if (!script.parentNode) continue;
test = scripts[i].previousSibling; jax = scripts[i].MathJax.elementJax; test = scripts[i].previousSibling; span = test.previousSibling;
span = test.previousSibling; jax = scripts[i].MathJax.elementJax; if (!jax) continue;
if (!jax.SVG.isHidden) {span = span.previousSibling} if (!jax.SVG.isHidden) {span = span.previousSibling}
span.parentNode.removeChild(span); span.parentNode.removeChild(span);
test.parentNode.removeChild(test); test.parentNode.removeChild(test);
@ -243,7 +243,7 @@
// //
// Set state variables used for displaying equations in chunks // Set state variables used for displaying equations in chunks
// //
state.SVGeqn = state.SVGlast = 0; state.SVGeqn = state.SVGlast = 0; state.SVGi = -1;
state.SVGchunk = this.config.EqnChunk; state.SVGchunk = this.config.EqnChunk;
state.SVGdelay = false; state.SVGdelay = false;
}, },
@ -302,7 +302,7 @@
// //
// Check if we should show this chunk of equations // Check if we should show this chunk of equations
// //
state.SVGeqn++; state.SVGeqn += (state.i - state.SVGi); state.SVGi = state.i;
if (state.SVGeqn >= state.SVGlast + state.SVGchunk) { if (state.SVGeqn >= state.SVGlast + state.SVGchunk) {
this.postTranslate(state); this.postTranslate(state);
state.SVGchunk = Math.floor(state.SVGchunk*this.config.EqnChunkFactor); state.SVGchunk = Math.floor(state.SVGchunk*this.config.EqnChunkFactor);
@ -319,7 +319,7 @@
// //
for (var i = state.SVGlast, m = state.SVGeqn; i < m; i++) { for (var i = state.SVGlast, m = state.SVGeqn; i < m; i++) {
var script = scripts[i]; var script = scripts[i];
if (script) { if (script && script.MathJax.elementJax) {
// //
// Remove the processed marker // Remove the processed marker
// //
@ -534,20 +534,21 @@
c = [scale,font.id+"-"+n.toString(16).toUpperCase()].concat(c); c = [scale,font.id+"-"+n.toString(16).toUpperCase()].concat(c);
svg.Add(BBOX.GLYPH.apply(BBOX,c),svg.w,0); svg.Add(BBOX.GLYPH.apply(BBOX,c),svg.w,0);
} else if (this.FONTDATA.DELIMITERS[n]) { } else if (this.FONTDATA.DELIMITERS[n]) {
svg.Add(this.createDelimiter(n,0,1,font),svg.w,0); c = this.createDelimiter(n,0,1,font);
svg.Add(c,svg.w,(this.FONTDATA.DELIMITERS[n].dir === "V" ? c.d: 0));
} else { } else {
if (n <= 0xFFFF) {c = String.fromCharCode(n)} else { if (n <= 0xFFFF) {c = String.fromCharCode(n)} else {
N = n - 0x10000; N = n - 0x10000;
c = String.fromCharCode((N>>10)+0xD800) c = String.fromCharCode((N>>10)+0xD800)
+ String.fromCharCode((N&0x3FF)+0xDC00); + String.fromCharCode((N&0x3FF)+0xDC00);
} }
text = BBOX.TEXT(scale,c,{ var box = BBOX.TEXT(scale,c,{
"font-family":variant.defaultFamily||SVG.config.undefinedFamily, "font-family":variant.defaultFamily||SVG.config.undefinedFamily,
"font-style":(variant.italic?"italic":""), "font-style":(variant.italic?"italic":""),
"font-weight":(variant.bold?"bold":"") "font-weight":(variant.bold?"bold":"")
}) })
if (variant.h != null) {text.h = variant.h}; if (variant.d != null) {text.d = variant.d} if (variant.h != null) {box.h = variant.h}; if (variant.d != null) {box.d = variant.d}
c = BBOX.G(); c.Add(text); svg.Add(c,svg.w,0); text = ""; c = BBOX.G(); c.Add(box); svg.Add(c,svg.w,0);
HUB.signal.Post(["SVG Jax - unknown char",n,variant]); HUB.signal.Post(["SVG Jax - unknown char",n,variant]);
} }
} }
@ -631,12 +632,12 @@
if (data[0] instanceof Array) { if (data[0] instanceof Array) {
for (var i = 0, m = data[0].length; i < m; i++) {text += String.fromCharCode(data[0][i])} for (var i = 0, m = data[0].length; i < m; i++) {text += String.fromCharCode(data[0][i])}
} else {text = String.fromCharCode(data[0])} } else {text = String.fromCharCode(data[0])}
if (data[4]) {scale = scale*data[4]}
var svg = this.HandleVariant(variant,scale,text); var svg = this.HandleVariant(variant,scale,text);
if (data[2]) {svg.x = data[2]*1000} if (data[2]) {svg.x = data[2]*1000}
if (data[3]) {svg.y = data[3]*1000} if (data[3]) {svg.y = data[3]*1000}
if (data[5]) {svg.h += data[5]*1000} if (data[5]) {svg.h += data[5]*1000}
if (data[6]) {svg.d += data[6]*1000} if (data[6]) {svg.d += data[6]*1000}
// FIXME handle data[4] (scale factor)
return svg; return svg;
}, },
extendDelimiterV: function (svg,H,delim,scale,font) { extendDelimiterV: function (svg,H,delim,scale,font) {
@ -645,6 +646,7 @@
var h = top.h + top.d + bot.h + bot.d; var h = top.h + top.d + bot.h + bot.d;
var y = -top.h; svg.Add(top,0,y); y -= top.d; var y = -top.h; svg.Add(top,0,y); y -= top.d;
if (delim.mid) {var mid = this.createChar(scale,delim.mid,font); h += mid.h + mid.d} if (delim.mid) {var mid = this.createChar(scale,delim.mid,font); h += mid.h + mid.d}
if (delim.min && H < h*delim.min) {H = h*delim.min}
if (H > h) { if (H > h) {
var ext = this.createChar(scale,delim.ext,font); var ext = this.createChar(scale,delim.ext,font);
var k = (delim.mid ? 2 : 1), eH = (H-h) / k, s = (eH+100) / (ext.h+ext.d); var k = (delim.mid ? 2 : 1), eH = (H-h) / k, s = (eH+100) / (ext.h+ext.d);
@ -668,6 +670,7 @@
svg.Add(left,-left.l,0); svg.Add(left,-left.l,0);
var w = (left.r - left.l) + (right.r - right.l), x = left.r - left.l; var w = (left.r - left.l) + (right.r - right.l), x = left.r - left.l;
if (delim.mid) {var mid = this.createChar(scale,delim.mid,font); w += mid.w} if (delim.mid) {var mid = this.createChar(scale,delim.mid,font); w += mid.w}
if (delim.min && W < w*delim.min) {W = w*delim.min}
if (W > w) { if (W > w) {
var rep = this.createChar(scale,delim.rep,font), fuzz = delim.fuzz || 0; var rep = this.createChar(scale,delim.rep,font), fuzz = delim.fuzz || 0;
var k = (delim.mid ? 2 : 1), rW = (W-w) / k, s = (rW+fuzz) / (rep.r-rep.l); var k = (delim.mid ? 2 : 1), rW = (W-w) / k, s = (rW+fuzz) / (rep.r-rep.l);
@ -677,8 +680,7 @@
if (delim.mid && k) {svg.Add(mid,x,0); x += mid.w} if (delim.mid && k) {svg.Add(mid,x,0); x += mid.w}
} }
} else if (delim.mid) { } else if (delim.mid) {
var dx = Math.min(w - W,left.w/2); x -= (w - W)/2; svg.Add(mid,x,0); x += mid.w - (w - W)/2;
x -= dx/2; svg.Add(mid,x,0); x += mid.w - dx/2;
} else { } else {
x -= (w - W); x -= (w - W);
} }
@ -835,8 +837,11 @@
Stretch: function () { Stretch: function () {
for (var i = 0, m = this.svg.length; i < m; i++) for (var i = 0, m = this.svg.length; i < m; i++)
{ {
var svg = this.svg[i]; var svg = this.svg[i], mml = svg.mml;
if (svg.mml) {svg = svg.mml.SVGstretchV(this.sh,this.sd)} if (mml) {
svg = mml.SVGstretchV(this.sh,this.sd);
mml.SVGdata.HW = this.sh; mml.SVGdata.D = this.sd;
}
if (svg.ic) {this.ic = svg.ic} else {delete this.ic} if (svg.ic) {this.ic = svg.ic} else {delete this.ic}
this.Add(svg,this.w,0,true); this.Add(svg,this.w,0,true);
} }
@ -985,6 +990,7 @@
SVGsaveData: function (svg) { SVGsaveData: function (svg) {
if (!this.SVGdata) {this.SVGdata = {}} if (!this.SVGdata) {this.SVGdata = {}}
this.SVGdata.w = svg.w, this.SVGdata.x = svg.x; this.SVGdata.w = svg.w, this.SVGdata.x = svg.x;
this.SVGdata.h = svg.h, this.SVGdata.d = svg.d;
if (svg.X != null) {this.SVGdata.X = svg.X} if (svg.X != null) {this.SVGdata.X = svg.X}
if (this["class"]) {svg.removeable = false; SVG.Element(svg.element,{"class":this["class"]})} if (this["class"]) {svg.removeable = false; SVG.Element(svg.element,{"class":this["class"]})}
// FIXME: if an element is split by linebreaking, the ID will be the same on both parts // FIXME: if an element is split by linebreaking, the ID will be the same on both parts
@ -1013,8 +1019,8 @@
svg.removeable = false; svg.removeable = false;
svg.element.setAttribute("className","mjx-svg-"+this.type); svg.element.setAttribute("className","mjx-svg-"+this.type);
} }
var style = this.Get("style"); var style = this.style;
if (style) { if (style && svg.element) {
svg.element.style.cssText = style; svg.element.style.cssText = style;
if (svg.element.style.fontSize) {svg.element.style.fontSize = ""} // handled by scale if (svg.element.style.fontSize) {svg.element.style.fontSize = ""} // handled by scale
svg.element.style.border = svg.element.style.padding = ""; svg.element.style.border = svg.element.style.padding = "";
@ -1091,7 +1097,7 @@
if (values.background !== MML.COLOR.TRANSPARENT) { if (values.background !== MML.COLOR.TRANSPARENT) {
if (svg.element.nodeName !== "g" && svg.element.nodeName !== "svg") { if (svg.element.nodeName !== "g" && svg.element.nodeName !== "svg") {
var g = SVG.Element("g"); g.appendChild(svg.element); var g = SVG.Element("g"); g.appendChild(svg.element);
svg.element = g; svg.removable = true; svg.element = g; svg.removeable = true;
} }
svg.Add(BBOX.RECT(svg.h,svg.d,svg.w,{fill:values.background,stroke:"none"}),0,0,false,true) svg.Add(BBOX.RECT(svg.h,svg.d,svg.w,{fill:values.background,stroke:"none"}),0,0,false,true)
} }
@ -1183,7 +1189,7 @@
values.scriptminsize = SVG.length2em(this.Get("scriptminsize"))/1000; values.scriptminsize = SVG.length2em(this.Get("scriptminsize"))/1000;
if (scale < values.scriptminsize) {scale = values.scriptminsize} if (scale < values.scriptminsize) {scale = values.scriptminsize}
} }
scale *= SVG.length2em(values.mathsize)/1000; if (this.isToken) {scale *= SVG.length2em(values.mathsize)/1000}
return scale; return scale;
}, },
SVGgetMu: function (svg) { SVGgetMu: function (svg) {
@ -1233,17 +1239,24 @@
} }
}); });
MML.entity.Augment({ MML.entity.Augment({
toSVG: function (variant,scale) { toSVG: function (variant,scale,remap,chars) {
return this.SVGhandleVariant(variant,scale,this.toString().replace(/[\u2061-\u2064]/g,"")); // remove invisibles var text = this.toString().replace(/[\u2061-\u2064]/g,""); // remove invisibles
if (remap) {text = remap(text,chars)}
return this.SVGhandleVariant(variant,scale,text);
} }
}); });
MML.mo.Augment({ MML.mo.Augment({
toSVG: function () { toSVG: function (HW,D) {
this.SVGgetStyles(); this.SVGgetStyles();
var svg = this.svg = this.SVG(); this.SVGhandleSpace(svg); var svg = this.svg = this.SVG(); this.SVGhandleSpace(svg);
if (this.data.length == 0) {svg.Clean(); this.SVGsaveData(svg); return svg} if (this.data.length == 0) {svg.Clean(); this.SVGsaveData(svg); return svg}
// //
// Stretch the operator, if that is requested
//
if (D != null) {return this.SVGstretchV(HW,D)}
else if (HW != null) {return this.SVG.strechH(HW)}
//
// Get the variant, and check for operator size // Get the variant, and check for operator size
// //
var scale = this.SVGgetScale(), variant = this.SVGgetVariant(); var scale = this.SVGgetScale(), variant = this.SVGgetVariant();
@ -1263,6 +1276,11 @@
else if (under && this === under.CoreMO() && parent.Get("accentunder")) {mapchars = SVG.FONTDATA.REMAPACCENTUNDER} else if (under && this === under.CoreMO() && parent.Get("accentunder")) {mapchars = SVG.FONTDATA.REMAPACCENTUNDER}
} }
// //
// Primes must come from another font
//
if (isScript && this.data.join("").match(/['`"\u00B4\u2032-\u2037\u2057]/))
{variant = SVG.FONTDATA.VARIANT["-TeX-variant"]}
//
// Typeset contents // Typeset contents
// //
for (var i = 0, m = this.data.length; i < m; i++) { for (var i = 0, m = this.data.length; i < m; i++) {
@ -1349,7 +1367,7 @@
svg.y = H - svg.h; svg.y = H - svg.h;
this.SVGhandleSpace(svg); this.SVGhandleSpace(svg);
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
delete this.svg; delete this.svg.element;
this.SVGsaveData(svg); this.SVGsaveData(svg);
return svg; return svg;
}, },
@ -1365,7 +1383,7 @@
svg = SVG.createDelimiter(this.data.join("").charCodeAt(0),w,svg.scale,values.mathvariant); svg = SVG.createDelimiter(this.data.join("").charCodeAt(0),w,svg.scale,values.mathvariant);
this.SVGhandleSpace(svg); this.SVGhandleSpace(svg);
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
delete this.svg; delete this.svg.element;
this.SVGsaveData(svg); this.SVGsaveData(svg);
return svg; return svg;
} }
@ -1386,7 +1404,10 @@
return svg; return svg;
} else if (SVG.config.mtextFontInherit) { } else if (SVG.config.mtextFontInherit) {
svg = this.SVG(); this.SVGhandleSpace(svg); svg = this.SVG(); this.SVGhandleSpace(svg);
svg.Add(BBOX.TEXT(scale,this.data.join(""))); svg.Clean(); var variant = this.SVGgetVariant(), def = {};
if (variant.bold) {def["font-weight"] = "bold"}
if (variant.italic) {def["font-style"] = "italic"}
svg.Add(BBOX.TEXT(scale,this.data.join(""),def)); svg.Clean();
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
this.SVGsaveData(svg); this.SVGsaveData(svg);
return svg; return svg;
@ -1428,8 +1449,8 @@
while (svg.element.firstChild) {svg.element.removeChild(svg.element.firstChild)} while (svg.element.firstChild) {svg.element.removeChild(svg.element.firstChild)}
} }
this.SVGhandleColor(svg); this.SVGhandleColor(svg);
if (!svg.element.firstChild) {delete svg.element}
this.SVGsaveData(svg); this.SVGsaveData(svg);
if (svg.removeable && !svg.element.firstChild) {delete svg.element}
return svg; return svg;
} }
}); });