instiki/public/MathJax/jax/output/NativeMML/jax.js
Jacques Distler cca857ed3a Update MathJax
On Davide Cervone's advice,
I updated MathJax from the
1.0.1 release to the (less
buggy) Revision 615 of the
MathJax svn.
2010-10-25 09:21:44 -05:00

19 lines
7.7 KiB
JavaScript

/*
* ../SourceForge/trunk/mathjax/jax/output/NativeMML/jax.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(','b,a,e,d){var c=e.Browser.isMSIE;','a.Augment({','LEFTBUTTON',':(c?1:0),MENUKEY:"altKey",','noContextMenuBug',':e.Browser.isKonequeror,msieQuirks:(c&&!(document.compatMode==="BackCompat")),','config:{styles',':{}},settings:','e.config.menuSettings',',Startup:','function(){','return ','MathJax.','Ajax.Styles(','this.config.','styles)},Config:',12,'this.SUPER(arguments).Config','.call(this',');if(','this.settings.scale','){',16,'scale=',22,'}},Translate:',1,'h){if(!h','.parentNode','){return','}var l=h','.previousSibling',';if(l&&String(l.className).match(/^MathJax(_MathML|_Display)?$/)){l',30,'.removeChild(','l)}var k=h.',14,'elementJax.root;var j=(k.Get("display")==="block"?"div":"span");var i=document.','createElement','(j),g=i;i.className="','MathJax_MathML','";i.style.fontSize=',16,'scale+"%";if(c){g=','MathJax.HTML.addElement(','i,"span",{className:"MathJax_MathContainer",','style:{display:"inline-block",','position:"relative','"}})}k.','toNativeMML(','g);h',30,'.insertBefore(i,h);if(c){if(',16,'showMathMenuMSIE){this.MSIEoverlay(i)}}else{k=i','.firstChild',';k.','oncontextmenu','=this.','ContextMenu',';k.','onmouseover',60,'Mouseover',';k.','onmousedown',60,'Mousedown;k.onclick',60,'Click',';k.','ondblclick',60,'DblClick','}},Remove:',1,'g){','var h=','g.SourceElement();if(!h',31,'}h=h',33,';if(!h',31,'}if(h.className.match(/',42,'/)){h',30,36,'h)}},MMLnamespace:"http://www.w3.org/1998/Math/MathML",MSIEoverlay:',1,'n){var m=n',57,';','n.style.position','="absolute";var o','=n.scrollHeight',',i=n.offsetWidth;var k=',46,'n,"img",{src:"about:blank",style:{','width:0,height:','o+"px"}});var g',98,'-o;n',36,'k);',96,'="";var l,j,h=(n',30,'.nodeName.toLowerCase()==="','div");if(h&&this.quirks){l=-o;j=Math.floor(-i/2)}else{l=g-o,j=-i}',46,'n,"span",{',48,102,'0,',49,'"}},[["span",{',48,'position:"absolute",left:j+"px",top:l+"px",width:m.offsetWidth+"px",height:o+"px",cursor:"pointer","background-color":"white",filter:"alpha(opacity=0)"},',67,':this.MSIEevent',',',59,123,',onclick',123,',onmousemove',123,',',73,123,',',63,123,',onmouseout',123,'}]])},MSIEmath:',1,'g){',79,'g',30,33,57,';return(h',111,'span"?h',57,':h)},MSIEevent:',12,79,'a.MSIEmath(this);var g','=window.event',';var i=a["MSIE"+g.type];if(i&&i.call(a,g,h,this)){','return false','}h.fireEvent("on"+g.type,g);',157,'},MSIEmousedown:',1,'i,h,g){if(','i[this.MENUKEY]&&i.button===this.',4,'&&this','.settings.context','!=="','MathJax"){this.trapUp=this.trapClick=true;this.ContextMenu.call(g,i,true);return true}','if(','this.MSIEzoomKeys','&&',170,'(i)){this.trapUp=true;',13,'true}',157,'},MSIEcontextmenu:',1,162,'this',166,'==="',168,157,'},',61,':',1,'j,k','){if(a.config.showMathMenu','&&(a',166,'==="MathJax','"||k)){if(a.safariContextMenuBug','){setTimeout("','window.getSelection().empty()",0)}',79,14,'Menu;if(h){if(','document.selection',195,200,'.empty()",0)}var g=(c?this',30,30,'.nextSibling',':this',30,206,');h.jax=e.getJaxFor(g);h.menu.items[1].menu.items[1].name=(','h.jax.inputJax.id','==="MathML"?"Original":',211,');','delete ','a.trapClick;',215,'a.trapUp;',13,'h.menu.Post(j)}else{if(!','d.loadingMathMenu','){',221,'=true;if(!j){j',155,'}var i={pageX:j.pageX,pageY:j.pageY,clientX:j.clientX,clientY:j.clientY};',14,'Callback.Queue(','d.Require("[MathJax]/extensions/','MathMenu.js"),',12,215,221,'},[this,arguments.callee,i,k])}if(!j){j',155,'}if(','j.preventDefault','){',237,'()}if(','j.stopPropagation','){',241,'()}j.cancelBubble=true;j.returnValue=false;',157,'}}},Mousedown:',1,'g',190,'){if(!g){g',155,'}if(a',166,193,'"){if(!a.',6,'||g.button!==2',31,'}}else{if(!g[a.MENUKEY]||g.button!==a.',4,31,'}}',13,'a.',61,20,',g,true)}},',65,':',1,'g){a.HandleEvent(g,"',65,'",this)},',71,':',1,271,71,273,75,':',1,271,75,273,'HandleEvent:',1,'i,g,h){},NAMEDSPACE:{negativeveryverythinmathspace:"-.0556em",negativeverythinmathspace:"-.1111em",negativethinmathspace:"-.1667em",negativemediummathspace:"-.2222em",negativethickmathspace:"-.2778em",negativeverythickmathspace:"-.3333em",negativeveryverythickmathspace:"-.3889em"}});b.mbase','.Augment({toNativeMML:function(','k){',79,'this.NativeMMLelement','(this.type);','this.NativeMMLattributes(h);','for(var j=','0',',g=this.data.length;j<g;j++){if(this.data[j]){this.data[j].toNativeMML(h',')}else{h','.appendChild(',292,'("mrow"))}}k',299,'h)},NativeMMLattributes:',1,'h){var l',60,'defaults;var o',60,'NativeMMLcopyAttributes',',k',60,'NativeMMLskipAttributes',';if(this.type==="mstyle"){l=b.math.prototype.defaults}for(var n in l){if(!k[n]&&l.hasOwnProperty(n)){if(this[n]!=','null){h.setAttribute(','n,this.','NativeMMLattribute','(n,this[n]))}}}',295,'0,g=o.length;j<g;j++){if(this[o[j]]!=',314,'o[j],this.',316,'(o[j],this[o[j]]))}}},',309,':["fontfamily","fontsize","fontweight","fontstyle","color","background","id","class","href","style"],',312,':{texClass:1,useHeight:1,texprimestyle:1},',316,':',1,'h,g){g=String(g);if(a.NAMEDSPACE[g]){g=a.NAMEDSPACE[g]}else{if(g.match(/^\\s*([-+]?(\\d+(\\.\\d*)?|\\.\\d+))\\s*mu\\s*$/)){g=((1/18)*RegExp.$1)+"em','"}else{if(g==="-tex-','caligraphic"){g','="script',332,'oldstyle"){g="normal"}}}}',13,'g},NativeMMLelement:(c?',1,'g){return document.',40,'("mjx:"+g)}:',1,340,'createElementNS(a.MMLnamespace,g)})});b.mrow',289,'j){if(this.inferred&&this.parent.inferRow){for(',79,'0,g',60,'data.length;h<g;h++){if(this.data[h]){this.data[h].',51,'j)}else{j',299,292,'("mrow"))}}}else{','this.SUPER(arguments).toNativeMML.call(this,','j)}}});b.msubsup',289,'l){var k=this.type;if(this.data[this.','sup',']==null){k="','msub','"}if(this.data[this.','sub',362,'msup"}',79,292,'(k);',294,215,'this.data[0].','inferred;',295,'0',297,')}}l',299,'h)}});b.munderover',289,360,'under',362,'mover',364,'over',362,'munder"}',79,292,370,294,215,373,'inferred;',295,'0',297,')}}l',299,'h)}});if(',14,'Hub.Browser.isFirefox){b.mtable',289,'g){if(this.width){var h=(this.style||"").replace(/;\\s*$/,"").split(";");h.push("width:"+this.width);this.style=h.join(";")}',357,'g)}});b.mlabeledtr',289,'k){',79,292,'("mtr");',294,295,'1',297,')}else{h',299,292,'("mrow"))}}k',299,'h)}});var f=',14,'Hub.config.root+"/fonts/HTML-CSS/TeX/otf";',3,8,':{\'[mathvariant="double-struck','"]\':{"font-family":"','MathJax_AMS','"},\'[mathvariant',334,429,'MathJax_Script',431,'="fraktur',429,'MathJax_Fraktur',431,'="-tex-oldstyle',429,'MathJax_Caligraphic',431,440,'-bold',429,442,'","font-weight":"bold"},\'[mathvariant','="-tex-caligraphic',429,442,431,449,445,429,442,448,'="bold-','script',429,434,448,458,'fraktur',429,438,448,'="','monospace',429,469,431,'="sans-serif',429,'sansserif',431,458,'sans-serif',429,475,448,473,'-italic',429,'sansserif","font-style":"italic',431,473,445,'-italic',429,485,'","font-weight":"bold','"},"@font-face /*1','*/":{"font-family":"',430,'",src:"local(\'',430,'\'), url(\'"+f+"/',430,'-Regular.otf\')"},"@font-face /*','2',494,434,496,434,498,434,500,'3',494,438,496,438,498,438,500,'4',494,442,496,442,498,442,500,'5',494,438,492,496,438,'-Bold',498,438,531,'.otf\')"},"@font-face /*6',494,442,492,496,442,531,498,442,531,'.otf\')"}}}})}b.TeXAtom',289,'h){var g=',292,'("mrow");',373,51,'g);h',299,'g)}});b.chars',289,'g){g.appendChild(document.createTextNode(this.toString()))}});','b.entity',289,556,14,'Hub.Register.StartupHook("TeX mathchoice Ready",',12,'b.TeXmathchoice',289,'g){this.Core().',51,'g)}})});if(',10,'.zoom!=="None"){',229,'MathZoom.js")}a.loadComplete("jax.js")})(',14,'ElementJax.mml,',14,'OutputJax.NativeMML,',14,'Hub,',14,'Ajax);']
]);