HelpDialog.js 4.3 KB

12345678910111213
  1. /*
  2. * /MathJax/extensions/HelpDialog.js
  3. *
  4. * Copyright (c) 2009-2013 The MathJax Consortium
  5. *
  6. * Part of the MathJax library.
  7. * See http://www.mathjax.org for details.
  8. *
  9. * Licensed under the Apache License, Version 2.0;
  10. * you may not use this file except in compliance with the License.
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. */(function(d,k,e,l,f){var b=MathJax.Extension.Help={version:"2.2"},g=MathJax.Menu,h=d.CombineConfig("HelpDialog",{closeImg:e.fileURL(l.imageDir+"/CloseX-31.png"),styles:{"#MathJax_Help":{position:"fixed",left:"50%",width:"auto","max-width":"90%","text-align":"center",border:"3px outset",padding:"1em 2em","background-color":"#DDDDDD",color:"black",cursor:"default","font-family":"message-box","font-size":"120%","font-style":"normal","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"wrap","float":"none","z-index":201,"border-radius":"15px","-webkit-border-radius":"15px","-moz-border-radius":"15px","-khtml-border-radius":"15px","box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX\x3d2, OffY\x3d2, Color\x3d'gray', Positive\x3d'true')"},"#MathJax_HelpContent":{overflow:"auto","text-align":"left","font-size":"80%",padding:".4em .6em",border:"1px inset",margin:"1em 0px","max-height":"20em","max-width":"30em","background-color":"#EEEEEE"}}});b.Dialog=function(){f.loadDomain("HelpDialog",["Post",b])};b.Post=function(){this.div=g.Background(this);var a=k.addElement(this.div,"div",{id:"MathJax_Help"},f._("HelpDialog",[["b",{style:{fontSize:"120%"}},[["Help","MathJax Help"]]],["div",{id:"MathJax_HelpContent"},[["p",{},[["MathJax","*MathJax* is a JavaScript library that allows page authors to include mathematics within their web pages. As a reader, you don't need to do anything to make that happen."]]],["p",{},[["Browsers","*Browsers*: MathJax works with all modern browsers including IE6+, Firefox 3+, Chrome 0.2+, Safari 2+, Opera 9.6+ and most mobile browsers."]]],["p",{},[["Menu","*Math Menu*: MathJax adds a contextual menu to equations. Right-click or CTRL-click on any mathematics to access the menu."]]],["div",{style:{"margin-left":"1em"}},[["p",{},[["ShowMath","*Show Math As* allows you to view the formula's source markup for copy \x26 paste (as MathML or in its origianl format)."]]],["p",{},[["Settings","*Settings* gives you control over features of MathJax, such as the size of the mathematics, and the mechanism used to display equations."]]],["p",{},[["Language","*Language* lets you select the language used by MathJax for its menus and warning messages."]]]]],["p",{},[["Zoom","*Math Zoom*: If you are having difficulty reading an equation, MathJax can enlarge it to help you see it better."]]],["p",{},[["Accessibilty","*Accessibility*: MathJax will automatically work with screen readers to make mathematics accessible to the visually impaired."]]],["p",{},[["Fonts","*Fonts*: MathJax will use certain math fonts if they are installed on your computer; otherwise, it will use web-based fonts. Although not required, locally installed fonts will speed up typesetting. We suggest installing the [STIX fonts](%1).","http://www.stixfonts.org/"]]]]],["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],["img",{src:h.closeImg,style:{width:"21px",height:"21px",position:"absolute",top:".2em",right:".2em"},onclick:b.Remove}]]));f.setCSS(a);var c=document.documentElement||{},c=window.innerHeight||c.clientHeight||c.scrollHeight||0;g.prototype.msieAboutBug?(a.style.width="20em",a.style.position="absolute",a.style.left=Math.floor((document.documentElement.scrollWidth-a.offsetWidth)/2)+"px",a.style.top=Math.floor((c-a.offsetHeight)/3)+document.body.scrollTop+"px"):(a.style.marginLeft=Math.floor(-a.offsetWidth/2)+"px",a.style.top=Math.floor((c-a.offsetHeight)/3)+"px")};b.Remove=function(a){b.div&&(document.body.removeChild(b.div),delete b.div)};MathJax.Callback.Queue(d.Register.StartupHook("End Config",{}),["Styles",e,h.styles],["Post",d.Startup.signal,"HelpDialig Ready"],["loadComplete",e,"[MathJax]/extensions/HelpDialog.js"])})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax,MathJax.Localization);