For those without MathML-capable browsers,
we present MathJax. It's crappy 'n slow,
but it's better than nothing.
This commit is contained in:
Jacques Distler 2010-10-17 22:30:56 -05:00
parent cebd381d0d
commit 1663d9f5c8
441 changed files with 13053 additions and 0 deletions

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/FontWarnings.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['(','function','(d,g){var f="1.0";var b=d.Insert({','messageStyle',':{position:"','fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000','","background-color":"#','E0E0E0",padding:"1em","font-size":"small","white-space":"normal","','border-radius":".','75em','","-webkit-',8,9,'","-moz-',8,9,'","-khtml-',8,9,'","','box-shadow":"4px 4px 10px #AAAAAA',10,20,13,20,16,20,'",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color=\'gray\', Positive=\'true\')"},Message:{webFont',':[["closeBox"],"MathJax is ','using',' web-based fonts',' to display',' the mathematics',' ","on this page. These take time to download, so the page would","render faster if you installed math fonts directly in your ","system\'s font folder.",["fonts"]],imageFonts',28,'using its',' image fonts',' rather than local or',30,'. ","This will render slower than usual, and',32,' may not print ","at the full resolution of your printer','.",["fonts"],["webfonts','"]],noFonts',28,'unable to locate a font to use',31,' ","its mathematics, and',36,' are not available, so it ","is falling back on generic unicode characters in hopes that ","your browser will be able',31,' them. Some characters ","may not show up properly, or possibly not at all',42,'"]]},HTML:{closeBox:[["div",{style',4,'absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer',6,'EEEEEE",color:"#606060","',8,'5em',10,8,'5em',13,8,'5em',16,8,'5em"},onclick:',1,'(){if(c.div&&c.fade===0){if(c.timer){clearTimeout(c.timer)}','c.div.style.display="none','"}}},[["span",{style',4,'relative",bottom:".2em"}},["x"]]]]],webfonts:[["p"],"Most modern browsers allow for fonts to be downloaded over the web. ","Updating to a more recent version of your browser (or changing browsers) ","could improve the quality of',32,' on this page."],fonts:[["p"],"MathJax can use either',' the ",["a",{href:"http://www.stixfonts.org/",target:"_blank"},"STIX fonts','"]," or',' the ",["a",{href:"http://www.mathjax.org/help/fonts/",target:"_blank"},["MathJax TeX fonts"]],". Download and install ','either one',' to improve your MathJax experience','."],STIXfonts:[["p"],"This page is designed to use',77,'"],". Download and install those fonts',81,'."],TeXfonts:[["p"],"This page is designed to use',79,'those fonts',81,'."]},','removeAfter',':12*1000,','fadeoutSteps',':10,','fadeoutTime',':1.5*1000},(d.config.FontWarnings||{}));var c={div:null,fade:0};var a=',1,'(k){if(c.div){return}','var h=MathJax.OutputJax["HTML-CSS"],l=','document.body',';if(d.Browser.isMSIE){if(b.',3,'.position','==="fixed"){MathJax.Message.Init();l=document.getElementById("MathJax_MSIE_frame");b.',3,103,'="absolute"}}else{delete b.',3,'.filter}b.',3,'.maxWidth=(',100,'.clientWidth-75)+"px";var j=0;while(j<k.length){if(k[j] instanceof Array&&b.HTML[k[j][0]]){k.splice.apply(k,[j,1].concat(b.HTML[k[j][0]]))}else{j++}}c.div=h.addElement(l,"div",{id:"MathJax_FontWarning",style:b.',3,'},k);if(b.',91,'){d.Register.StartupHook("End",',1,'(){c.timer=','setTimeout(e,b.',91,')})}g.Cookie.Set("fontWarn",{warned:true})};var e=',1,'(){c.fade++;if(c.timer){delete c.timer}if(c.fade<b.',93,'){var h=1-c.fade/b.',93,';c.div.style.','opacity=h',128,'filter="alpha(opacity="+Math.floor(100*h)+")";',120,95,'/b.',93,')}else{',71,'"}};if(!g.Cookie.Get("fontWarn").warned){d.Startup.signal.Interest(',1,'(k){if(k.match(/HTML-CSS Jax - /)&&!c.div){',99,'h.config.availableFonts,j;var i=(l&&l.length);if(!i){b.HTML.fonts=[""]}else{if(l.length===1){b.HTML.fonts=b.HTML[l[0]+"fonts"]}}if(h.allowWebFonts){b.HTML.webfonts=[""]}','if(k.match(/- ','Web-Font/)){if(i){j="webFont"}}else{',143,'using',36,'/)){j="imageFonts"}else{',143,'no valid font/)){j="noFonts"}}}if(j&&b.Message[j]){a(b.Message[j])}}})}})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/FontWarnings.js");']
]);

