19 lines
7.8 KiB
JavaScript
19 lines
7.8 KiB
JavaScript
/*
|
|
* /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,e,d','){var ','a,c=e.Browser.isMSIE;','b.Augment({','LEFTBUTTON',':(c?1:0),MENUKEY:"altKey",','noContextMenuBug',':e.Browser.isKonequeror,msieQuirks:(c&&!(document.compatMode==="BackCompat")),','config:{styles',':{}},settings:','e.config.menuSettings',',Startup:',1,'(){','return ','MathJax.','Ajax.Styles(','this.config.','styles)},Config:',1,'(){this.SUPER(arguments).Config','.call(this',');if(','this.settings.scale','){',19,'scale=',25,'}},Translate:',1,'(g){if(!g','.parentNode','){return','}var k=g','.previousSibling',';if(k&&String(k.className).match(/^MathJax(_MathML|_Display)?$/)){k',33,'.removeChild(','k)}var j=g.',17,'elementJax.root;var i=(j.Get("display")==="block"?"div":"span");var h=document.','createElement','(i),f=h;h.className="','MathJax_MathML','";h.style.fontSize=',19,'scale+"%";if(c){f=','MathJax.HTML.addElement(','h,"span",{className:"MathJax_MathContainer",','style:{display:"inline-block",','position:"relative','"}})}j.','toNativeMML(','f);g',33,'.insertBefore(h,g);if(c){if(',19,'showMathMenuMSIE){this.MSIEoverlay(h)}}else{j=h','.firstChild',';j.','oncontextmenu','=this.','ContextMenu',';j.','onmouseover',63,'Mouseover',';j.','onmousedown',63,'Mousedown;j.onclick',63,'Click',';j.','ondblclick',63,'DblClick','}},Remove:',1,'(f',3,'g=f.SourceElement();if(!g',34,'}g=g',36,';if(!g',34,'}if(g.className.match(/',45,'/)){g',33,39,'g)}},MMLnamespace:"http://www.w3.org/1998/Math/MathML",MSIEoverlay:',1,'(m',3,'l=m',60,';','m.style.position','="absolute";var n','=m.scrollHeight',',h=m.offsetWidth;var j=',49,'m,"img",{src:"about:blank",style:{','width:0,height:','n+"px"}});var f',103,'-n;m',39,'j);',101,'="";var k,i,g=(m',33,'.nodeName.toLowerCase()==="','div");if(g&&this.quirks){k=-n;i=Math.floor(-h/2)}else{k=f-n,i=-h}',49,'m,"span",{',51,107,'0,',52,'"}},[["span",{',51,'position:"absolute",left:i+"px",top:k+"px",width:l.offsetWidth+"px",height:n+"px",cursor:"pointer","background-color":"white",filter:"alpha(opacity=0)"},',70,':this.MSIEevent',',',62,128,',onclick',128,',onmousemove',128,',',76,128,',',66,128,',onmouseout',128,'}]])},MSIEmath:',1,'(f',3,'g=f',33,36,60,';return(g',116,'span"?g',60,':g)},MSIEevent:',1,'(){var g=b.MSIEmath(this);var f','=window.event',';var h=b["MSIE"+f.type];if(h&&h.call(b,f,g,this)){','return false','}g.fireEvent("on"+f.type,f);',161,'},MSIEmousedown:',1,'(h,g,f){if(','h[this.MENUKEY]&&h.button===this.',6,'&&this','.settings.context','!=="','MathJax"){this.trapUp=this.trapClick=true;this.ContextMenu.call(f,h,true);return true}','if(','this.MSIEzoomKeys','&&',174,'(h)){this.trapUp=true;',16,'true}',161,'},MSIEcontextmenu:',1,166,'this',170,'==="',172,161,'},',64,':',1,'(i,j','){if(b.config.showMathMenu','&&(b',170,'==="MathJax','"||j)){if(b.safariContextMenuBug','){setTimeout("','window.getSelection().','empty()",0)}var ','g=',17,'Menu;if(g){if(','document.selection',199,205,'.',201,'f=(c?this',33,33,'.nextSibling',':this',33,213,');g.jax=e.getJaxFor(f);g.menu.items[1].menu.items[1].name=(','g.jax.inputJax.id','==="MathML"?"Original":',218,');','delete ','b.trapClick;',222,'b.trapUp;',16,'g.menu.Post(i)}else{if(!','d.loadingMathMenu','){',228,'=true;if(!i){i',159,'}var h={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY};',17,'Callback.Queue(','d.Require("[MathJax]/extensions/','MathMenu.js"),',1,'(){',222,228,'},[this,arguments.callee,h,j])}if(!i){i',159,'}if(','i.preventDefault','){',245,'()}if(','i.stopPropagation','){',249,'()}i.cancelBubble=true;i.returnValue=false;',161,'}}},Mousedown:',1,'(f',194,'){if(!f){f',159,'}if(b',170,197,'"){if(!b.',8,'||f.button!==2',34,'}}else{if(!f[b.MENUKEY]||f.button!==b.',6,34,'}}',16,'b.',64,23,',f,true)}},',68,':',1,'(f){b.HandleEvent(f,"',68,'",this)},',74,':',1,279,74,281,78,':',1,279,78,281,'HandleEvent:',1,'(h,f,g){},NAMEDSPACE:{negativeveryverythinmathspace:"-.0556em",negativeverythinmathspace:"-.1111em",negativethinmathspace:"-.1667em",negativemediummathspace:"-.2222em",negativethickmathspace:"-.2778em",negativeverythickmathspace:"-.3333em",negativeveryverythickmathspace:"-.3889em"}});','MathJax.Hub.Register.StartupHook("','mml Jax Ready",',1,'(){a=',17,'ElementJax.mml;a.mbase','.Augment({toNativeMML:function(','k',3,'h=','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(',307,'("mrow"))}}k',314,'h)},NativeMMLattributes:',1,'(h',3,'l',63,'defaults;var o',63,'NativeMMLcopyAttributes',',k',63,'NativeMMLskipAttributes',';if(this.type==="mstyle"){l=a.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]))}}}',310,'0,g=o.length;j<g;j++){if(this[o[j]]!=',331,'o[j],this.',333,'(o[j],this[o[j]]))}}},',326,':["fontfamily","fontsize","fontweight","fontstyle","color","background","id","class","href","style"],',329,':{texClass:1,useHeight:1,texprimestyle:1},',333,':',1,'(h,g){g=String(g);if(b.NAMEDSPACE[g]){g=b.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',349,'oldstyle"){g="normal"}}}}',16,'g},NativeMMLelement:(c?',1,'(g){return document.',43,'("mjx:"+g)}:',1,357,'createElementNS(b.MMLnamespace,g)})});a.mrow',303,'j){if(this.inferred&&this.parent.inferRow){for(var h=0,g',63,'data.length;h<g;h++){if(this.data[h]){this.data[h].',54,'j)}else{j',314,307,'("mrow"))}}}else{','this.SUPER(arguments).toNativeMML.call(this,','j)}}});a.msubsup',303,'l){var k=this.type;if(this.data[this.','sup',']==null){k="','msub','"}if(this.data[this.','sub',377,'msup"}var h=',307,'(k);',309,222,'this.data[0].','inferred;',310,'0',312,')}}l',314,'h)}});a.munderover',303,375,'under',377,'mover',379,'over',377,'munder"}var h=',307,'(k);',309,222,387,'inferred;',310,'0',312,')}}l',314,'h)}});if(',17,'Hub.Browser.isFirefox){a.mtable',303,'g){if(this.width',3,'h=(this.style||"").replace(/;\\s*$/,"").split(";");h.push("width:"+this.width);this.style=h.join(";")}',372,'g)}});a.mlabeledtr',303,'k',3,'h=',307,'("mtr");',309,310,'1',312,')}else{h',314,307,'("mrow"))}}k',314,'h)}});var f=',17,'Hub.config.root+"/fonts/HTML-CSS/TeX/otf";',5,10,':{\'[mathvariant="double-struck','"]\':{"font-family":"','MathJax_AMS','"},\'[mathvariant',351,445,'MathJax_Script',447,'="fraktur',445,'MathJax_Fraktur',447,'="-tex-oldstyle',445,'MathJax_Caligraphic',447,456,'-bold',445,458,'","font-weight":"bold"},\'[mathvariant','="-tex-caligraphic',445,458,447,465,461,445,458,464,'="bold-','script',445,450,464,474,'fraktur',445,454,464,'="','monospace',445,485,447,'="sans-serif',445,'sansserif',447,474,'sans-serif',445,491,464,489,'-italic',445,'sansserif","font-style":"italic',447,489,461,'-italic',445,501,'","font-weight":"bold','"},"@font-face /*1','*/":{"font-family":"',446,'",src:"local(\'',446,'\'), url(\'"+f+"/',446,'-Regular.otf\')"},"@font-face /*','2',510,450,512,450,514,450,516,'3',510,454,512,454,514,454,516,'4',510,458,512,458,514,458,516,'5',510,454,508,512,454,'-Bold',514,454,547,'.otf\')"},"@font-face /*6',510,458,508,512,458,547,514,458,547,'.otf\')"}}}})}a.TeXAtom',303,'h',3,'g=',307,'("mrow");',387,54,'g);h',314,'g)}});a.chars',303,'g){g.appendChild(document.createTextNode(this.toString()))}});','a.entity',303,574,297,'TeX mathchoice Ready",',1,'(){a.TeXmathchoice',303,'g){this.Core().',54,'g)}})})});if(',12,'.zoom!=="None"){',236,'MathZoom.js")}b.loadComplete("jax.js")})(',17,'OutputJax.NativeMML,',17,'Hub,',17,'Ajax);']
|
|
]);
|
|
|