/* * /MathJax/jax/output/NativeMML/jax.js * * Copyright (c) 2012 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 */ (function(j,b,f,d){var e,h=b.Browser.isMSIE;var g,a,c,i;b.Register.StartupHook("MathZoom Ready",function(){i=MathJax.Extension.MathZoom});j.Augment({config:{styles:{".MathJax_mmlExBox":{display:"block",overflow:"hidden",height:"1px",width:"60ex",padding:0,border:0,margin:0}}},settings:b.config.menuSettings,Config:function(){this.SUPER(arguments).Config.call(this);if(this.settings.scale){this.config.scale=this.settings.scale}if(b.config.displayAlign!=="center"){var m=b.config.displayAlign,k=b.config.displayIndent;var l={"text-align":m+"!important"};l["margin-"+m]=k+"!important";MathJax.Hub.Insert(this.config.styles,{"div.MathJax_MathML":l,"div.MathJax_MathML math":{"text-align":m},"div.MathJax_MathContainer > span":{"text-align":m+"!important"}})}if(!this.require){this.require=[]}this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js")},Startup:function(){g=MathJax.Extension.MathEvents.Event;a=MathJax.Extension.MathEvents.Touch;c=MathJax.Extension.MathEvents.Hover;this.ContextMenu=g.ContextMenu;this.Mousedown=g.AltContextMenu;this.Mouseover=c.Mouseover;this.Mouseout=c.Mouseout;this.Mousemove=c.Mousemove;if(!h){this.EmExSpan=d.Element("span",{style:{position:"absolute","font-size-adjust":"none"}},[["div",{className:"MathJax_mmlExBox"}],["span",{className:"MathJax_MathML"}]]);e.math(e.mspace().With({width:"60ex"})).toNativeMML(this.EmExSpan.lastChild)}return f.Styles(this.config.styles)},InitializeMML:function(){this.initialized=true;if(h){try{if(!b.Browser.hasMathPlayer){var k=document.createElement("object");k.id="mathplayer";k.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(k);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");b.Browser.hasMathPlayer=true}if(!b.Browser.mpImported){document.namespaces.m.doImport("#mathplayer");b.Browser.mpImported=true}}catch(l){alert("MathJax was not able to set up MathPlayer.\n\nIf MathPlayer is not installed, you need to install it first.\nOtherwise, your security settings may be preventing ActiveX \ncontrols from running. Use the Internet Options item under\nthe Tools menu and select the Security tab, then press the\nCustom Level button. Check that the settings for\n'Run ActiveX Controls', and 'Binary and script behaviors'\nare enabled.\n\nCurrently you will see error messages rather than\ntypeset mathematics.")}}else{document.body.appendChild(this.EmExSpan);this.defaultEx=this.EmExSpan.firstChild.offsetWidth/60;this.defaultMEx=this.EmExSpan.lastChild.offsetWidth/60;document.body.removeChild(this.EmExSpan)}},preTranslate:function(l){var r=l.jax[this.id],s,n=r.length,w,p,y,u,x,k,t,q,o;for(s=0;s1?t/q:1)*this.config.scale;o=Math.floor(Math.max(this.config.minScaleAdjust/100,o))}else{o=100}k.NativeMML.fontSize=o+"%"}if(!h){for(s=0;s