18
public/MathJax/extensions/MathMenu.js vendored Normal file

File diff suppressed because one or more lines are too long

18
public/MathJax/extensions/MathZoom.js vendored Normal file

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

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/autobold.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.','Hub.Register.StartupHook("TeX Jax Ready",function(){var b="1.0";var c=',0,'InputJax.TeX;var a=','c.prefilterMath',';',4,'=function(g,h,e){var f=e.parentNode.insertBefore(document.createElement("span"),e);f.visibility="hidden";f.style.fontFamily="Times, serif";f.appendChild(document.createTextNode("ABCXYZabcxyz"));var d=f.offsetWidth;f.style.fontWeight="bold";if(f.offsetWidth==d){g="\\\\bf {"+g+"}"}f.parentNode.removeChild(f);return a.call(c,g,h,e)};',0,'Hub.Startup.signal.Post("TeX autobold Ready")});',0,'Ajax.loadComplete("[MathJax]/extensions/TeX/autobold.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/boldsymbol.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Hub.Register.StartupHook("','TeX',' Jax Ready",function(){var ','c="1.0";var a=','MathJax.','ElementJax.mml;var e=',4,'InputJax.TeX;var b=e.Definitions;var d={};d[','a.VARIANT.','NORMAL]=',8,'BOLD;d[',8,'ITALIC]=',8,'BOLDITALIC;d[',8,'FRAKTUR]=',8,'BOLDFRAKTUR;d[',8,'SCRIPT]=',8,'BOLDSCRIPT;d[',8,'SANSSERIF]=',8,'BOLDSANSSERIF;d','["-tex-caligraphic','"]="-tex-','caligraphic-bold";d','["-tex-oldstyle',29,'oldstyle-bold";b.macros.boldsymbol="Boldsymbol";e.Parse.Augment({mmlToken:function(g){if(','this.stack.env.boldsymbol','){var f=','g.Get("','mathvariant','");if(f==null){g.',37,'=',8,'BOLD}else{g.',37,'=(d[f]||f)}}return g},Boldsymbol:function(i',35,34,',g=','this.stack.env.font',';',34,'=true;',48,'=null;var h=this.ParseArg(i);',48,'=g;',34,'=f;this.Push(h)}})});',0,'HTML-CSS',2,'a=',4,'OutputJax["',59,'"];var c=a.FONTDATA.FONTS;var b=a.FONTDATA.VARIANT;','if(a.fontInUse==="','TeX"){c["MathJax_Caligraphic-bold"]="Caligraphic/Bold/Main.js";b',28,'-bold"]={fonts:["MathJax_Caligraphic-bold","MathJax_Main-bold","MathJax_Main","MathJax_Math","MathJax_Size1','"],offsetA:65,variantA:"','bold-italic','"};b',31,69,'"]};if(','a.msieCheckGreek','&&a.Font.testFont({family:"','MathJax_Greek','",weight:"bold",style:"italic",testString:',76,'})){b["',71,'"].offsetG=913;b["',71,'"].variantG="-','Greek-Bold-Italic','";b["-',86,'"]={fonts:["',78,'-',71,'"]};c["',78,'-',71,'"]="Greek/BoldItalic/Main.js"}if(','MathJax.Hub.Browser.','isChrome&&!',98,'versionAtLeast("5.0")){b',28,'-bold"].remap={84:[58096,"-WinChrome"]}}}else{',66,'STIX"){b',28,'-bold"]={fonts:["STIXGeneral-bold','-italic','","STIXNonUnicode','-',71,109,'","STIXGeneral","STIXSizeOneSym"],','offsetA:57927,noLowerCase:1};b',31,107,109,'-bold',113,'offsetN:57955,remap:{57956:57959,57957:57963,57958:57967,57959:57971,57960:57975,57961:57979,57962:57983,57963:57987,57964:57991}}}}',4,'Hub.Startup.signal.Post("TeX boldsymbol Ready")});',4,'Ajax.loadComplete("[MathJax]/extensions/TeX/boldsymbol.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/mathchoice.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.','Hub.Register.StartupHook("TeX Jax Ready",function(){var c="1.0";var a=',0,'ElementJax.mml;var d=',0,'InputJax.TeX;var b=d.Definitions;b.macros.','mathchoice','="','MathChoice','";d.Parse.Augment({',8,':function','(f){var i','=this.ParseArg(f','),e',13,'),g',13,'),h',13,');this.Push(a.','TeXmathchoice','(i,e,g,h))}});a.',21,'=a.mbase.Subclass({type:"',21,'",choice',11,'(){var e=this.getValues("displaystyle","','scriptlevel','");if(e.',29,'>0){return Math.min(3,e.',29,'+1)}return(e.displaystyle?0:1)},','setTeXclass',11,'(e){return this.','Core().',35,'(e)},','isSpacelike',':function(){return this.',38,41,'()},','isEmbellished',42,38,46,'()},Core',42,'data[this.choice()]},toHTML',11,'(e){e=this.HTMLcreateSpan(e);e.bbox=this.',38,'toHTML(e).bbox;return e}});',0,'Hub.Startup.signal.Post("TeX ',6,' Ready")});',0,'Ajax.loadComplete("[MathJax]/extensions/TeX/',6,'.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/newcommand.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Hub.','Register.StartupHook("TeX Jax Ready",function(){var b="1.0";var c=MathJax.InputJax.TeX;var a=c.Definitions;',0,'Insert(a,{macros:{','newcommand',':"','NewCommand','",renewcommand:"',6,'",newenvironment:"','NewEnvironment','",def:"MacroDef"}});c.Parse.Augment({',6,':function(','d){var e=this.','trimSpaces(','this.GetArgument','(d)),g','=this.trimSpaces(this.GetBrackets(','d)),f=',16,'(d);if(g===""){g=null}if(e.charAt(0)==="\\\\"){e=e.substr(1)}if(!e.match(/^(.|[a-z]+)$/i)){','c.Error("','Illegal',' control sequence',' name for "+d)}if(g!=null&&!g','.match(/^[0-9]+$/)){c.Error("Illegal number of parameters specified in "+','d)}','a.macros[e]=["Macro",f,g',']},',10,13,'e){var f=this.trimSpaces(',16,'(e)),h',18,'e)),g=',16,'(e),d=',16,'(e);if(h===""){h=null}if(h!=null&&!h',26,'e)}','a.environment[','f',']=["BeginEnv","EndEnv','",g,d,h]},MacroDef',13,14,'GetCSname','(d),g=this.','GetTemplate','(d,"\\\\"+e),f=',16,'(d);if(!(g instanceof Array)){',28,']}else{a.macros[e]=["','MacroWithTemplate','",f,g[0],g[1]]}},',49,13,'e){var f=','this.GetNext();','if(f!=="\\\\"){c.Error("\\\\ must be followed by a',24,'")}','var d=this.','trimSpaces(',16,'(e));return d.substr(1)},',51,13,'f,e){var j,g=[],h=0;j=',62,66,'i',';while(this.i<this.string.length){','j=',62,'if(j==="#"){','if(d!==this.i){g[h]=this.string.substr(d,this.i-d)}','j=','this.string.','charAt(++this.i);if(!j.match(/^[1-9]$/)){',22,'Illegal use of # in template for "+e)}if(parseInt(j)!=++h){',22,'Parameters for "+e+" must be numbered sequentially")}d=this.i+1}else{if(j==="{"){',80,'if(g.length>0){return[h,g]}else{return h}}}this.i++}',22,'Missing replacement string for definition of "+f)},',57,13,'e,h,j,g){if(j){var d=[];',62,'if(g[0]&&!this.','MatchParam','(g[0])){',22,'Use of "+e+" doesn\'t match its definition")}','for(var f=0;f<','j;f++){d.push(this.','GetParameter','(e,g[f+1]))}h','=this.SubstituteArgs(','d,h)}','this.string=this.AddArgs(','h',',this.string.slice(this.i));this.i=0','},BeginEnv',13,'g,j,d,h){if(h){var e=[];',101,'h;f++){e.push(',16,'("\\\\begin{"+name+"}"))}j',105,'e,j);d',105,'e,d)}g.edef=d;',107,'j',109,';return ','g},EndEnv',13,'d,e){',107,'d.edef',109,124,'e},',103,13,'e,h){if(h==null){return ',16,'(e)}var g=this.i,d=0,f=0',76,'if(',82,'charAt(this.i)==="{"){if(this.i===g){f=1}',16,'(e);d=this.i-g}else{if(this.',97,'(h)){if(f){g++;d-=2}return ',82,'substr(g,d)}else{this.i++;d++;f=0}}}',22,'Runaway argument for "+e+"?")},',97,13,'d){if(',82,'substr(this.i,d.length)!==d){return 0}this.i+=d.length',124,'1}});c.Environment=function(d){',43,'d',45,'"].concat([].slice.call(arguments,1))};',0,'Startup.signal.Post("TeX ',4,' Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/',4,'.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/noErrors.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['(function(){var c="1.0";','MathJax.Extension["TeX/noErrors','"]={version:c,config:','MathJax.Hub.','Insert({','multiLine',':true,','inlineDelimiters',':["",""],style:{"font-family":"serif","font-size":"80%","text-align":"left",color:"black",padding:"1px 3px",border:"1px solid"}},((',3,'config.TeX||{}).noErrors||{}))};var a=',1,'"].config;var ','b=String.fromCharCode(160);',3,'Config({TeX:{Augment:{formatError:function(f,e,g,d){var i=a.',7,';var h=(g||a.',5,');if(!g){e=i[0]+e+i[1]}if(h){e=e.replace(/ /g,b)}else{e=e.replace(/\\n/g," ")}return ','MathJax.ElementJax.mml','.merror','(e).With({isError',6,5,':h})}}},"','HTML-CSS','":{styles:{".','MathJax .merror','":',3,'Insert({"font-style":null,"background-color":null,"vertical-align":(',3,'Browser.isMSIE&&a.',5,'?"-2px":"")},a.style)}}})})();',3,'Register.StartupHook("',26,' Jax Ready",function(){var ','a=',20,';var b=MathJax.OutputJax["',26,'"];var c=a.math','.prototype.toHTML',';a.math','.Augment({toHTML:function(','d,e','){if(this.data[0]&&this.data[0].data[0]&&this.data[0].data[0].isError){return this.data[0].data[0].','toHTML','(d)}return c.call(this,d',',e)}});a',21,47,'j','){if(!this.isError){return ','a.mbase',45,'.call(this,','j)}j=this.HTMLcreateSpan(j);','if(this.',5,'){j','.style.display="inline-block','"}var l','=this.data[0].data[0].data.join("").split(/\\n/);for(var ','g=0,e=l.length;g<e;g++){b.addText(j,l[g]);if(g!==e-1){b.addElement(j,"br")}}var n=b.getHD(','j.parentNode','),d=b.getW(',68,');if(e>1){var k=(n.h+n.d)/2,h=b.TeX.x_height/2;var f=b.config.styles[".',28,'"]["font-size"];if(f&&f.match(/%/)){h*=parseInt(f)/100}',68,'.style.verticalAlign','=b.Em(n.d+(h-k));n.h=h+k;n.d=k-h}j.bbox={h:n.h,d:n.d,w:d,lw:0,rw:d};return j','}});MathJax.Hub.Startup.signal.Post("TeX noErrors Ready")});MathJax.','Hub.',37,'NativeMML',39,'b=',20,';var a=',1,12,'c=b.math','.prototype.toNativeMML',';b.math','.Augment({toNativeMML:function(','d',49,'toNativeMML',51,')}});b',21,90,'g',56,'b.mbase',88,59,'g)}g=','g.appendChild(document.','createElement("','span"));var h',66,'f=0,e=h.length;f<e;f++){',104,'createTextNode(h[f]));if(f!==e-1){',104,105,'br"))}}',61,5,'){g',64,'";if(e>1){g',75,'="middle"}}for(var j in a.style){if(a.style.hasOwnProperty(j)){var d=j.replace(/-./g,function(i){return i.charAt(1).toUpperCase()});g.style[d]=a.style[j]}}return g',77,'Ajax.loadComplete("[MathJax]/extensions/TeX/noErrors.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/noUndefined.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Extension["TeX/noUndefined','"]={version:"1.0",config:','MathJax.Hub.','Insert({attributes:{mathcolor:"red"}},((',2,'config.TeX||{}).','noUndefined','||{}))};',2,'Register.StartupHook("TeX Jax Ready",function(){var b=',0,'"].config;var a=MathJax.ElementJax.mml;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(c){this.Push(a.mtext(c).With(b.attributes))}});',2,'Startup.signal.Post("TeX ',6,' Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/',6,'.js");']
]);

View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/unicode.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Extension["TeX/unicode','"]={version:"1.0",unicode:{},config:','MathJax.Hub.','Insert({fonts:"STIXGeneral,\'Arial Unicode MS\'"},((',2,'config.TeX||{}).unicode||{}))};','MathJax.Hub.Register.StartupHook("','TeX',' Jax Ready",function(){var ','d=MathJax.InputJax.TeX;var ','a=MathJax.','ElementJax.mml;var c=',0,'"].config.fonts;var b=',0,'"].unicode;','d.Definitions.macros.unicode="Unicode";d.Parse.Augment({Unicode:function(f){var j','=this.GetBrackets(f','),e;if(j){j=j.replace(/ /g,"");if(j.match(/^(\\','d+(\\.\\d*)?|\\.\\d','+),(\\',19,'+)$/)){j=j.split(/,/);e',17,')}else{e=j;j=null}}var k=this.trimSpaces(this.GetArgument(f)),i=parseInt(k.match(/^x/)?"0"+k:k);b[i]=[800,200,500,0,500,{isUnknown:true,isUnicode:true,font:c}];if(j){b[i][0',']=Math.floor(j[','0]*1000);b[i][1',25,'1]*1000)}var g=this.stack.env.font,h={};if(e){h.fontfamily=e;if(g){if(g.match(/bold/)){h.fontweight="bold"}if(g.match(/italic/)){h.fontstyle="italic"}}b[i][5].font=e+","+c}else{if(g){h.mathvariant=g}}this.Push(a.mtext(a.entity("#"+k)).With(h))}})});',6,'HTML-CSS',8,10,'OutputJax["',30,'"];var c=',0,15,'var b=a.lookupChar;a.Augment({lookupChar:function(e,f){var d=b.call(this,e,f);if(d[f][5]&&d[f][5].isUnknown&&c[f]){d[f]=c[f]}return d}});',2,'Startup.signal.Post("TeX unicode Ready")});MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/unicode.js");']
]);

