MathJax
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:
parent
cebd381d0d
commit
1663d9f5c8
441 changed files with 13053 additions and 0 deletions
18
public/MathJax/extensions/TeX/AMSmath.js
vendored
Normal file
18
public/MathJax/extensions/TeX/AMSmath.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
public/MathJax/extensions/TeX/AMSsymbols.js
vendored
Normal file
18
public/MathJax/extensions/TeX/AMSsymbols.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
public/MathJax/extensions/TeX/autobold.js
vendored
Normal file
18
public/MathJax/extensions/TeX/autobold.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/boldsymbol.js
vendored
Normal file
18
public/MathJax/extensions/TeX/boldsymbol.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/mathchoice.js
vendored
Normal file
18
public/MathJax/extensions/TeX/mathchoice.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/newcommand.js
vendored
Normal file
18
public/MathJax/extensions/TeX/newcommand.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/noErrors.js
vendored
Normal file
18
public/MathJax/extensions/TeX/noErrors.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/noUndefined.js
vendored
Normal file
18
public/MathJax/extensions/TeX/noUndefined.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
18
public/MathJax/extensions/TeX/unicode.js
vendored
Normal file
18
public/MathJax/extensions/TeX/unicode.js
vendored
Normal 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
18
public/MathJax/extensions/TeX/verb.js
vendored
Normal 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");']
|
||||
]);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue