scribble-mathjax/mathjax/jax/output/NativeMML/jax.js

19 lines
7.6 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,'var h=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);',156,'},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','&&',169,'(i)){this.trapUp=true;',13,'true}',156,'},MSIEcontextmenu:',1,161,'this',165,'==="',167,156,'},',61,':',1,'i,j','){if(a.config.showMathMenu','&&(a',165,'==="MathJax','"||j)){if(a.safariContextMenuBug','){setTimeout("','window.getSelection().empty()",0)}if(',14,'Menu){if(','document.selection',194,198,'.empty()",0)}var g=(c?this',30,30,'.nextSibling',':this',30,204,');',14,'Menu.jax=e.getJaxFor(g);','delete ','a.trapClick;',211,'a.trapUp;',13,14,'Menu.menu.Post(i)}else{if(!','d.loadingMathMenu','){',218,'=true;if(!i){i',154,'}var h={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY};',14,'Callback.Queue(','d.Require("[MathJax]/extensions/','MathMenu.js"),',12,211,218,'},[this,arguments.callee,h,j])}if(!i){i',154,'}if(','i.preventDefault','){',234,'()}if(','i.stopPropagation','){',238,'()}i.cancelBubble=true;i.returnValue=false;',156,'}}},Mousedown:',1,'g',189,'){if(!g){g',154,'}if(a',165,192,'"){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,268,71,270,75,':',1,268,75,270,'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(',289,'("mrow"))}}k',296,'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]))}}}',292,'0,g=o.length;j<g;j++){if(this[o[j]]!=',311,'o[j],this.',313,'(o[j],this[o[j]]))}}},',306,':["fontfamily","fontsize","fontweight","fontstyle","color","background","id","class","href","style"],',309,':{texClass:1,useHeight:1,texprimestyle:1},',313,':',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',329,'oldstyle"){g="normal"}}}}',13,'g},NativeMMLelement:(c?',1,'g){return document.',40,'("mjx:"+g)}:',1,337,'createElementNS(a.MMLnamespace,g)})});b.mrow',286,'j){if(this.inferred&&this.parent.inferRow){for(var h=0,g',60,'data.length;h<g;h++){if(this.data[h]){this.data[h].',51,'j)}else{j',296,289,'("mrow"))}}}else{','this.SUPER(arguments).toNativeMML.call(this,','j)}}});b.msubsup',286,'l){var k=this.type;if(this.data[this.','sup',']==null){k="','msub','"}if(this.data[this.','sub',357,'msup"}var h=',289,'(k);',291,211,'this.data[0].','inferred;',292,'0',294,')}}l',296,'h)}});b.munderover',286,355,'under',357,'mover',359,'over',357,'munder"}var h=',289,364,291,211,367,'inferred;',292,'0',294,')}}l',296,'h)}});if(',14,'Hub.Browser.isFirefox){b.mtable',286,'g){if(this.width){var h=(this.style||"").replace(/;\\s*$/,"").split(";");h.push("width:"+this.width);this.style=h.join(";")}',352,'g)}});b.mlabeledtr',286,'k',79,289,'("mtr");',291,292,'1',294,')}else{h',296,289,'("mrow"))}}k',296,'h)}});var f=',14,'Hub.config.root+"/fonts/HTML-CSS/TeX/otf";',3,8,':{\'[mathvariant="double-struck','"]\':{"font-family":"','MathJax_AMS','"},\'[mathvariant',331,422,'MathJax_Script',424,'="fraktur',422,'MathJax_Fraktur',424,'="-tex-oldstyle',422,'MathJax_Caligraphic',424,433,'-bold',422,435,'","font-weight":"bold"},\'[mathvariant','="-tex-caligraphic',422,435,424,442,438,422,435,441,'="bold-','script',422,427,441,451,'fraktur',422,431,441,'="','monospace',422,462,424,'="sans-serif',422,'sansserif',424,451,'sans-serif',422,468,441,466,'-italic',422,'sansserif","font-style":"italic',424,466,438,'-italic',422,478,'","font-weight":"bold','"},"@font-face /*1','*/":{"font-family":"',423,'",src:"local(\'',423,'\'), url(\'"+f+"/',423,'-Regular.otf\')"},"@font-face /*','2',487,427,489,427,491,427,493,'3',487,431,489,431,491,431,493,'4',487,435,489,435,491,435,493,'5',487,431,485,489,431,'-Bold',491,431,524,'.otf\')"},"@font-face /*6',487,435,485,489,435,524,491,435,524,'.otf\')"}}}})}b.TeXAtom',286,'h){var g=',289,'("mrow");',367,51,'g);h',296,'g)}});b.chars',286,'g){g.appendChild(document.createTextNode(this.toString()))}});','b.entity',286,549,14,'Hub.Register.StartupHook("TeX mathchoice Ready",',12,'b.TeXmathchoice',286,'g){this.Core().',51,'g)}})});if(',10,'.zoom!=="None"){',226,'MathZoom.js")}a.loadComplete("jax.js")})(',14,'ElementJax.mml,',14,'OutputJax.NativeMML,',14,'Hub,',14,'Ajax);']
]);