18
public/MathJax/extensions/TeX/verb.js vendored Normal file
View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/TeX/verb.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.','Hub.Register.StartupHook("TeX Jax Ready",function(){var c="1.0";var a=',0,'ElementJax.mml;var d=',0,'InputJax.TeX;var b=d.Definitions;b.macros.verb="Verb";d.Parse.Augment({Verb:function(e){var h=this.GetNext();var g=++this.i;if(h==""){d.Error(e+" requires an argument")}while(this.i<','this.string.','length&&',6,'charAt(this.i)!=h){this.i++}if(this.i==',6,'length){d.Error("Can\'t find closing delimiter for "+e)}var f=',6,'slice(g,this.i);this.i++;this.Push(a.mtext(f).With({mathvariant:a.VARIANT.MONOSPACE}))}});',0,'Hub.Startup.signal.Post("TeX verb Ready")});',0,'Ajax.loadComplete("[MathJax]/extensions/TeX/verb.js");']
]);

18
public/MathJax/extensions/jsMath2jax.js vendored Normal file
View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/jsMath2jax.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Extension.jsMath2jax','={version:"1.0",config:{element:null,','preview',':"TeX"},','PreProcess',':function(','b){if(!','this.configured','){','MathJax.Hub.','Insert(this','.config,(',9,'config.jsMath2jax||{}));if(','this.config.','Augment','){',9,10,',',14,15,')}','if(typeof(',14,'previewTeX',')!=="undefined"&&!',14,25,'){',14,2,'="none"}this.previewClass=',9,'config.preRemoveClass',';',7,'=true}',23,'b)==="string"){b=document.getElementById(b)}if(!b){b=',14,'element||document.body}var c','=b.getElementsByTagName("','span"),a;for(a=c','.length-1;a>=0;a--){if(String(','c','[a].className).match(/\\bmath\\b/)){this.ConvertMath(','c[a],"")}}var d',42,'div");for(a=d',44,'d',46,'d[a],"; mode=display")}}},ConvertMath',5,'c,d){var b=c','.parentNode',',a=this.','createMathTag','(d,c.innerHTML);if(c.nextSibling){b','.insertBefore(','a,c.nextSibling)}else{b.appendChild(a)}if(',14,2,'!=="none"){this.','createPreview','(c)}b.removeChild(c)},',65,5,'a){var b;if(',14,2,'==="TeX"){b=[this.filterTeX(a.innerHTML)]}else{if(',14,2,' instanceof Array){b=',14,2,'}}if(b){b=MathJax.HTML.Element("span",{className:',9,34,'},b);a',56,60,'b,a)}},',58,5,'c,b){var a=document.createElement("script");a.type="math/tex"+c;if(',9,'Browser.isMSIE){a.text=b}else{a.appendChild(document.createTextNode(b))}return a},filterTeX',5,'a){return a}};',9,'Register.PreProcessor(["',4,'",',0,']);MathJax.Ajax.loadComplete("[MathJax]/extensions/jsMath2jax.js");']
]);

