PageRenderTime 76ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 2ms

/utils/MathJax/2.1/config/KAthJax-da9a7f53e588f3837b045a600e1dc439.js

https://github.com/lhannon/khan-exercises
JavaScript | 7668 lines | 7668 code | 0 blank | 0 comment | 1806 complexity | da9a7f53e588f3837b045a600e1dc439 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. MathJax.Hub.Config({
  2. messageStyle: "none",
  3. skipStartupTypeset: !0,
  4. jax: [ "input/TeX", "output/HTML-CSS" ],
  5. extensions: [ "tex2jax.js", "MathZoom.js" ],
  6. TeX: {
  7. extensions: [ "AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js", "newcommand.js", "boldsymbol.js" ],
  8. Macros: {
  9. RR: "\\mathbb{R}",
  10. blue: "\\color{#6495ED}",
  11. orange: "\\color{#FFA500}",
  12. pink: "\\color{#FF00AF}",
  13. red: "\\color{#DF0030}",
  14. green: "\\color{#28AE7B}",
  15. gray: "\\color{gray}",
  16. purple: "\\color{#9D38BD}"
  17. },
  18. Augment: {
  19. Definitions: {
  20. macros: {
  21. lrsplit: "LRSplit",
  22. cancel: "Cancel",
  23. lcm: [ "NamedOp", 0 ]
  24. }
  25. },
  26. Parse: {
  27. prototype: {
  28. LRSplit: function(e) {
  29. var t = this.GetArgument(e), n = this.GetArgument(e), r = MathJax.ElementJax.mml.mfrac(MathJax.InputJax.TeX.Parse("\\strut\\textstyle{" + t + "\\qquad}", this.stack.env).mml(), MathJax.InputJax.TeX.Parse("\\strut\\textstyle{\\qquad " + n + "}", this.stack.env).mml());
  30. r.numalign = MathJax.ElementJax.mml.ALIGN.LEFT, r.denomalign = MathJax.ElementJax.mml.ALIGN.RIGHT, r.linethickness = "0em", this.Push(r);
  31. },
  32. Cancel: function(e) {
  33. this.Push(MathJax.ElementJax.mml.menclose(this.ParseArg(e)).With({
  34. notation: MathJax.ElementJax.mml.NOTATION.UPDIAGONALSTRIKE
  35. }));
  36. }
  37. }
  38. }
  39. }
  40. },
  41. "HTML-CSS": {
  42. scale: 100,
  43. showMathMenu: !1,
  44. availableFonts: [ "TeX" ],
  45. imageFont: null
  46. }
  47. }), MathJax.Ajax.timeout = 6e4, MathJax.Ajax.loadError = function(e) {
  48. return function(t) {
  49. Khan.warnTimeout(), MathJax.Ajax.loadComplete = function(e) {}, e.call(this, t);
  50. };
  51. }(MathJax.Ajax.loadError), MathJax.Hub.Register.StartupHook("HTML-CSS Jax - disable web fonts", function() {
  52. Khan.warnFont();
  53. }), MathJax.Message.Init = function(e) {
  54. return function(t) {
  55. if (this.div && this.div.parentNode == null) {
  56. var n = document.getElementById("MathJax_Message");
  57. if (n && n.firstChild == null) {
  58. var r = n.parentNode;
  59. r && r.removeChild(n);
  60. }
  61. }
  62. e.call(this, t);
  63. };
  64. }(MathJax.Message.Init), MathJax.Hub.Startup.onload(), MathJax.Ajax.Preloading("[MathJax]/extensions/MathEvents.js", "[MathJax]/extensions/MathMenu.js", "[MathJax]/extensions/MathZoom.js", "[MathJax]/extensions/TeX/AMSmath.js", "[MathJax]/extensions/TeX/AMSsymbols.js", "[MathJax]/extensions/TeX/noErrors.js", "[MathJax]/extensions/TeX/noUndefined.js", "[MathJax]/extensions/TeX/newcommand.js", "[MathJax]/extensions/TeX/boldsymbol.js", "[MathJax]/extensions/tex2jax.js", "[MathJax]/jax/element/mml/jax.js", "[MathJax]/jax/input/TeX/config.js", "[MathJax]/jax/input/TeX/jax.js", "[MathJax]/jax/output/HTML-CSS/config.js", "[MathJax]/jax/output/HTML-CSS/jax.js"), MathJax.Hub.Config({
  65. "v1.0-compatible": !1
  66. }), function(e, t, n, r, i, s) {
  67. var o = "2.1", u = MathJax.Extension, a = u.MathEvents = {
  68. version: o
  69. }, f = e.config.menuSettings, l = {
  70. hover: 500,
  71. frame: {
  72. x: 3.5,
  73. y: 5,
  74. bwidth: 1,
  75. bcolor: "#A6D",
  76. hwidth: "15px",
  77. hcolor: "#83A"
  78. },
  79. button: {
  80. x: -4,
  81. y: -3,
  82. wx: -2,
  83. src: n.fileURL(i.imageDir + "/MenuArrow-15.png")
  84. },
  85. fadeinInc: .2,
  86. fadeoutInc: .05,
  87. fadeDelay: 50,
  88. fadeoutStart: 400,
  89. fadeoutDelay: 15e3,
  90. styles: {
  91. ".MathJax_Hover_Frame": {
  92. "border-radius": ".25em",
  93. "-webkit-border-radius": ".25em",
  94. "-moz-border-radius": ".25em",
  95. "-khtml-border-radius": ".25em",
  96. "box-shadow": "0px 0px 15px #83A",
  97. "-webkit-box-shadow": "0px 0px 15px #83A",
  98. "-moz-box-shadow": "0px 0px 15px #83A",
  99. "-khtml-box-shadow": "0px 0px 15px #83A",
  100. border: "1px solid #A6D ! important",
  101. display: "inline-block",
  102. position: "absolute"
  103. },
  104. ".MathJax_Hover_Arrow": {
  105. position: "absolute",
  106. width: "15px",
  107. height: "11px",
  108. cursor: "pointer"
  109. }
  110. }
  111. }, c = a.Event = {
  112. LEFTBUTTON: 0,
  113. RIGHTBUTTON: 2,
  114. MENUKEY: "altKey",
  115. Mousedown: function(e) {
  116. return c.Handler(e, "Mousedown", this);
  117. },
  118. Mouseup: function(e) {
  119. return c.Handler(e, "Mouseup", this);
  120. },
  121. Mousemove: function(e) {
  122. return c.Handler(e, "Mousemove", this);
  123. },
  124. Mouseover: function(e) {
  125. return c.Handler(e, "Mouseover", this);
  126. },
  127. Mouseout: function(e) {
  128. return c.Handler(e, "Mouseout", this);
  129. },
  130. Click: function(e) {
  131. return c.Handler(e, "Click", this);
  132. },
  133. DblClick: function(e) {
  134. return c.Handler(e, "DblClick", this);
  135. },
  136. Menu: function(e) {
  137. return c.Handler(e, "ContextMenu", this);
  138. },
  139. Handler: function(e, t, r) {
  140. if (n.loadingMathMenu) return c.False(e);
  141. var s = i[r.jaxID];
  142. e || (e = window.event), e.isContextMenu = t === "ContextMenu";
  143. if (s[t]) return s[t](e, r);
  144. if (u.MathZoom) return u.MathZoom.HandleEvent(e, t, r);
  145. },
  146. False: function(e) {
  147. return e || (e = window.event), e && (e.preventDefault && e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0, e.returnValue = !1), !1;
  148. },
  149. ContextMenu: function(t, o, u) {
  150. var l = i[o.jaxID], p = l.getJaxFromMath(o), d = (l.config.showMathMenu != null ? l : e).config.showMathMenu;
  151. if (!d || f.context !== "MathJax" && !u) return;
  152. a.msieEventBug && (t = window.event || t), c.ClearSelection(), h.ClearHoverTimer(), p.hover && (p.hover.remove && (clearTimeout(p.hover.remove), delete p.hover.remove), p.hover.nofade = !0);
  153. var v = MathJax.Menu;
  154. if (v) {
  155. v.jax = p;
  156. var y = v.menu.Find("Show Math As").menu;
  157. y.items[1].name = s[p.inputJax].sourceMenuTitle || "Original Form", y.items[0].hidden = p.inputJax === "Error";
  158. var w = v.menu.Find("Math Settings", "MathPlayer");
  159. return w.hidden = p.outputJax !== "NativeMML" || !e.Browser.hasMathPlayer, v.menu.Post(t);
  160. }
  161. if (!n.loadingMathMenu) {
  162. n.loadingMathMenu = !0;
  163. var E = {
  164. pageX: t.pageX,
  165. pageY: t.pageY,
  166. clientX: t.clientX,
  167. clientY: t.clientY
  168. };
  169. r.Queue(n.Require("[MathJax]/extensions/MathMenu.js"), function() {
  170. delete n.loadingMathMenu, MathJax.Menu || (MathJax.Menu = {});
  171. }, [ "ContextMenu", this, E, o, u ]);
  172. }
  173. return c.False(t);
  174. },
  175. AltContextMenu: function(t, n) {
  176. var r = i[n.jaxID], s = (r.config.showMathMenu != null ? r : e).config.showMathMenu;
  177. if (s) {
  178. s = (r.config.showMathMenuMSIE != null ? r : e).config.showMathMenuMSIE;
  179. if (f.context === "MathJax" && !f.mpContext && s) {
  180. if (!a.noContextMenuBug || t.button !== c.RIGHTBUTTON) return;
  181. } else if (!t[c.MENUKEY] || t.button !== c.LEFTBUTTON) return;
  182. return r.ContextMenu(t, n, !0);
  183. }
  184. },
  185. ClearSelection: function() {
  186. a.safariContextMenuBug && setTimeout("window.getSelection().empty()", 0), document.selection && setTimeout("document.selection.empty()", 0);
  187. },
  188. getBBox: function(e) {
  189. e.appendChild(a.topImg);
  190. var t = a.topImg.offsetTop, n = e.offsetHeight - t, r = e.offsetWidth;
  191. return e.removeChild(a.topImg), {
  192. w: r,
  193. h: t,
  194. d: n
  195. };
  196. }
  197. }, h = a.Hover = {
  198. Mouseover: function(t, n) {
  199. if (f.discoverable || f.zoom === "Hover") {
  200. var r = t.fromElement || t.relatedTarget, i = t.toElement || t.target;
  201. if (r && i && (r.isMathJax != i.isMathJax || e.getJaxFor(r) !== e.getJaxFor(i))) {
  202. var s = this.getJaxFromMath(n);
  203. return s.hover ? h.ReHover(s) : h.HoverTimer(s, n), c.False(t);
  204. }
  205. }
  206. },
  207. Mouseout: function(t, n) {
  208. if (f.discoverable || f.zoom === "Hover") {
  209. var r = t.fromElement || t.relatedTarget, i = t.toElement || t.target;
  210. if (r && i && (r.isMathJax != i.isMathJax || e.getJaxFor(r) !== e.getJaxFor(i))) {
  211. var s = this.getJaxFromMath(n);
  212. return s.hover ? h.UnHover(s) : h.ClearHoverTimer(), c.False(t);
  213. }
  214. }
  215. },
  216. Mousemove: function(e, t) {
  217. if (f.discoverable || f.zoom === "Hover") {
  218. var n = this.getJaxFromMath(t);
  219. if (n.hover) return;
  220. if (h.lastX == e.clientX && h.lastY == e.clientY) return;
  221. return h.lastX = e.clientX, h.lastY = e.clientY, h.HoverTimer(n, t), c.False(e);
  222. }
  223. },
  224. HoverTimer: function(e, t) {
  225. this.ClearHoverTimer(), this.hoverTimer = setTimeout(r([ "Hover", this, e, t ]), l.hover);
  226. },
  227. ClearHoverTimer: function() {
  228. this.hoverTimer && (clearTimeout(this.hoverTimer), delete this.hoverTimer);
  229. },
  230. Hover: function(n, r) {
  231. if (u.MathZoom && u.MathZoom.Hover({}, r)) return;
  232. var s = i[n.outputJax], o = s.getHoverSpan(n, r), f = s.getHoverBBox(n, o, r), c = (s.config.showMathMenu != null ? s : e).config.showMathMenu, h = l.frame.x, p = l.frame.y, d = l.frame.bwidth;
  233. a.msieBorderWidthBug && (d = 0), n.hover = {
  234. opacity: 0,
  235. id: n.inputID + "-Hover"
  236. };
  237. var v = t.Element("span", {
  238. id: n.hover.id,
  239. isMathJax: !0,
  240. style: {
  241. display: "inline-block",
  242. width: 0,
  243. height: 0,
  244. position: "relative"
  245. }
  246. }, [ [ "span", {
  247. className: "MathJax_Hover_Frame",
  248. isMathJax: !0,
  249. style: {
  250. display: "inline-block",
  251. position: "absolute",
  252. top: this.Px(-f.h - p - d - (f.y || 0)),
  253. left: this.Px(-h - d + (f.x || 0)),
  254. width: this.Px(f.w + 2 * h),
  255. height: this.Px(f.h + f.d + 2 * p),
  256. opacity: 0,
  257. filter: "alpha(opacity=0)"
  258. }
  259. } ] ]), m = t.Element("span", {
  260. isMathJax: !0,
  261. id: n.hover.id + "Menu",
  262. style: {
  263. display: "inline-block",
  264. "z-index": 1,
  265. width: 0,
  266. height: 0,
  267. position: "relative"
  268. }
  269. }, [ [ "img", {
  270. className: "MathJax_Hover_Arrow",
  271. isMathJax: !0,
  272. math: r,
  273. src: l.button.src,
  274. onclick: this.HoverMenu,
  275. jax: s.id,
  276. style: {
  277. left: this.Px(f.w + h + d + (f.x || 0) + l.button.x),
  278. top: this.Px(-f.h - p - d - (f.y || 0) - l.button.y),
  279. opacity: 0,
  280. filter: "alpha(opacity=0)"
  281. }
  282. } ] ]);
  283. f.width && (v.style.width = m.style.width = f.width, v.style.marginRight = m.style.marginRight = "-" + f.width, v.firstChild.style.width = f.width, m.firstChild.style.left = "", m.firstChild.style.right = this.Px(l.button.wx)), o.parentNode.insertBefore(v, o), c && o.parentNode.insertBefore(m, o), o.style && (o.style.position = "relative"), this.ReHover(n);
  284. },
  285. ReHover: function(e) {
  286. e.hover.remove && clearTimeout(e.hover.remove), e.hover.remove = setTimeout(r([ "UnHover", this, e ]), l.fadeoutDelay), this.HoverFadeTimer(e, l.fadeinInc);
  287. },
  288. UnHover: function(e) {
  289. e.hover.nofade || this.HoverFadeTimer(e, -l.fadeoutInc, l.fadeoutStart);
  290. },
  291. HoverFade: function(e) {
  292. delete e.hover.timer, e.hover.opacity = Math.max(0, Math.min(1, e.hover.opacity + e.hover.inc)), e.hover.opacity = Math.floor(1e3 * e.hover.opacity) / 1e3;
  293. var t = document.getElementById(e.hover.id), n = document.getElementById(e.hover.id + "Menu");
  294. t.firstChild.style.opacity = e.hover.opacity, t.firstChild.style.filter = "alpha(opacity=" + Math.floor(100 * e.hover.opacity) + ")", n && (n.firstChild.style.opacity = e.hover.opacity, n.firstChild.style.filter = t.style.filter);
  295. if (e.hover.opacity === 1) return;
  296. if (e.hover.opacity > 0) {
  297. this.HoverFadeTimer(e, e.hover.inc);
  298. return;
  299. }
  300. t.parentNode.removeChild(t), n && n.parentNode.removeChild(n), e.hover.remove && clearTimeout(e.hover.remove), delete e.hover;
  301. },
  302. HoverFadeTimer: function(e, t, n) {
  303. e.hover.inc = t, e.hover.timer || (e.hover.timer = setTimeout(r([ "HoverFade", this, e ]), n || l.fadeDelay));
  304. },
  305. HoverMenu: function(e) {
  306. return e || (e = window.event), i[this.jax].ContextMenu(e, this.math, !0);
  307. },
  308. ClearHover: function(e) {
  309. e.hover.remove && clearTimeout(e.hover.remove), e.hover.timer && clearTimeout(e.hover.timer), h.ClearHoverTimer(), delete e.hover;
  310. },
  311. Px: function(e) {
  312. return Math.abs(e) < .006 ? "0px" : e.toFixed(2).replace(/\.?0+$/, "") + "px";
  313. },
  314. getImages: function() {
  315. var e = new Image;
  316. e.src = l.button.src;
  317. }
  318. }, p = a.Touch = {
  319. last: 0,
  320. delay: 500,
  321. start: function(e) {
  322. var t = (new Date).getTime(), n = t - p.last < p.delay && p.up;
  323. p.last = t, p.up = !1, n && (p.timeout = setTimeout(p.menu, p.delay, e, this), e.preventDefault());
  324. },
  325. end: function(e) {
  326. var t = (new Date).getTime();
  327. p.up = t - p.last < p.delay;
  328. if (p.timeout) return clearTimeout(p.timeout), delete p.timeout, p.last = 0, p.up = !1, e.preventDefault(), c.Handler(e.touches[0] || e.touch, "DblClick", this);
  329. },
  330. menu: function(e, t) {
  331. return delete p.timeout, p.last = 0, p.up = !1, c.Handler(e.touches[0] || e.touch, "ContextMenu", t);
  332. }
  333. };
  334. if (e.Browser.isMobile) {
  335. var d = l.styles[".MathJax_Hover_Arrow"];
  336. d.width = "25px", d.height = "18px", l.button.x = -6;
  337. }
  338. e.Browser.Select({
  339. MSIE: function(e) {
  340. var t = document.documentMode || 0, n = e.versionAtLeast("8.0");
  341. a.msieBorderWidthBug = document.compatMode === "BackCompat", a.msieEventBug = e.isIE9, a.msieAlignBug = !n || t < 8, t < 9 && (c.LEFTBUTTON = 1);
  342. },
  343. Safari: function(e) {
  344. a.safariContextMenuBug = !0;
  345. },
  346. Opera: function(e) {
  347. a.operaPositionBug = !0;
  348. },
  349. Konqueror: function(e) {
  350. a.noContextMenuBug = !0;
  351. }
  352. }), a.topImg = a.msieAlignBug ? t.Element("img", {
  353. style: {
  354. width: 0,
  355. height: 0,
  356. position: "relative"
  357. },
  358. src: "about:blank"
  359. }) : t.Element("span", {
  360. style: {
  361. width: 0,
  362. height: 0,
  363. display: "inline-block"
  364. }
  365. }), a.operaPositionBug && (a.topImg.style.border = "1px solid"), a.config = l = e.CombineConfig("MathEvents", l);
  366. var v = function() {
  367. var e = l.styles[".MathJax_Hover_Frame"];
  368. e.border = l.frame.bwidth + "px solid " + l.frame.bcolor + " ! important", e["box-shadow"] = e["-webkit-box-shadow"] = e["-moz-box-shadow"] = e["-khtml-box-shadow"] = "0px 0px " + l.frame.hwidth + " " + l.frame.hcolor;
  369. };
  370. r.Queue(e.Register.StartupHook("End Config", {}), [ v ], [ "getImages", h ], [ "Styles", n, l.styles ], [ "Post", e.Startup.signal, "MathEvents Ready" ], [ "loadComplete", n, "[MathJax]/extensions/MathEvents.js" ]);
  371. }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.Callback, MathJax.OutputJax, MathJax.InputJax), function(e, t, n, r, i) {
  372. var s = "2.1", o = MathJax.Callback.Signal("menu");
  373. MathJax.Extension.MathMenu = {
  374. version: s,
  375. signal: o
  376. };
  377. var u = e.Browser.isPC, a = e.Browser.isMSIE, f = (document.documentMode || 0) > 8, l = u ? null : "5px", c = e.CombineConfig("MathMenu", {
  378. delay: 150,
  379. helpURL: "http://www.mathjax.org/help-v2/user/",
  380. closeImg: n.fileURL(i.imageDir + "/CloseX-31.png"),
  381. showRenderer: !0,
  382. showMathPlayer: !0,
  383. showFontMenu: !1,
  384. showContext: !1,
  385. showDiscoverable: !1,
  386. windowSettings: {
  387. status: "no",
  388. toolbar: "no",
  389. locationbar: "no",
  390. menubar: "no",
  391. directories: "no",
  392. personalbar: "no",
  393. resizable: "yes",
  394. scrollbars: "yes",
  395. width: 400,
  396. height: 300,
  397. left: Math.round((screen.width - 400) / 2),
  398. top: Math.round((screen.height - 300) / 3)
  399. },
  400. styles: {
  401. "#MathJax_About": {
  402. position: "fixed",
  403. left: "50%",
  404. width: "auto",
  405. "text-align": "center",
  406. border: "3px outset",
  407. padding: "1em 2em",
  408. "background-color": "#DDDDDD",
  409. color: "black",
  410. cursor: "default",
  411. "font-family": "message-box",
  412. "font-size": "120%",
  413. "font-style": "normal",
  414. "text-indent": 0,
  415. "text-transform": "none",
  416. "line-height": "normal",
  417. "letter-spacing": "normal",
  418. "word-spacing": "normal",
  419. "word-wrap": "normal",
  420. "white-space": "nowrap",
  421. "float": "none",
  422. "z-index": 201,
  423. "border-radius": "15px",
  424. "-webkit-border-radius": "15px",
  425. "-moz-border-radius": "15px",
  426. "-khtml-border-radius": "15px",
  427. "box-shadow": "0px 10px 20px #808080",
  428. "-webkit-box-shadow": "0px 10px 20px #808080",
  429. "-moz-box-shadow": "0px 10px 20px #808080",
  430. "-khtml-box-shadow": "0px 10px 20px #808080",
  431. filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"
  432. },
  433. ".MathJax_Menu": {
  434. position: "absolute",
  435. "background-color": "white",
  436. color: "black",
  437. width: "auto",
  438. padding: u ? "2px" : "5px 0px",
  439. border: "1px solid #CCCCCC",
  440. margin: 0,
  441. cursor: "default",
  442. font: "menu",
  443. "text-align": "left",
  444. "text-indent": 0,
  445. "text-transform": "none",
  446. "line-height": "normal",
  447. "letter-spacing": "normal",
  448. "word-spacing": "normal",
  449. "word-wrap": "normal",
  450. "white-space": "nowrap",
  451. "float": "none",
  452. "z-index": 201,
  453. "border-radius": l,
  454. "-webkit-border-radius": l,
  455. "-moz-border-radius": l,
  456. "-khtml-border-radius": l,
  457. "box-shadow": "0px 10px 20px #808080",
  458. "-webkit-box-shadow": "0px 10px 20px #808080",
  459. "-moz-box-shadow": "0px 10px 20px #808080",
  460. "-khtml-box-shadow": "0px 10px 20px #808080",
  461. filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"
  462. },
  463. ".MathJax_MenuItem": {
  464. padding: u ? "2px 2em" : "1px 2em",
  465. background: "transparent"
  466. },
  467. ".MathJax_MenuTitle": {
  468. "background-color": "#CCCCCC",
  469. margin: u ? "-1px -1px 1px -1px" : "-5px 0 0 0",
  470. "text-align": "center",
  471. "font-style": "italic",
  472. "font-size": "80%",
  473. color: "#444444",
  474. padding: "2px 0",
  475. overflow: "hidden"
  476. },
  477. ".MathJax_MenuArrow": {
  478. position: "absolute",
  479. right: ".5em",
  480. color: "#666666",
  481. "font-family": a ? "'Arial unicode MS'" : null
  482. },
  483. ".MathJax_MenuActive .MathJax_MenuArrow": {
  484. color: "white"
  485. },
  486. ".MathJax_MenuCheck": {
  487. position: "absolute",
  488. left: ".7em",
  489. "font-family": a ? "'Arial unicode MS'" : null
  490. },
  491. ".MathJax_MenuRadioCheck": {
  492. position: "absolute",
  493. left: u ? "1em" : ".7em"
  494. },
  495. ".MathJax_MenuLabel": {
  496. padding: u ? "2px 2em 4px 1.33em" : "1px 2em 3px 1.33em",
  497. "font-style": "italic"
  498. },
  499. ".MathJax_MenuRule": {
  500. "border-top": u ? "1px solid #CCCCCC" : "1px solid #DDDDDD",
  501. margin: u ? "4px 1px 0px" : "4px 3px"
  502. },
  503. ".MathJax_MenuDisabled": {
  504. color: "GrayText"
  505. },
  506. ".MathJax_MenuActive": {
  507. "background-color": u ? "Highlight" : "#606872",
  508. color: u ? "HighlightText" : "white"
  509. },
  510. ".MathJax_Menu_Close": {
  511. position: "absolute",
  512. width: "31px",
  513. height: "31px",
  514. top: "-15px",
  515. left: "-15px"
  516. }
  517. }
  518. }), h, p;
  519. e.Register.StartupHook("MathEvents Ready", function() {
  520. h = MathJax.Extension.MathEvents.Event.False, p = MathJax.Extension.MathEvents.Hover;
  521. });
  522. var d = MathJax.Menu = MathJax.Object.Subclass({
  523. version: s,
  524. items: [],
  525. posted: !1,
  526. title: null,
  527. margin: 5,
  528. Init: function(e) {
  529. this.items = [].slice.call(arguments, 0);
  530. },
  531. With: function(t) {
  532. return t && e.Insert(this, t), this;
  533. },
  534. Post: function(e, n) {
  535. e || (e = window.event);
  536. var r = this.title ? [ [ "div", {
  537. className: "MathJax_MenuTitle"
  538. }, [ this.title ] ] ] : null, i = document.getElementById("MathJax_MenuFrame");
  539. i || (i = d.Background(this), delete v.lastItem, delete v.lastMenu, delete d.skipUp, o.Post([ "post", d.jax ]));
  540. var s = t.addElement(i, "div", {
  541. onmouseup: d.Mouseup,
  542. ondblclick: h,
  543. ondragstart: h,
  544. onselectstart: h,
  545. oncontextmenu: h,
  546. menuItem: this,
  547. className: "MathJax_Menu"
  548. }, r);
  549. for (var a = 0, f = this.items.length; a < f; a++) this.items[a].Create(s);
  550. d.isMobile && t.addElement(s, "span", {
  551. className: "MathJax_Menu_Close",
  552. menu: n,
  553. ontouchstart: d.Close,
  554. ontouchend: h,
  555. onmousedown: d.Close,
  556. onmouseup: h
  557. }, [ [ "img", {
  558. src: c.closeImg,
  559. style: {
  560. width: "100%",
  561. height: "100%"
  562. }
  563. } ] ]), this.posted = !0, s.style.width = s.offsetWidth + 2 + "px";
  564. var l = e.pageX, p = e.pageY;
  565. !l && !p && (l = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, p = e.clientY + document.body.scrollTop + document.documentElement.scrollTop);
  566. if (!n) l + s.offsetWidth > document.body.offsetWidth - this.margin && (l = document.body.offsetWidth - s.offsetWidth - this.margin), d.isMobile && (l = Math.max(5, l - Math.floor(s.offsetWidth / 2)), p -= 20), d.skipUp = e.isContextMenu; else {
  567. var y = "left", b = n.offsetWidth;
  568. l = d.isMobile ? 30 : b - 2, p = 0;
  569. while (n && n !== i) l += n.offsetLeft, p += n.offsetTop, n = n.parentNode;
  570. l + s.offsetWidth > document.body.offsetWidth - this.margin && !d.isMobile && (y = "right", l = Math.max(this.margin, l - b - s.offsetWidth + 6)), u || (s.style["borderRadiusTop" + y] = 0, s.style["WebkitBorderRadiusTop" + y] = 0, s.style["MozBorderRadiusTop" + y] = 0, s.style["KhtmlBorderRadiusTop" + y] = 0);
  571. }
  572. return s.style.left = l + "px", s.style.top = p + "px", document.selection && document.selection.empty && document.selection.empty(), h(e);
  573. },
  574. Remove: function(e, t) {
  575. o.Post([ "unpost", d.jax ]);
  576. var n = document.getElementById("MathJax_MenuFrame");
  577. return n && (n.parentNode.removeChild(n), this.msieFixedPositionBug && detachEvent("onresize", d.Resize)), d.jax.hover && (delete d.jax.hover.nofade, p.UnHover(d.jax)), h(e);
  578. },
  579. Find: function(e) {
  580. var t = [].slice.call(arguments, 1);
  581. for (var n = 0, r = this.items.length; n < r; n++) if (this.items[n].name === e) return t.length ? this.items[n].menu ? this.items[n].menu.Find.apply(this.items[n].menu, t) : null : this.items[n];
  582. return null;
  583. },
  584. IndexOf: function(e) {
  585. for (var t = 0, n = this.items.length; t < n; t++) if (this.items[t].name === e) return t;
  586. return null;
  587. }
  588. }, {
  589. config: c,
  590. div: null,
  591. Close: function(e) {
  592. return d.Event(e, this.menu || this.parentNode, this.menu ? "Touchend" : "Remove");
  593. },
  594. Remove: function(e) {
  595. return d.Event(e, this, "Remove");
  596. },
  597. Mouseover: function(e) {
  598. return d.Event(e, this, "Mouseover");
  599. },
  600. Mouseout: function(e) {
  601. return d.Event(e, this, "Mouseout");
  602. },
  603. Mousedown: function(e) {
  604. return d.Event(e, this, "Mousedown");
  605. },
  606. Mouseup: function(e) {
  607. return d.Event(e, this, "Mouseup");
  608. },
  609. Touchstart: function(e) {
  610. return d.Event(e, this, "Touchstart");
  611. },
  612. Touchend: function(e) {
  613. return d.Event(e, this, "Touchend");
  614. },
  615. Event: function(e, t, n, r) {
  616. if (d.skipMouseover && n === "Mouseover" && !r) return h(e);
  617. if (d.skipUp) {
  618. if (n.match(/Mouseup|Touchend/)) return delete d.skipUp, h(e);
  619. (n === "Touchstart" || n === "Mousedown" && !d.skipMousedown) && delete d.skipUp;
  620. }
  621. e || (e = window.event);
  622. var i = t.menuItem;
  623. return i && i[n] ? i[n](e, t) : null;
  624. },
  625. BGSTYLE: {
  626. position: "absolute",
  627. left: 0,
  628. top: 0,
  629. "z-index": 200,
  630. width: "100%",
  631. height: "100%",
  632. border: 0,
  633. padding: 0,
  634. margin: 0
  635. },
  636. Background: function(e) {
  637. var n = t.addElement(document.body, "div", {
  638. style: this.BGSTYLE,
  639. id: "MathJax_MenuFrame"
  640. }, [ [ "div", {
  641. style: this.BGSTYLE,
  642. menuItem: e,
  643. onmousedown: this.Remove
  644. } ] ]), r = n.firstChild;
  645. return e.msieBackgroundBug && (r.style.backgroundColor = "white", r.style.filter = "alpha(opacity=0)"), e.msieFixedPositionBug ? (n.width = n.height = 0, this.Resize(), attachEvent("onresize", this.Resize)) : r.style.position = "fixed", n;
  646. },
  647. Resize: function() {
  648. setTimeout(d.SetWH, 0);
  649. },
  650. SetWH: function() {
  651. var e = document.getElementById("MathJax_MenuFrame");
  652. e && (e = e.firstChild, e.style.width = e.style.height = "1px", e.style.width = document.body.scrollWidth + "px", e.style.height = document.body.scrollHeight + "px");
  653. },
  654. saveCookie: function() {
  655. t.Cookie.Set("menu", this.cookie);
  656. },
  657. getCookie: function() {
  658. this.cookie = t.Cookie.Get("menu");
  659. },
  660. getImages: function() {
  661. if (d.isMobile) {
  662. var e = new Image;
  663. e.src = c.closeImg;
  664. }
  665. }
  666. }), v = d.ITEM = MathJax.Object.Subclass({
  667. name: "",
  668. Create: function(e) {
  669. if (!this.hidden) {
  670. var n = {
  671. onmouseover: d.Mouseover,
  672. onmouseout: d.Mouseout,
  673. onmouseup: d.Mouseup,
  674. onmousedown: d.Mousedown,
  675. ondragstart: h,
  676. onselectstart: h,
  677. onselectend: h,
  678. ontouchstart: d.Touchstart,
  679. ontouchend: d.Touchend,
  680. className: "MathJax_MenuItem",
  681. menuItem: this
  682. };
  683. this.disabled && (n.className += " MathJax_MenuDisabled"), t.addElement(e, "div", n, this.Label(n, e));
  684. }
  685. },
  686. Mouseover: function(e, t) {
  687. this.disabled || this.Activate(t);
  688. if (!this.menu || !this.menu.posted) {
  689. var n = document.getElementById("MathJax_MenuFrame").childNodes, r = t.parentNode.childNodes;
  690. for (var i = 0, s = r.length; i < s; i++) {
  691. var o = r[i].menuItem;
  692. o && o.menu && o.menu.posted && o.Deactivate(r[i]);
  693. }
  694. s = n.length - 1;
  695. while (s >= 0 && t.parentNode.menuItem !== n[s].menuItem) n[s].menuItem.posted = !1, n[s].parentNode.removeChild(n[s]), s--;
  696. this.Timer && !d.isMobile && this.Timer(e, t);
  697. }
  698. },
  699. Mouseout: function(e, t) {
  700. (!this.menu || !this.menu.posted) && this.Deactivate(t), this.timer && (clearTimeout(this.timer), delete this.timer);
  701. },
  702. Mouseup: function(e, t) {
  703. return this.Remove(e, t);
  704. },
  705. Touchstart: function(e, t) {
  706. return this.TouchEvent(e, t, "Mousedown");
  707. },
  708. Touchend: function(e, t) {
  709. return this.TouchEvent(e, t, "Mouseup");
  710. },
  711. TouchEvent: function(e, t, n) {
  712. return this !== v.lastItem && (v.lastMenu && d.Event(e, v.lastMenu, "Mouseout"), d.Event(e, t, "Mouseover", !0), v.lastItem = this, v.lastMenu = t), this.nativeTouch ? null : (d.Event(e, t, n), !1);
  713. },
  714. Remove: function(e, t) {
  715. return t = t.parentNode.menuItem, t.Remove(e, t);
  716. },
  717. Activate: function(e) {
  718. this.Deactivate(e), e.className += " MathJax_MenuActive";
  719. },
  720. Deactivate: function(e) {
  721. e.className = e.className.replace(/ MathJax_MenuActive/, "");
  722. },
  723. With: function(t) {
  724. return t && e.Insert(this, t), this;
  725. }
  726. });
  727. d.ITEM.COMMAND = d.ITEM.Subclass({
  728. action: function() {},
  729. Init: function(e, t, n) {
  730. this.name = e, this.action = t, this.With(n);
  731. },
  732. Label: function(e, t) {
  733. return [ this.name ];
  734. },
  735. Mouseup: function(e, t) {
  736. return this.disabled || (this.Remove(e, t), o.Post([ "command", this ]), this.action.call(this, e)), h(e);
  737. }
  738. }), d.ITEM.SUBMENU = d.ITEM.Subclass({
  739. menu: null,
  740. marker: u && !e.Browser.isSafari ? "\u25b6" : "\u25b8",
  741. Init: function(e, t) {
  742. this.name = e;
  743. var n = 1;
  744. t instanceof d.ITEM || (this.With(t), n++), this.menu = d.apply(d, [].slice.call(arguments, n));
  745. },
  746. Label: function(e, t) {
  747. return this.menu.posted = !1, [ this.name + " ", [ "span", {
  748. className: "MathJax_MenuArrow"
  749. }, [ this.marker ] ] ];
  750. },
  751. Timer: function(e, t) {
  752. this.timer && clearTimeout(this.timer), e = {
  753. clientX: e.clientX,
  754. clientY: e.clientY
  755. }, this.timer = setTimeout(r([ "Mouseup", this, e, t ]), c.delay);
  756. },
  757. Touchend: function(e, t) {
  758. var n = this.menu.posted, r = this.SUPER(arguments).Touchend.apply(this, arguments);
  759. return n && (this.Deactivate(t), delete v.lastItem, delete v.lastMenu), r;
  760. },
  761. Mouseup: function(e, t) {
  762. if (!this.disabled) if (!this.menu.posted) this.timer && (clearTimeout(this.timer), delete this.timer), this.menu.Post(e, t); else {
  763. var n = document.getElementById("MathJax_MenuFrame").childNodes, r = n.length - 1;
  764. while (r >= 0) {
  765. var i = n[r];
  766. i.menuItem.posted = !1, i.parentNode.removeChild(i);
  767. if (i.menuItem === this.menu) break;
  768. r--;
  769. }
  770. }
  771. return h(e);
  772. }
  773. }), d.ITEM.RADIO = d.ITEM.Subclass({
  774. variable: null,
  775. marker: u ? "\u25cf" : "\u2713",
  776. Init: function(e, t, n) {
  777. this.name = e, this.variable = t, this.With(n), this.value == null && (this.value = this.name);
  778. },
  779. Label: function(e, t) {
  780. var n = {
  781. className: "MathJax_MenuRadioCheck"
  782. };
  783. return c.settings[this.variable] !== this.value && (n = {
  784. style: {
  785. display: "none"
  786. }
  787. }), [ [ "span", n, [ this.marker ] ], " " + this.name ];
  788. },
  789. Mouseup: function(e, t) {
  790. if (!this.disabled) {
  791. var n = t.parentNode.childNodes;
  792. for (var r = 0, i = n.length; r < i; r++) {
  793. var s = n[r].menuItem;
  794. s && s.variable === this.variable && (n[r].firstChild.style.display = "none");
  795. }
  796. t.firstChild.display = "", c.settings[this.variable] = this.value, d.cookie[this.variable] = c.settings[this.variable], d.saveCookie(), o.Post([ "radio button", this ]);
  797. }
  798. return this.Remove(e, t), this.action && !this.disabled && this.action.call(d, this), h(e);
  799. }
  800. }), d.ITEM.CHECKBOX = d.ITEM.Subclass({
  801. variable: null,
  802. marker: "\u2713",
  803. Init: function(e, t, n) {
  804. this.name = e, this.variable = t, this.With(n);
  805. },
  806. Label: function(e, t) {
  807. var n = {
  808. className: "MathJax_MenuCheck"
  809. };
  810. return c.settings[this.variable] || (n = {
  811. style: {
  812. display: "none"
  813. }
  814. }), [ [ "span", n, [ this.marker ] ], " " + this.name ];
  815. },
  816. Mouseup: function(e, t) {
  817. return this.disabled || (t.firstChild.display = c.settings[this.variable] ? "none" : "", c.settings[this.variable] = !c.settings[this.variable], d.cookie[this.variable] = c.settings[this.variable], d.saveCookie(), o.Post([ "checkbox", this ])), this.Remove(e, t), this.action && !this.disabled && this.action.call(d, this), h(e);
  818. }
  819. }), d.ITEM.LABEL = d.ITEM.Subclass({
  820. Init: function(e, t) {
  821. this.name = e, this.With(t);
  822. },
  823. Label: function(e, t) {
  824. return delete e.onmouseover, delete e.onmouseout, delete e.onmousedown, e.className += " MathJax_MenuLabel", [ this.name ];
  825. }
  826. }), d.ITEM.RULE = d.ITEM.Subclass({
  827. Label: function(e, t) {
  828. return delete e.onmouseover, delete e.onmouseout, delete e.onmousedown, e.className += " MathJax_MenuRule", null;
  829. }
  830. }), d.About = function() {
  831. var n = i["HTML-CSS"] || {
  832. fontInUse: ""
  833. }, r = n.webFonts ? "" : "local ", s = n.webFonts ? " web" : "", o = (n.imgFonts ? "Image" : r + n.fontInUse + s) + " fonts";
  834. o === "local fonts" && i.SVG && (o = "web SVG fonts");
  835. var u = [ "MathJax.js v" + MathJax.fileversion, [ "br" ] ];
  836. u.push([ "div", {
  837. style: {
  838. "border-top": "groove 2px",
  839. margin: ".25em 0"
  840. }
  841. } ]), d.About.GetJax(u, MathJax.InputJax, "Input Jax"), d.About.GetJax(u, MathJax.OutputJax, "Output Jax"), d.About.GetJax(u, MathJax.ElementJax, "Element Jax"), u.push([ "div", {
  842. style: {
  843. "border-top": "groove 2px",
  844. margin: ".25em 0"
  845. }
  846. } ]), d.About.GetJax(u, MathJax.Extension, "Extension", !0), u.push([ "div", {
  847. style: {
  848. "border-top": "groove 2px",
  849. margin: ".25em 0"
  850. }
  851. } ], [ "center", {}, [ e.Browser + " v" + e.Browser.version + (n.webFonts && !n.imgFonts ? " \u2014 " + n.allowWebFonts.replace(/otf/, "woff or otf") + " fonts" : "") ] ]), d.About.div = d.Background(d.About);
  852. var a = t.addElement(d.About.div, "div", {
  853. id: "MathJax_About"
  854. }, [ [ "b", {
  855. style: {
  856. fontSize: "120%"
  857. }
  858. }, [ "MathJax" ] ], " v" + MathJax.version, [ "br" ], "using " + o, [ "br" ], [ "br" ], [ "span", {
  859. style: {
  860. display: "inline-block",
  861. "text-align": "left",
  862. "font-size": "80%",
  863. "max-height": "20em",
  864. overflow: "auto",
  865. "background-color": "#E4E4E4",
  866. padding: ".4em .6em",
  867. border: "1px inset"
  868. }
  869. }, u ], [ "br" ], [ "br" ], [ "a", {
  870. href: "http://www.mathjax.org/"
  871. }, [ "www.mathjax.org" ] ], [ "img", {
  872. src: c.closeImg,
  873. style: {
  874. width: "21px",
  875. height: "21px",
  876. position: "absolute",
  877. top: ".2em",
  878. right: ".2em"
  879. },
  880. onclick: d.About.Remove
  881. } ] ]), f = document.documentElement || {}, l = window.innerHeight || f.clientHeight || f.scrollHeight || 0;
  882. d.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((l - a.offsetHeight) / 3) + document.body.scrollTop + "px") : (a.style.marginLeft = Math.floor(-a.offsetWidth / 2) + "px", a.style.top = Math.floor((l - a.offsetHeight) / 3) + "px");
  883. }, d.About.Remove = function(e) {
  884. d.About.div && (document.body.removeChild(d.About.div), delete d.About.div);
  885. }, d.About.GetJax = function(e, t, n, r) {
  886. var i = [];
  887. for (var s in t) t.hasOwnProperty(s) && t[s] && (r && t[s].version || t[s].isa && t[s].isa(t)) && i.push((t[s].id || s) + " " + n + " v" + t[s].version);
  888. i.sort();
  889. for (var o = 0, u = i.length; o < u; o++) e.push(i[o], [ "br" ]);
  890. return e;
  891. }, d.Help = function() {
  892. window.open(c.helpURL, "MathJaxHelp");
  893. }, d.ShowSource = function(e) {
  894. e || (e = window.event);
  895. var t = {
  896. screenX: e.screenX,
  897. screenY: e.screenY
  898. };
  899. if (!d.jax) return;
  900. if (this.format === "MathML") {
  901. var i = MathJax.ElementJax.mml;
  902. if (i && typeof i.mbase.prototype.toMathML != "undefined") try {
  903. d.ShowSource.Text(d.jax.root.toMathML(), e);
  904. } catch (s) {
  905. if (!s.restart) throw s;
  906. r.After([ this, d.ShowSource, t ], s.restart);
  907. } else if (!n.loadingToMathML) {
  908. n.loadingToMathML = !0, d.ShowSource.Window(e), r.Queue(n.Require("[MathJax]/extensions/toMathML.js"), function() {
  909. delete n.loadingToMathML, i.mbase.prototype.toMathML || (i.mbase.prototype.toMathML = function() {});
  910. }, [ this, d.ShowSource, t ]);
  911. return;
  912. }
  913. } else {
  914. if (d.jax.originalText == null) {
  915. alert("No original form available");
  916. return;
  917. }
  918. d.ShowSource.Text(d.jax.originalText, e);
  919. }
  920. }, d.ShowSource.Window = function(e) {
  921. if (!d.ShowSource.w) {
  922. var t = [], n = c.windowSettings;
  923. for (var r in n) n.hasOwnProperty(r) && t.push(r + "=" + n[r]);
  924. d.ShowSource.w = window.open("", "_blank", t.join(","));
  925. }
  926. return d.ShowSource.w;
  927. }, d.ShowSource.Text = function(e, t) {
  928. var n = d.ShowSource.Window(t);
  929. delete d.ShowSource.w, e = e.replace(/^\s*/, "").replace(/\s*$/, ""), e = e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
  930. if (d.isMobile) n.document.open(), n.document.write("<html><head><meta name='viewport' content='width=device-width, initial-scale=1.0' /><title>MathJax Equation Source</title></head><body style='font-size:85%'>"), n.document.write("<pre>" + e + "</pre>"), n.document.write("<hr><input type='button' value='Close' onclick='window.close()' />"), n.document.write("</body></html>"), n.document.close(); else {
  931. n.document.open(), n.document.write("<html><head><title>MathJax Equation Source</title></head><body style='font-size:85%'>"), n.document.write("<table><tr><td><pre>" + e + "</pre></td></tr></table>"), n.document.write("</body></html>"), n.document.close();
  932. var r = n.document.body.firstChild;
  933. setTimeout(function() {
  934. var e = n.outerHeight - n.innerHeight || 30, i = n.outerWidth - n.innerWidth || 30, s, o;
  935. i = Math.max(100, Math.min(Math.floor(.5 * screen.width), r.offsetWidth + i + 25)), e = Math.max(40, Math.min(Math.floor(.5 * screen.height), r.offsetHeight + e + 25)), n.resizeTo(i, e), t && t.screenX != null && (s = Math.max(0, Math.min(t.screenX - Math.floor(i / 2), screen.width - i - 20)), o = Math.max(0, Math.min(t.screenY - Math.floor(e / 2), screen.height - e - 20)), n.moveTo(s, o));
  936. }, 50);
  937. }
  938. }, d.Scale = function() {
  939. var t = i["HTML-CSS"], n = i.NativeMML, r = i.SVG, s = (t || n || r || {
  940. config: {
  941. scale: 100
  942. }
  943. }).config.scale, o = prompt("Scale all mathematics (compared to surrounding text) by", s + "%");
  944. o && (o.match(/^\s*\d+(\.\d*)?\s*%?\s*$/) ? (o = parseFloat(o), o ? o !== s && (t && (t.config.scale = o), n && (n.config.scale = o), r && (r.config.scale = o), d.cookie.scale = o, d.saveCookie(), e.Reprocess()) : alert("The scale should not be zero")) : alert("The scale should be a percentage (e.g., 120%)"));
  945. }, d.Zoom = function() {
  946. MathJax.Extension.MathZoom || n.Require("[MathJax]/extensions/MathZoom.js");
  947. }, d.Renderer = function() {
  948. var t = e.outputJax["jax/mml"];
  949. if (t[0] !== c.settings.renderer) {
  950. var n = e.Browser, r, i = d.Renderer.Messages, s;
  951. switch (c.settings.renderer) {
  952. case "NativeMML":
  953. c.settings.warnedMML || (n.isChrome || n.isSafari && !n.versionAtLeast("5.0") ? r = i.MML.WebKit : n.isMSIE ? n.hasMathPlayer || (r = i.MML.MSIE) : r = i.MML[n], s = "warnedMML");
  954. break;
  955. case "SVG":
  956. c.settings.warnedSVG || n.isMSIE && !f && (r = i.SVG.MSIE);
  957. }
  958. if (r) {
  959. r += "\n\nSwitch the renderer anyway?\n\n(Press OK to switch, CANCEL to continue with the current renderer)", d.cookie.renderer = t[0].id, d.saveCookie();
  960. if (!confirm(r)) return;
  961. s && (d.cookie[s] = c.settings[s] = !0), d.cookie.renderer = c.settings.renderer, d.saveCookie();
  962. }
  963. e.Queue([ "setRenderer", e, c.settings.renderer, "jax/mml" ], [ "Rerender", e ]);
  964. }
  965. }, d.Renderer.Messages = {
  966. MML: {
  967. WebKit: "Your browser doesn't seem to support MathML natively, so switching to MathML output may cause the mathematics on the page to become unreadable.",
  968. MSIE: "Internet Explorer requires the MathPlayer plugin in order to process MathML output.",
  969. Opera: "Opera's support for MathML is limited, so switching to MathML output may cause some expressions to render poorly.",
  970. Safari: "Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly.",
  971. Firefox: "Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly."
  972. },
  973. SVG: {
  974. MSIE: "SVG is not implemented in Internet Explorer prior to IE9, or when the browser is emulating IE8 or below. Switching to SVG output will cause the mathemtics to not display properly."
  975. }
  976. }, d.Font = function() {
  977. var e = i["HTML-CSS"];
  978. if (!e) return;
  979. document.location.reload();
  980. }, d.MPEvents = function(e) {
  981. var t = c.settings.discoverable, n = d.MPEvents.Messages;
  982. if (!f) {
  983. if (c.settings.mpMouse && !confirm(n.IE8warning)) {
  984. delete d.cookie.mpContext, delete c.settings.mpContext, delete d.cookie.mpMouse, delete c.settings.mpMouse, d.saveCookie();
  985. return;
  986. }
  987. c.settings.mpContext = c.settings.mpMouse, d.cookie.mpContext = d.cookie.mpMouse = c.settings.mpMouse, d.saveCookie(), MathJax.Hub.Queue([ "Rerender", MathJax.Hub ]);
  988. } else !t && e.name === "Menu Events" && c.settings.mpContext && alert(n.IE9warning);
  989. }, d.MPEvents.Messages = {
  990. IE8warning: "This will disable the MathJax menu and zoom features, but you can Alt-Click on an expression to obtain the MathJax menu instead.\n\nReally change the MathPlayer settings?",
  991. IE9warning: "The MathJax contextual menu will be disabled, but you can Alt-Click on an expression to obtain the MathJax menu instead."
  992. }, e.Browser.Select({
  993. MSIE: function(e) {
  994. var t = document.compatMode === "BackCompat", n = e.versionAtLeast("8.0") && document.documentMode > 7;
  995. d.Augment({
  996. margin: 20,
  997. msieBackgroundBug: document.documentMode < 9,
  998. msieFixedPositionBug: t || !n,
  999. msieAboutBug: t
  1000. }), f && (delete c.styles["#MathJax_About"].filter, delete c.styles[".MathJax_Menu"].filter);
  1001. },
  1002. Firefox: function(e) {
  1003. d.skipMouseover = e.isMobile && e.versionAtLeast("6.0"), d.skipMousedown = e.isMobile;
  1004. }
  1005. }), d.isMobile = e.Browser.isMobile, d.noContextMenu = e.Browser.noContextMenu, e.Register.StartupHook("End Config", function() {
  1006. c.settings = e.config.menuSettings, typeof c.settings.showRenderer != "undefined" && (c.showRenderer = c.settings.showRenderer), typeof c.settings.showFontMenu != "undefined" && (c.showFontMenu = c.settings.showFontMenu), typeof c.settings.showContext != "undefined" && (c.showContext = c.settings.showContext), d.getCookie(), d.menu = d(v.SUBMENU("Show Math As", v.COMMAND("MathML Code", d.ShowSource, {
  1007. nativeTouch: !0,
  1008. format: "MathML"
  1009. }), v.COMMAND("Original Form", d.ShowSource, {
  1010. nativeTouch: !0
  1011. }), v.RULE(), v.CHECKBOX("Show TeX hints in MathML", "texHints")), v.RULE(), v.SUBMENU("Math Settings", v.SUBMENU("Zoom Trigger", v.RADIO("Hover", "zoom", {
  1012. action: d.Zoom
  1013. }), v.RADIO("Click", "zoom", {
  1014. action: d.Zoom
  1015. }), v.RADIO("Double-Click", "zoom", {
  1016. action: d.Zoom
  1017. }), v.RADIO("No Zoom", "zoom", {
  1018. value: "None"
  1019. }), v.RULE(), v.LABEL("Trigger Requires:"), v.CHECKBOX(e.Browser.isMac ? "Option" : "Alt", "ALT"), v.CHECKBOX("Command", "CMD", {
  1020. hidden: !e.Browser.isMac
  1021. }), v.CHECKBOX("Control", "CTRL", {
  1022. hidden: e.Browser.isMac
  1023. }), v.CHECKBOX("Shift", "Shift")), v.SUBMENU("Zoom Factor", v.RADIO("125%", "zscale"), v.RADIO("133%", "zscale"), v.RADIO("150%", "zscale"), v.RADIO("175%", "zscale"), v.RADIO("200%", "zscale"), v.RADIO("250%", "zscale"), v.RADIO("300%", "zscale"), v.RADIO("400%", "zscale")), v.RULE(), v.SUBMENU("Math Renderer", {
  1024. hidden: !c.showRenderer
  1025. }, v.RADIO("HTML-CSS", "renderer", {
  1026. action: d.Renderer
  1027. }), v.RADIO("MathML", "renderer", {
  1028. action: d.Renderer,
  1029. value: "NativeMML"
  1030. }), v.RADIO("SVG", "renderer", {
  1031. action: d.Renderer
  1032. })), v.SUBMENU("MathPlayer", {
  1033. hidden: !e.Browser.isMSIE || !c.showMathPlayer,
  1034. disabled: !e.Browser.hasMathPlayer
  1035. }, v.LABEL("Let MathPlayer Handle:"), v.CHECKBOX("Menu Events", "mpContext", {
  1036. action: d.MPEvents,
  1037. hidden: !f
  1038. }), v.CHECKBOX("Mouse Events", "mpMouse", {
  1039. action: d.MPEvents,
  1040. hidden: !f
  1041. }), v.CHECKBOX("Mouse and Menu Events", "mpMouse", {
  1042. action: d.MPEvents,
  1043. hidden: f
  1044. })), v.SUBMENU("Font Preference", {
  1045. hidden: !c.showFontMenu
  1046. }, v.LABEL("For HTML-CSS:"), v.RADIO("Auto", "font", {
  1047. action: d.Font
  1048. }), v.RULE(), v.RADIO("TeX (local)", "font", {
  1049. action: d.Font
  1050. }), v.RADIO("TeX (web)", "font", {
  1051. action: d.Font
  1052. }), v.RADIO("TeX (image)", "font", {
  1053. action: d.Font
  1054. }), v.RULE(), v.RADIO("STIX (local)", "font", {
  1055. action: d.Font
  1056. })), v.SUBMENU("Contextual Menu", {
  1057. hidden: !c.showContext
  1058. }, v.RADIO("MathJax", "context"), v.RADIO("Browser", "context")), v.COMMAND("Scale All Math ...", d.Scale), v.RULE().With({
  1059. hidden: !c.showDiscoverable,
  1060. name: "discover_rule"
  1061. }), v.CHECKBOX("Highlight on Hover", "discoverable", {
  1062. hidden: !c.showDiscoverable
  1063. })), v.RULE(), v.COMMAND("About MathJax", d.About), v.COMMAND("MathJax Help", d.Help)), d.isMobile && function() {
  1064. var e = c.settings, t = d.menu.Find("Math Settings", "Zoom Trigger").menu;
  1065. t.items[0].disabled = t.items[1].disabled = !0;
  1066. if (e.zoom === "Hover" || e.zoom == "Click") e.zoom = "None";
  1067. t.items = t.items.slice(0, 4), navigator.appVersion.match(/[ (]Android[) ]/) && d.ITEM.SUBMENU.Augment({
  1068. marker: "\u00bb"
  1069. });
  1070. }();
  1071. }), d.showRenderer = function(e) {
  1072. d.cookie.showRenderer = c.showRenderer = e, d.saveCookie(), d.menu.Find("Math Settings", "Math Renderer").hidden = !e;
  1073. }, d.showMathPlayer = function(e) {
  1074. d.cookie.showMathPlayer = c.showMathPlayer = e, d.saveCookie(), d.menu.Find("Math Settings", "MathPlayer").hidden = !e;
  1075. }, d.showFontMenu = function(e) {
  1076. d.cookie.showFontMenu = c.showFontMenu = e, d.saveCookie(), d.menu.Find("Math Settings", "Font Preference").hidden = !e;
  1077. }, d.showContext = function(e) {
  1078. d.cookie.showContext = c.showContext = e, d.saveCookie(), d.menu.Find("Math Settings", "Contextual Menu").hidden = !e;
  1079. }, d.showDiscoverable = function(e) {
  1080. d.cookie.showContext = c.showContext = e, d.saveCookie(), d.menu.Find("Math Settings", "Highlight on Hover").hidden = !e, d.menu.Find("Math Settings", "discover_rule").hidden = !e;
  1081. }, MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready", function() {
  1082. MathJax.OutputJax["HTML-CSS"].config.imageFont || (d.menu.Find("Math Settings", "Font Preference", "TeX (image)").disabled = !0);
  1083. }), r.Queue(e.Register.StartupHook("End Config", {}), [ "getImages", d ], [ "Styles", n, c.styles ], [ "Post", e.Startup.signal, "MathMenu Ready" ], [ "loadComplete", n, "[MathJax]/extensions/MathMenu.js" ]);
  1084. }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.CallBack, MathJax.OutputJax), function(e, t, n, r, i) {
  1085. var s = "2.1", o = e.CombineConfig("MathZoom", {
  1086. styles: {
  1087. "#MathJax_Zoom": {
  1088. position: "absolute",
  1089. "background-color": "#F0F0F0",
  1090. overflow: "auto",
  1091. display: "block",
  1092. "z-index": 301,
  1093. padding: ".5em",
  1094. border: "1px solid black",
  1095. margin: 0,
  1096. "font-weight": "normal",
  1097. "font-style": "normal",
  1098. "text-align": "left",
  1099. "text-indent": 0,
  1100. "text-transform": "none",
  1101. "line-height": "normal",
  1102. "letter-spacing": "normal",
  1103. "word-spacing": "normal",
  1104. "word-wrap": "normal",
  1105. "white-space": "nowrap",
  1106. "float": "none",
  1107. "box-shadow": "5px 5px 15px #AAAAAA",
  1108. "-webkit-box-shadow": "5px 5px 15px #AAAAAA",
  1109. "-moz-box-shadow": "5px 5px 15px #AAAAAA",
  1110. "-khtml-box-shadow": "5px 5px 15px #AAAAAA",
  1111. filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"
  1112. },
  1113. "#MathJax_ZoomOverlay": {
  1114. position: "absolute",
  1115. left: 0,
  1116. top: 0,
  1117. "z-index": 300,
  1118. display: "inline-block",
  1119. width: "100%",
  1120. height: "100%",
  1121. border: 0,
  1122. padding: 0,
  1123. margin: 0,
  1124. "background-color": "white",
  1125. opacity: 0,
  1126. filter: "alpha(opacity=0)"
  1127. },
  1128. "#MathJax_ZoomEventTrap": {
  1129. position: "absolute",
  1130. left: 0,
  1131. top: 0,
  1132. "z-index": 302,
  1133. display: "inline-block",
  1134. border: 0,
  1135. padding: 0,
  1136. margin: 0,
  1137. "background-color": "white",
  1138. opacity: 0,
  1139. filter: "alpha(opacity=0)"
  1140. }
  1141. }
  1142. }), u, a, f;
  1143. MathJax.Hub.Register.StartupHook("MathEvents Ready", function() {
  1144. f = MathJax.Extension.MathEvents.Event, u = MathJax.Extension.MathEvents.Event.False, a = MathJax.Extension.MathEvents.Hover;
  1145. });
  1146. var l = MathJax.Extension.MathZoom = {
  1147. version: s,
  1148. settings: e.config.menuSettings,
  1149. scrollSize: 18,
  1150. HandleEvent: function(e, t, n) {
  1151. return l.settings.CTRL && !e.ctrlKey ? !0 : l.settings.ALT && !e.altKey ? !0 : l.settings.CMD && !e.metaKey ? !0 : l.settings.Shift && !e.shiftKey ? !0 : l[t] ? l[t](e, n) : !0;
  1152. },
  1153. Click: function(e, t) {
  1154. if (this.settings.zoom === "Click") return this.Zoom(e, t);
  1155. },
  1156. DblClick: function(e, t) {
  1157. if (this.settings.zoom === "Double-Click") return this.Zoom(e, t);
  1158. },
  1159. Hover: function(e, t) {
  1160. return this.settings.zoom === "Hover" ? (this.Zoom(e, t), !0) : !1;
  1161. },
  1162. Zoom: function(n, r) {
  1163. this.Remove(), a.ClearHoverTimer(), f.ClearSelection();
  1164. var i = MathJax.OutputJax[r.jaxID], s = i.getJaxFromMath(r);
  1165. s.hover && a.UnHover(s);
  1166. var l = Math.floor(.85 * document.body.clientWidth), c = Math.floor(.85 * Math.max(document.body.clientHeight, document.documentElement.clientHeight)), h = t.Element("span", {
  1167. style: {
  1168. position: "relative",
  1169. display: "inline-block",
  1170. height: 0,
  1171. width: 0
  1172. },
  1173. id: "MathJax_ZoomFrame"
  1174. }, [ [ "span", {
  1175. id: "MathJax_ZoomOverlay",
  1176. onmousedown: this.Remove
  1177. } ], [ "span", {
  1178. id: "MathJax_Zoom",
  1179. onclick: this.Remove,
  1180. style: {
  1181. visibility: "hidden",
  1182. fontSize: this.settings.zscale,
  1183. "max-width": l + "px",
  1184. "max-height": c + "px"
  1185. }
  1186. }, [ [ "span", {
  1187. style: {
  1188. display: "inline-block",
  1189. "white-space": "nowrap"
  1190. }
  1191. } ] ] ] ]), p = h.lastChild, v = p.firstChild, m = h.firstChild;
  1192. r.parentNode.insertBefore(h, r), r.parentNode.insertBefore(r, h), v.addEventListener && v.addEventListener("mousedown", this.Remove, !0);
  1193. if (this.msieTrapEventBug) {
  1194. var y = t.Element("span", {
  1195. id: "MathJax_ZoomEventTrap",
  1196. onmousedown: this.Remove
  1197. });
  1198. h.insertBefore(y, p);
  1199. }
  1200. if (this.msieZIndexBug) {
  1201. var w = t.addElement(document.body, "img", {
  1202. src: "about:blank",
  1203. id: "MathJax_ZoomTracker",
  1204. width: 0,
  1205. height: 0,
  1206. style: {
  1207. width: 0,
  1208. height: 0,
  1209. position: "relative"
  1210. }
  1211. });
  1212. h.style.position = "relative", h.style.zIndex = o.styles["#MathJax_ZoomOverlay"]["z-index"], h = w;
  1213. }
  1214. var E = i.Zoom(s, v, r, l, c);
  1215. return this.msiePositionBug && (this.msieSizeBug && (p.style.height = E.zH + "px", p.style.width = E.zW + "px"), p.offsetHeight > c && (p.style.height = c + "px", p.style.width = E.zW + this.scrollSize + "px"), p.offsetWidth > l && (p.style.width = l + "px", p.style.height = E.zH + this.scrollSize + "px")), this.operaPositionBug && (p.style.width = Math.min(l, E.zW) + "px"), p.offsetWidth < l && p.offsetHeight < c && (p.style.overflow = "visible"), this.Position(p, E), this.msieTrapEventBug && (y.style.height = p.clientHeight + "px", y.style.width = p.clientWidth + "px", y.style.left = parseFloat(p.style.left) + p.clientLeft + "px", y.style.top = parseFloat(p.style.top) + p.clientTop + "px"), p.style.visibility = "", this.settings.zoom === "Hover" && (m.onmouseover = this.Remove), window.addEventListener ? addEventListener("resize", this.Resize, !1) : window.attachEvent ? attachEvent("onresize", this.Resize) : (this.onresize = window.onresize, window.onresize = this.Resize), e.signal.Post([ "math zoomed", s ]), u(n);
  1216. },
  1217. Position: function(e, t) {
  1218. var n = this.Resize(), r = n.x, i = n.y, s = t.mW, o = -s - Math.floor((e.offsetWidth - s) / 2), u = t.Y;
  1219. e.style.left = Math.max(o, 10 - r) + "px", e.style.top = Math.max(u, 10 - i) + "px", l.msiePositionBug || l.SetWH();
  1220. },
  1221. Resize: function(e) {
  1222. l.onresize && l.onresize(e);
  1223. var t = 0, n = 0, r, i = document.getElementById("MathJax_ZoomFrame"), s = document.getElementById("MathJax_ZoomOverlay");
  1224. r = i;
  1225. while (r.offsetParent) t += r.offsetLeft, r = r.offsetParent;
  1226. l.operaPositionBug && (i.style.border = "1px solid"), r = i;
  1227. while (r.offsetParent) n += r.offsetTop, r = r.offsetParent;
  1228. return l.operaPositionBug && (i.style.border = ""), s.style.left = -t + "px", s.style.top = -n + "px", l.msiePositionBug ? setTimeout(l.SetWH, 0) : l.SetWH(), {
  1229. x: t,
  1230. y: n
  1231. };
  1232. },
  1233. SetWH: function() {
  1234. var e = document.getElementById("MathJax_ZoomOverlay");
  1235. e.style.width = e.style.height = "1px";
  1236. var t = document.documentElement || document.body;
  1237. e.style.width = t.scrollWidth + "px", e.style.height = Math.max(t.clientHeight, t.scrollHeight) + "px";
  1238. },
  1239. Remove: function(n) {
  1240. var r = document.getElementById("MathJax_ZoomFrame");
  1241. if (r) {
  1242. var i = MathJax.OutputJax[r.previousSibling.jaxID], s = i.getJaxFromMath(r.previousSibling);
  1243. e.signal.Post([ "math unzoomed", s ]), r.parentNode.removeChild(r), r = document.getElementById("MathJax_ZoomTracker"), r && r.parentNode.removeChild(r);
  1244. if (l.operaRefreshBug) {
  1245. var o = t.addElement(document.body, "div", {
  1246. style: {
  1247. position: "fixed",
  1248. left: 0,
  1249. top: 0,
  1250. width: "100%",
  1251. height: "100%",
  1252. backgroundColor: "white",
  1253. opacity: 0
  1254. },
  1255. id: "MathJax_OperaDiv"
  1256. });
  1257. document.body.removeChild(o);
  1258. }
  1259. window.removeEventListener ? removeEventListener("resize", l.Resize, !1) : window.detachEvent ? detachEvent("onresize", l.Resize) : (window.onresize = l.onresize, delete l.onresize);
  1260. }
  1261. return u(n);
  1262. }
  1263. };
  1264. e.Browser.Select({
  1265. MSIE: function(e) {
  1266. var t = document.documentMode || 0, n = t >= 9;
  1267. l.msiePositionBug = !n, l.msieSizeBug = e.versionAtLeast("7.0") && (!document.documentMode || t === 7 || t === 8), l.msieZIndexBug = t <= 7, l.msieInlineBlockAlignBug = t <= 7, l.msieTrapEventBug = !window.addEventListener, document.compatMode === "BackCompat" && (l.scrollSize = 52), n && delete o.styles["#MathJax_Zoom"].filter;
  1268. },
  1269. Opera: function(e) {
  1270. l.operaPositionBug = !0, l.operaRefreshBug = !0;
  1271. }
  1272. }), l.topImg = l.msieInlineBlockAlignBug ? t.Element("img", {
  1273. style: {
  1274. width: 0,
  1275. height: 0,
  1276. position: "relative"
  1277. },
  1278. src: "about:blank"
  1279. }) : t.Element("span", {
  1280. style: {
  1281. width: 0,
  1282. height: 0,
  1283. display: "inline-block"
  1284. }
  1285. });
  1286. if (l.operaPositionBug || l.msieTopBug) l.topImg.style.border = "1px solid";
  1287. MathJax.Callback.Queue([ "StartupHook", MathJax.Hub.Register, "Begin Styles", {} ], [ "Styles", n, o.styles ], [ "Post", e.Startup.signal, "MathZoom Ready" ], [ "loadComplete", n, "[MathJax]/extensions/MathZoom.js" ]);
  1288. }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.OutputJax["HTML-CSS"], MathJax.OutputJax.NativeMML), MathJax.Extension["TeX/AMSmath"] = {
  1289. version: "2.1",
  1290. number: 0,
  1291. startNumber: 0,
  1292. labels: {},
  1293. eqlabels: {},
  1294. refs: []
  1295. }, MathJax.Hub.Register.StartupHook("TeX Jax Ready", function() {
  1296. var e = MathJax.ElementJax.mml, t = MathJax.InputJax.TeX, n = MathJax.Extension["TeX/AMSmath"], r = t.Definitions, i = t.Stack.Item, s = t.config.equationNumbers, o = function(e) {
  1297. var n = [];
  1298. for (var r = 0, i = e.length; r < i; r++) n[r] = t.Parse.prototype.Em(e[r]);
  1299. return n.join(" ");
  1300. };
  1301. r.Add({
  1302. mathchar0mo: {
  1303. iiiint: [ "2A0C", {
  1304. texClass: e.TEXCLASS.OP
  1305. } ]
  1306. },
  1307. macros: {
  1308. mathring: [ "Accent", "2DA" ],
  1309. nobreakspace: "Tilde",
  1310. negmedspace: [ "Spacer", e.LENGTH.NEGATIVEMEDIUMMATHSPACE ],
  1311. negthickspace: [ "Spacer", e.LENGTH.NEGATIVETHICKMATHSPACE ],
  1312. idotsint: [ "MultiIntegral", "\\int\\cdots\\int" ],
  1313. dddot: [ "Accent", "20DB" ],
  1314. ddddot: [ "Accent", "20DC" ],
  1315. sideset: [ "Macro", "\\mathop{\\mathop{\\rlap{\\phantom{#3}}}\\nolimits#1\\!\\mathop{#3}\\nolimits#2}", 3 ],
  1316. boxed: [ "Macro", "\\fbox{$\\displaystyle{#1}$}", 1 ],
  1317. tag: "HandleTag",
  1318. notag: "HandleNoTag",
  1319. label: "HandleLabel",
  1320. ref: "HandleRef",
  1321. eqref: [ "HandleRef", !0 ],
  1322. substack: [ "Macro", "\\begin{subarray}{c}#1\\end{subarray}", 1 ],
  1323. injlim: [ "NamedOp", "inj&thinsp;lim" ],
  1324. projlim: [ "NamedOp", "proj&thinsp;lim" ],
  1325. varliminf: [ "Macro", "\\mathop{\\underline{\\mmlToken{mi}{lim}}}" ],
  1326. varlimsup: [ "Macro", "\\mathop{\\overline{\\mmlToken{mi}{lim}}}" ],
  1327. varinjlim: [ "Macro", "\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}" ],
  1328. varprojlim: [ "Macro", "\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}" ],
  1329. DeclareMathOperator: "HandleDeclareOp",
  1330. operatorname: "HandleOperatorName",
  1331. genfrac: "Genfrac",
  1332. frac: [ "Genfrac", "", "", "", "" ],
  1333. tfrac: [ "Genfrac", "", "", "", 1 ],
  1334. dfrac: [ "Genfrac", "", "", "", 0 ],
  1335. binom: [ "Genfrac", "(", ")", "0em", "" ],
  1336. tbinom: [ "Genfrac", "(", ")", "0em", 1 ],
  1337. dbinom: [ "Genfrac", "(", ")", "0em", 0 ],
  1338. cfrac: "CFrac",
  1339. shoveleft: [ "HandleShove", e.ALIGN.LEFT ],
  1340. shoveright: [ "HandleShove", e.ALIGN.RIGHT ],
  1341. xrightarrow: [ "xArrow", 8594, 5, 6 ],
  1342. xleftarrow: [ "xArrow", 8592, 7, 3 ]
  1343. },
  1344. environment: {
  1345. align: [ "AMSarray", null, !0, !0, "rlrlrlrlrlrl", o([ 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18 ]) ],
  1346. "align*": [ "AMSar…

Large files files are truncated, but you can click here to view the full file