18
public/MathJax/extensions/mml2jax.js vendored Normal file
View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/mml2jax.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Extension.mml2jax','={varsion:"1.0.1",config:{element:null,preview:"alttext"},MMLnamespace:"http://www.w3.org/1998/Math/MathML",','PreProcess',':function(','b){if(!','this.configured','){','MathJax.Hub.','Insert(','this.config',',(',7,'config.','mml2jax||{}));if(',9,'.Augment','){',7,8,'this,',9,15,')}',5,'=true}if(typeof(b)==="string"){b=document.getElementById(b)}if(!b){b=',9,'.element||document.body}var c=b.getElementsByTagName("math"),a;if(c.length===0&&','b.getElementsByTagNameNS','){c=',27,'(this.MMLnamespace,"math")}if(this.','msieMathTagBug','){','for(a=c.length-1;a>=0;a--){','if(c[a].nodeName==="MATH"){this.','msieProcessMath','(c[a])}else{','this.ProcessMath(c[a','])}}}else{',33,37,'])}}},ProcessMath',3,'e){var d','=e.parentNode;var a=document.createElement("script");a.type="math/mml";','d','.insertBefore(','a,e);if(this.msieScriptBug){var b=e.outerHTML;b=b.replace(/<\\?import .*?>/,"").replace(/<\\?xml:namespace .*?\\/>/,"");b=b.replace(/<(\\/?)m:/g,"<$1").replace(/&nbsp;/g,"&#xA0;");a.text=b;d.removeChild(e)}else{var ','c=MathJax.HTML.Element("span','");c.appendChild(e);MathJax.HTML.addText(a,c.innerHTML)}','if(this.config.preview!=="none"){this.createPreview(e,a)}},',35,3,'e){var c',44,'c',46,'a,e);var b="";while(e&&','e.nodeName','!=="/MATH"){if(',58,'==="#text"||',58,'==="#comment"){b+=e.nodeValue.replace(/&/g,"&#x26;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}else{b+=this.','toLowerCase','(e.outerHTML)}var d=e;e=e.nextSibling;d','.parentNode.removeChild(','d)}if(e&&',58,'==="/MATH"){e',66,'e)}a.text=b+"</math>";',50,64,3,'b){var d=b.split(/"/);for(var c=0,a=d.length;c<a;c+=2){d[c]=d[c].',64,'()}return d.join(\'"\')},createPreview',3,'b,a){var c;if(',9,'.preview','==="alttext"){var d=b.getAttribute("alttext");if(d!=null){c=[this.filterText(d)]}}else{if(',9,81,' instanceof Array){c=',9,81,'}}if(c){',48,'",{className:',7,12,'preRemoveClass},c);a.parentNode',46,'c,a)}},filterText',3,'a){return a}};',7,'Browser.Select({MSIE',3,'a){',7,8,0,',{msieScriptBug:true,',31,':true})}});',7,'Register.PreProcessor(["',2,'",',0,']);MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");']
]);

18
public/MathJax/extensions/tex2jax.js vendored Normal file
View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/tex2jax.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Extension.tex2jax','={version:"1.0",config:{element:null,','inlineMath',':[["$","$"],["\\\\(","\\\\)"]],','displayMath',':[["$$","$$"],["\\\\[","\\\\]"]],skipTags:["script","noscript","style","textarea","pre","code"],','ignoreClass',':"tex2jax_ignore",','processClass',':"tex2jax_process",','processEscapes',':false,','processEnvironments',':true,preview:"TeX"},','PreProcess',':function(','a){if(!','this.configured','){','MathJax.Hub.','Insert(','this.config',',(',19,'config.','tex2jax||{}));if(',21,'.Augment','){',19,'Insert(this,',21,27,')}','if(typeof(',21,'.previewTeX',')!=="undefined"&&!',21,36,'){',21,'.preview','="none"}',17,'=true}',34,'a)==="','string"){a=','document.','getElementById(a)}if(!a){a=',21,'.element||',49,'body}this.','createPatterns','();this.','scanElement','(a,a','.nextSibling',')},',55,':function(){var d=[],c,a,b=',21,';this.match={};','for(c=0,a=b.',2,'.length;c<a;c++){d.push(this.patternQuote(b.',2,'[c][0]));this.match[b.',2,'[c][0]]={mode:"",','end:b.',2,'[c][1],pattern:this.endPattern(b.',2,'[c][1])}}',65,4,67,4,69,4,'[c][0]]={','mode:"; mode=display",',72,4,74,4,76,'this.start','=','new RegExp','(d.sort(this.sortLength).join("|")+(b.',12,'?"|\\\\\\\\begin\\\\{([^}]*)\\\\}":"")+(b.',10,'?"|\\\\\\\\*\\\\\\\\\\\\$":""),"g");this.skipTags=',92,'("^("+b.skipTags.join("|")+")$","i");this.',6,'=new RegExp("(^| )("+b.',6,'+")( |$)");this.',8,101,8,'+")( |$)")},','patternQuote',15,'a){return ','a','.replace','(/([\\^$(){}+*?\\-|\\[\\]\\:\\\\])/g,"\\\\$1")},endPattern',15,110,92,'(this.',108,'(a)+"|\\\\\\\\.","g")},sortLength',15,'d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d<c?-1:1))},',57,15,'c,b,e){var a,d;while(c&&c!=b){if(c','.nodeName.toLowerCase()==="#','text"){if(!e){c=this.scanText(c)}}else{a','=(typeof(c.','className',')==="undefined"?"":c.',128,');d',127,'tagName',129,133,');',34,'a)!=="',48,'String(a)}if','(c.firstChild','&&!a.match(/(^| )MathJax/)&&!this.skipTags.exec(d)){e=(e||this.',6,'.exec(a))&&!this.',8,'.exec(a);this.',57,141,',b,e)}}if(c){c=c',59,'}}},scanText',15,'b){if(b','.nodeValue',112,'(/\\s+/,"")==""){return b}var a,c;','this.search','={start:true};','this.pattern','=',90,';while(b){','this.pattern.lastIndex','=0;while(b&&b',125,'text"&&(a=',159,'.exec(b',154,'))){if(',157,'.start){b=this.startMatch(a,b)}else{b=this.endMatch(a,b)}}if(',157,'.matched','){','b=this.encloseMath(b',')}if(b){do{c=b;b=b',59,'}while(b&&(b','.nodeName','.toLowerCase()==="br"||b',125,'comment"));if(!b||b',180,'!=="#text"){return c}}}return b},startMatch',15,'b,c){var d=this.match[b[0]];if(d!=null){',157,'={end:d.end,mode:d.mode,','open:c,olen:','b[0].length',',opos:',163,'-',191,'};','this.switchPattern(','d.pattern)}else{if(b[0].substr(0,6)==="\\\\begin"){',157,'={end:"\\\\end{"+b[1]+"}",',84,190,'0,opos:',163,'-',191,',isBeginEnd:true};',197,'this.endPattern(',157,'.end))}else{var a=b[0].replace(/\\\\(.)/g,"$1");c',154,'=c',154,'.substr(','0,b.index)+a+c',154,215,'b.index+',191,');',163,'-=',191,'-a.length}}return c},endMatch',15,'a,b){if(a[0]==',157,'.end){',157,'.close=b;',157,'.cpos=',163,';',157,'.clen=(',157,'.isBeginEnd?0:a[0].length);',157,174,'=true;',176,');',197,90,')}return b},switchPattern',15,'a){a.lastIndex=',163,';',159,'=a;',157,'.start=(a===',90,')},encloseMath',15,'b){var a=',157,',f=a.close,e;if(a.cpos===f.length){f=f',59,'}else{f=f.splitText(a.cpos)}if(!f){e=f=','a.close.parentNode','.appendChild(document.createTextNode','(""))}if(b===a.close){b=f}a.close=f;var c=a.open.splitText(a.opos);while(c',59,'&&c',59,'!==f){if(c',59,154,'!==null){if(c',59,180,'==="#comment"){c',154,'+=c',59,154,112,'(/^\\[CDATA\\[(.*)\\]\\]$/,"$1")}else{c',154,'+=c',59,154,'}}else{c',154,'+=" "}c','.parentNode.removeChild(','c',59,')}var d=c',154,215,'a.olen,c',154,'.length-a.olen-a.clen);c',290,'c);if(',21,42,'!=="none"){this.','createPreview','(a.mode,d',')}c=this.','createMathTag',305,');',157,'={};',163,'=0;if(e){e',290,'e)}return c},insertNode',15,259,157,';if(a.close&&',264,'){',264,'.insertBefore(b,a.','close)}else{if(a.open',59,'){a.open.parentNode',323,'open',59,')}else{a.open.parentNode.appendChild(b)}}},',304,15,'c,a){var b;if(',21,42,'==="TeX"){b=[this.filterTeX(a)]}else{if(',21,42,' instanceof Array){b=',21,42,'}}if(b){b=MathJax.HTML.Element("span",{',128,':',19,24,'preRemoveClass},b);','this.insertNode(','b)}},',307,15,'c,',259,49,'createElement("script");a.type="math/tex"+c;if(',19,'Browser.isMSIE){a.text=b}else{a',265,'(b))}',348,'a);return a},filterTeX',15,110,'a}};',19,'Register.PreProcessor(["',14,'",',0,']);MathJax.Ajax.loadComplete("[MathJax]/extensions/tex2jax.js");']
]);

18
public/MathJax/extensions/toMathML.js vendored Normal file
View file

@ -0,0 +1,18 @@
/*
* ../SourceForge/trunk/mathjax/extensions/toMathML.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['MathJax.Hub.Register.','LoadHook("[','MathJax',']/jax/element/mml/jax.js",','function(){','var b="1.0";var a=',2,'.ElementJax.mml;a.mbase','.Augment({toMathML:function(','k){var g=(this.inferred&&this.parent.inferRow);if(k==null){k=""}var e','=this.','type,d',10,'MathMLattributes','();if(e==="mspace"){','return k+"<"+e+d','+" />"}','var j=[];var h=(','this.isToken','?"":k+(g?"":" "));for(var f=0,c',10,'data.length;f<c;f++){if(','this.data[','f]){j.push(',22,'f].toMathML(h))}else{if(!',18,'){j.push(','h+"<mrow />")}}}if(',18,'){',15,'+">"+j.join("")+"</"+e+">"}if(g){return j.join("\\n")}if(j.length===0||(j.length===1&&j[0]==="")){',15,16,15,'+">\\n"+j.join("\\n")+"\\n"+k+"</"+e+">"},',13,':',4,'var j=[],g',10,'defaults;var c',10,'copyAttributes',',l',10,'skipAttributes',';','if(this.type==="','math"){j.push(\'xmlns="http://www.w3.org/1998/Math/MathML"\')}',49,'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',27,'d+\'="\'+','this.quoteHTML(','k)+\'"\')}this[d]=k}}}for(var h=0,f=c.length;h<f;h++){if(this[c[h]]!=null',27,'c[h]+\'="\'+',55,'this[c[h]])+\'"\')}}if(j.length){return" "+j.join(" ")}else{return""}},',44,':["fontfamily","fontsize","fontweight","fontstyle","color","background","id","class","href","style"],',47,':{texClass:1,useHeight:1,texprimestyle:1},quoteHTML: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',8,'h){var e=this.type;if(this.data[this.','sup',']==null){e="','msub"}if(',22,'this.sub',68,'msup','"}var d=this.MathMLattributes();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',8,66,'under',68,'mover"}if(',22,'this.over',68,'munder',74,'TeXAtom',8,'c){return',' c+"<mrow>\\n"+',22,'0].toMathML(c+" ")+"\\n"+c+"</mrow>"}});a.chars',8,88,'(c||"")+',55,'this.toString','())}});a.entity',8,88,'(c||"")+"&"+',22,'0]+";<!-- "+',96,'()+" -->"}});',0,'StartupHook("TeX mathchoice Ready",',4,'a.TeXmathchoice',8,88,' this.Core().toMathML(c)}})});',2,'.Hub.Startup.signal.Post("toMathML Ready")});',2,'.Ajax.loadComplete("[',2,']/extensions/toMathML.js");']
]);