/utils/MathJax/2.1/config/KAthJax-da9a7f53e588f3837b045a600e1dc439.js
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
- MathJax.Hub.Config({
- messageStyle: "none",
- skipStartupTypeset: !0,
- jax: [ "input/TeX", "output/HTML-CSS" ],
- extensions: [ "tex2jax.js", "MathZoom.js" ],
- TeX: {
- extensions: [ "AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js", "newcommand.js", "boldsymbol.js" ],
- Macros: {
- RR: "\\mathbb{R}",
- blue: "\\color{#6495ED}",
- orange: "\\color{#FFA500}",
- pink: "\\color{#FF00AF}",
- red: "\\color{#DF0030}",
- green: "\\color{#28AE7B}",
- gray: "\\color{gray}",
- purple: "\\color{#9D38BD}"
- },
- Augment: {
- Definitions: {
- macros: {
- lrsplit: "LRSplit",
- cancel: "Cancel",
- lcm: [ "NamedOp", 0 ]
- }
- },
- Parse: {
- prototype: {
- LRSplit: function(e) {
- 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());
- r.numalign = MathJax.ElementJax.mml.ALIGN.LEFT, r.denomalign = MathJax.ElementJax.mml.ALIGN.RIGHT, r.linethickness = "0em", this.Push(r);
- },
- Cancel: function(e) {
- this.Push(MathJax.ElementJax.mml.menclose(this.ParseArg(e)).With({
- notation: MathJax.ElementJax.mml.NOTATION.UPDIAGONALSTRIKE
- }));
- }
- }
- }
- }
- },
- "HTML-CSS": {
- scale: 100,
- showMathMenu: !1,
- availableFonts: [ "TeX" ],
- imageFont: null
- }
- }), MathJax.Ajax.timeout = 6e4, MathJax.Ajax.loadError = function(e) {
- return function(t) {
- Khan.warnTimeout(), MathJax.Ajax.loadComplete = function(e) {}, e.call(this, t);
- };
- }(MathJax.Ajax.loadError), MathJax.Hub.Register.StartupHook("HTML-CSS Jax - disable web fonts", function() {
- Khan.warnFont();
- }), MathJax.Message.Init = function(e) {
- return function(t) {
- if (this.div && this.div.parentNode == null) {
- var n = document.getElementById("MathJax_Message");
- if (n && n.firstChild == null) {
- var r = n.parentNode;
- r && r.removeChild(n);
- }
- }
- e.call(this, t);
- };
- }(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({
- "v1.0-compatible": !1
- }), function(e, t, n, r, i, s) {
- var o = "2.1", u = MathJax.Extension, a = u.MathEvents = {
- version: o
- }, f = e.config.menuSettings, l = {
- hover: 500,
- frame: {
- x: 3.5,
- y: 5,
- bwidth: 1,
- bcolor: "#A6D",
- hwidth: "15px",
- hcolor: "#83A"
- },
- button: {
- x: -4,
- y: -3,
- wx: -2,
- src: n.fileURL(i.imageDir + "/MenuArrow-15.png")
- },
- fadeinInc: .2,
- fadeoutInc: .05,
- fadeDelay: 50,
- fadeoutStart: 400,
- fadeoutDelay: 15e3,
- styles: {
- ".MathJax_Hover_Frame": {
- "border-radius": ".25em",
- "-webkit-border-radius": ".25em",
- "-moz-border-radius": ".25em",
- "-khtml-border-radius": ".25em",
- "box-shadow": "0px 0px 15px #83A",
- "-webkit-box-shadow": "0px 0px 15px #83A",
- "-moz-box-shadow": "0px 0px 15px #83A",
- "-khtml-box-shadow": "0px 0px 15px #83A",
- border: "1px solid #A6D ! important",
- display: "inline-block",
- position: "absolute"
- },
- ".MathJax_Hover_Arrow": {
- position: "absolute",
- width: "15px",
- height: "11px",
- cursor: "pointer"
- }
- }
- }, c = a.Event = {
- LEFTBUTTON: 0,
- RIGHTBUTTON: 2,
- MENUKEY: "altKey",
- Mousedown: function(e) {
- return c.Handler(e, "Mousedown", this);
- },
- Mouseup: function(e) {
- return c.Handler(e, "Mouseup", this);
- },
- Mousemove: function(e) {
- return c.Handler(e, "Mousemove", this);
- },
- Mouseover: function(e) {
- return c.Handler(e, "Mouseover", this);
- },
- Mouseout: function(e) {
- return c.Handler(e, "Mouseout", this);
- },
- Click: function(e) {
- return c.Handler(e, "Click", this);
- },
- DblClick: function(e) {
- return c.Handler(e, "DblClick", this);
- },
- Menu: function(e) {
- return c.Handler(e, "ContextMenu", this);
- },
- Handler: function(e, t, r) {
- if (n.loadingMathMenu) return c.False(e);
- var s = i[r.jaxID];
- e || (e = window.event), e.isContextMenu = t === "ContextMenu";
- if (s[t]) return s[t](e, r);
- if (u.MathZoom) return u.MathZoom.HandleEvent(e, t, r);
- },
- False: function(e) {
- return e || (e = window.event), e && (e.preventDefault && e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0, e.returnValue = !1), !1;
- },
- ContextMenu: function(t, o, u) {
- var l = i[o.jaxID], p = l.getJaxFromMath(o), d = (l.config.showMathMenu != null ? l : e).config.showMathMenu;
- if (!d || f.context !== "MathJax" && !u) return;
- 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);
- var v = MathJax.Menu;
- if (v) {
- v.jax = p;
- var y = v.menu.Find("Show Math As").menu;
- y.items[1].name = s[p.inputJax].sourceMenuTitle || "Original Form", y.items[0].hidden = p.inputJax === "Error";
- var w = v.menu.Find("Math Settings", "MathPlayer");
- return w.hidden = p.outputJax !== "NativeMML" || !e.Browser.hasMathPlayer, v.menu.Post(t);
- }
- if (!n.loadingMathMenu) {
- n.loadingMathMenu = !0;
- var E = {
- pageX: t.pageX,
- pageY: t.pageY,
- clientX: t.clientX,
- clientY: t.clientY
- };
- r.Queue(n.Require("[MathJax]/extensions/MathMenu.js"), function() {
- delete n.loadingMathMenu, MathJax.Menu || (MathJax.Menu = {});
- }, [ "ContextMenu", this, E, o, u ]);
- }
- return c.False(t);
- },
- AltContextMenu: function(t, n) {
- var r = i[n.jaxID], s = (r.config.showMathMenu != null ? r : e).config.showMathMenu;
- if (s) {
- s = (r.config.showMathMenuMSIE != null ? r : e).config.showMathMenuMSIE;
- if (f.context === "MathJax" && !f.mpContext && s) {
- if (!a.noContextMenuBug || t.button !== c.RIGHTBUTTON) return;
- } else if (!t[c.MENUKEY] || t.button !== c.LEFTBUTTON) return;
- return r.ContextMenu(t, n, !0);
- }
- },
- ClearSelection: function() {
- a.safariContextMenuBug && setTimeout("window.getSelection().empty()", 0), document.selection && setTimeout("document.selection.empty()", 0);
- },
- getBBox: function(e) {
- e.appendChild(a.topImg);
- var t = a.topImg.offsetTop, n = e.offsetHeight - t, r = e.offsetWidth;
- return e.removeChild(a.topImg), {
- w: r,
- h: t,
- d: n
- };
- }
- }, h = a.Hover = {
- Mouseover: function(t, n) {
- if (f.discoverable || f.zoom === "Hover") {
- var r = t.fromElement || t.relatedTarget, i = t.toElement || t.target;
- if (r && i && (r.isMathJax != i.isMathJax || e.getJaxFor(r) !== e.getJaxFor(i))) {
- var s = this.getJaxFromMath(n);
- return s.hover ? h.ReHover(s) : h.HoverTimer(s, n), c.False(t);
- }
- }
- },
- Mouseout: function(t, n) {
- if (f.discoverable || f.zoom === "Hover") {
- var r = t.fromElement || t.relatedTarget, i = t.toElement || t.target;
- if (r && i && (r.isMathJax != i.isMathJax || e.getJaxFor(r) !== e.getJaxFor(i))) {
- var s = this.getJaxFromMath(n);
- return s.hover ? h.UnHover(s) : h.ClearHoverTimer(), c.False(t);
- }
- }
- },
- Mousemove: function(e, t) {
- if (f.discoverable || f.zoom === "Hover") {
- var n = this.getJaxFromMath(t);
- if (n.hover) return;
- if (h.lastX == e.clientX && h.lastY == e.clientY) return;
- return h.lastX = e.clientX, h.lastY = e.clientY, h.HoverTimer(n, t), c.False(e);
- }
- },
- HoverTimer: function(e, t) {
- this.ClearHoverTimer(), this.hoverTimer = setTimeout(r([ "Hover", this, e, t ]), l.hover);
- },
- ClearHoverTimer: function() {
- this.hoverTimer && (clearTimeout(this.hoverTimer), delete this.hoverTimer);
- },
- Hover: function(n, r) {
- if (u.MathZoom && u.MathZoom.Hover({}, r)) return;
- 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;
- a.msieBorderWidthBug && (d = 0), n.hover = {
- opacity: 0,
- id: n.inputID + "-Hover"
- };
- var v = t.Element("span", {
- id: n.hover.id,
- isMathJax: !0,
- style: {
- display: "inline-block",
- width: 0,
- height: 0,
- position: "relative"
- }
- }, [ [ "span", {
- className: "MathJax_Hover_Frame",
- isMathJax: !0,
- style: {
- display: "inline-block",
- position: "absolute",
- top: this.Px(-f.h - p - d - (f.y || 0)),
- left: this.Px(-h - d + (f.x || 0)),
- width: this.Px(f.w + 2 * h),
- height: this.Px(f.h + f.d + 2 * p),
- opacity: 0,
- filter: "alpha(opacity=0)"
- }
- } ] ]), m = t.Element("span", {
- isMathJax: !0,
- id: n.hover.id + "Menu",
- style: {
- display: "inline-block",
- "z-index": 1,
- width: 0,
- height: 0,
- position: "relative"
- }
- }, [ [ "img", {
- className: "MathJax_Hover_Arrow",
- isMathJax: !0,
- math: r,
- src: l.button.src,
- onclick: this.HoverMenu,
- jax: s.id,
- style: {
- left: this.Px(f.w + h + d + (f.x || 0) + l.button.x),
- top: this.Px(-f.h - p - d - (f.y || 0) - l.button.y),
- opacity: 0,
- filter: "alpha(opacity=0)"
- }
- } ] ]);
- 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);
- },
- ReHover: function(e) {
- e.hover.remove && clearTimeout(e.hover.remove), e.hover.remove = setTimeout(r([ "UnHover", this, e ]), l.fadeoutDelay), this.HoverFadeTimer(e, l.fadeinInc);
- },
- UnHover: function(e) {
- e.hover.nofade || this.HoverFadeTimer(e, -l.fadeoutInc, l.fadeoutStart);
- },
- HoverFade: function(e) {
- 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;
- var t = document.getElementById(e.hover.id), n = document.getElementById(e.hover.id + "Menu");
- 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);
- if (e.hover.opacity === 1) return;
- if (e.hover.opacity > 0) {
- this.HoverFadeTimer(e, e.hover.inc);
- return;
- }
- t.parentNode.removeChild(t), n && n.parentNode.removeChild(n), e.hover.remove && clearTimeout(e.hover.remove), delete e.hover;
- },
- HoverFadeTimer: function(e, t, n) {
- e.hover.inc = t, e.hover.timer || (e.hover.timer = setTimeout(r([ "HoverFade", this, e ]), n || l.fadeDelay));
- },
- HoverMenu: function(e) {
- return e || (e = window.event), i[this.jax].ContextMenu(e, this.math, !0);
- },
- ClearHover: function(e) {
- e.hover.remove && clearTimeout(e.hover.remove), e.hover.timer && clearTimeout(e.hover.timer), h.ClearHoverTimer(), delete e.hover;
- },
- Px: function(e) {
- return Math.abs(e) < .006 ? "0px" : e.toFixed(2).replace(/\.?0+$/, "") + "px";
- },
- getImages: function() {
- var e = new Image;
- e.src = l.button.src;
- }
- }, p = a.Touch = {
- last: 0,
- delay: 500,
- start: function(e) {
- var t = (new Date).getTime(), n = t - p.last < p.delay && p.up;
- p.last = t, p.up = !1, n && (p.timeout = setTimeout(p.menu, p.delay, e, this), e.preventDefault());
- },
- end: function(e) {
- var t = (new Date).getTime();
- p.up = t - p.last < p.delay;
- 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);
- },
- menu: function(e, t) {
- return delete p.timeout, p.last = 0, p.up = !1, c.Handler(e.touches[0] || e.touch, "ContextMenu", t);
- }
- };
- if (e.Browser.isMobile) {
- var d = l.styles[".MathJax_Hover_Arrow"];
- d.width = "25px", d.height = "18px", l.button.x = -6;
- }
- e.Browser.Select({
- MSIE: function(e) {
- var t = document.documentMode || 0, n = e.versionAtLeast("8.0");
- a.msieBorderWidthBug = document.compatMode === "BackCompat", a.msieEventBug = e.isIE9, a.msieAlignBug = !n || t < 8, t < 9 && (c.LEFTBUTTON = 1);
- },
- Safari: function(e) {
- a.safariContextMenuBug = !0;
- },
- Opera: function(e) {
- a.operaPositionBug = !0;
- },
- Konqueror: function(e) {
- a.noContextMenuBug = !0;
- }
- }), a.topImg = a.msieAlignBug ? t.Element("img", {
- style: {
- width: 0,
- height: 0,
- position: "relative"
- },
- src: "about:blank"
- }) : t.Element("span", {
- style: {
- width: 0,
- height: 0,
- display: "inline-block"
- }
- }), a.operaPositionBug && (a.topImg.style.border = "1px solid"), a.config = l = e.CombineConfig("MathEvents", l);
- var v = function() {
- var e = l.styles[".MathJax_Hover_Frame"];
- 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;
- };
- 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" ]);
- }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.Callback, MathJax.OutputJax, MathJax.InputJax), function(e, t, n, r, i) {
- var s = "2.1", o = MathJax.Callback.Signal("menu");
- MathJax.Extension.MathMenu = {
- version: s,
- signal: o
- };
- var u = e.Browser.isPC, a = e.Browser.isMSIE, f = (document.documentMode || 0) > 8, l = u ? null : "5px", c = e.CombineConfig("MathMenu", {
- delay: 150,
- helpURL: "http://www.mathjax.org/help-v2/user/",
- closeImg: n.fileURL(i.imageDir + "/CloseX-31.png"),
- showRenderer: !0,
- showMathPlayer: !0,
- showFontMenu: !1,
- showContext: !1,
- showDiscoverable: !1,
- windowSettings: {
- status: "no",
- toolbar: "no",
- locationbar: "no",
- menubar: "no",
- directories: "no",
- personalbar: "no",
- resizable: "yes",
- scrollbars: "yes",
- width: 400,
- height: 300,
- left: Math.round((screen.width - 400) / 2),
- top: Math.round((screen.height - 300) / 3)
- },
- styles: {
- "#MathJax_About": {
- position: "fixed",
- left: "50%",
- width: "auto",
- "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": "nowrap",
- "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=2, OffY=2, Color='gray', Positive='true')"
- },
- ".MathJax_Menu": {
- position: "absolute",
- "background-color": "white",
- color: "black",
- width: "auto",
- padding: u ? "2px" : "5px 0px",
- border: "1px solid #CCCCCC",
- margin: 0,
- cursor: "default",
- font: "menu",
- "text-align": "left",
- "text-indent": 0,
- "text-transform": "none",
- "line-height": "normal",
- "letter-spacing": "normal",
- "word-spacing": "normal",
- "word-wrap": "normal",
- "white-space": "nowrap",
- "float": "none",
- "z-index": 201,
- "border-radius": l,
- "-webkit-border-radius": l,
- "-moz-border-radius": l,
- "-khtml-border-radius": l,
- "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=2, OffY=2, Color='gray', Positive='true')"
- },
- ".MathJax_MenuItem": {
- padding: u ? "2px 2em" : "1px 2em",
- background: "transparent"
- },
- ".MathJax_MenuTitle": {
- "background-color": "#CCCCCC",
- margin: u ? "-1px -1px 1px -1px" : "-5px 0 0 0",
- "text-align": "center",
- "font-style": "italic",
- "font-size": "80%",
- color: "#444444",
- padding: "2px 0",
- overflow: "hidden"
- },
- ".MathJax_MenuArrow": {
- position: "absolute",
- right: ".5em",
- color: "#666666",
- "font-family": a ? "'Arial unicode MS'" : null
- },
- ".MathJax_MenuActive .MathJax_MenuArrow": {
- color: "white"
- },
- ".MathJax_MenuCheck": {
- position: "absolute",
- left: ".7em",
- "font-family": a ? "'Arial unicode MS'" : null
- },
- ".MathJax_MenuRadioCheck": {
- position: "absolute",
- left: u ? "1em" : ".7em"
- },
- ".MathJax_MenuLabel": {
- padding: u ? "2px 2em 4px 1.33em" : "1px 2em 3px 1.33em",
- "font-style": "italic"
- },
- ".MathJax_MenuRule": {
- "border-top": u ? "1px solid #CCCCCC" : "1px solid #DDDDDD",
- margin: u ? "4px 1px 0px" : "4px 3px"
- },
- ".MathJax_MenuDisabled": {
- color: "GrayText"
- },
- ".MathJax_MenuActive": {
- "background-color": u ? "Highlight" : "#606872",
- color: u ? "HighlightText" : "white"
- },
- ".MathJax_Menu_Close": {
- position: "absolute",
- width: "31px",
- height: "31px",
- top: "-15px",
- left: "-15px"
- }
- }
- }), h, p;
- e.Register.StartupHook("MathEvents Ready", function() {
- h = MathJax.Extension.MathEvents.Event.False, p = MathJax.Extension.MathEvents.Hover;
- });
- var d = MathJax.Menu = MathJax.Object.Subclass({
- version: s,
- items: [],
- posted: !1,
- title: null,
- margin: 5,
- Init: function(e) {
- this.items = [].slice.call(arguments, 0);
- },
- With: function(t) {
- return t && e.Insert(this, t), this;
- },
- Post: function(e, n) {
- e || (e = window.event);
- var r = this.title ? [ [ "div", {
- className: "MathJax_MenuTitle"
- }, [ this.title ] ] ] : null, i = document.getElementById("MathJax_MenuFrame");
- i || (i = d.Background(this), delete v.lastItem, delete v.lastMenu, delete d.skipUp, o.Post([ "post", d.jax ]));
- var s = t.addElement(i, "div", {
- onmouseup: d.Mouseup,
- ondblclick: h,
- ondragstart: h,
- onselectstart: h,
- oncontextmenu: h,
- menuItem: this,
- className: "MathJax_Menu"
- }, r);
- for (var a = 0, f = this.items.length; a < f; a++) this.items[a].Create(s);
- d.isMobile && t.addElement(s, "span", {
- className: "MathJax_Menu_Close",
- menu: n,
- ontouchstart: d.Close,
- ontouchend: h,
- onmousedown: d.Close,
- onmouseup: h
- }, [ [ "img", {
- src: c.closeImg,
- style: {
- width: "100%",
- height: "100%"
- }
- } ] ]), this.posted = !0, s.style.width = s.offsetWidth + 2 + "px";
- var l = e.pageX, p = e.pageY;
- !l && !p && (l = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, p = e.clientY + document.body.scrollTop + document.documentElement.scrollTop);
- 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 {
- var y = "left", b = n.offsetWidth;
- l = d.isMobile ? 30 : b - 2, p = 0;
- while (n && n !== i) l += n.offsetLeft, p += n.offsetTop, n = n.parentNode;
- 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);
- }
- return s.style.left = l + "px", s.style.top = p + "px", document.selection && document.selection.empty && document.selection.empty(), h(e);
- },
- Remove: function(e, t) {
- o.Post([ "unpost", d.jax ]);
- var n = document.getElementById("MathJax_MenuFrame");
- 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);
- },
- Find: function(e) {
- var t = [].slice.call(arguments, 1);
- 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];
- return null;
- },
- IndexOf: function(e) {
- for (var t = 0, n = this.items.length; t < n; t++) if (this.items[t].name === e) return t;
- return null;
- }
- }, {
- config: c,
- div: null,
- Close: function(e) {
- return d.Event(e, this.menu || this.parentNode, this.menu ? "Touchend" : "Remove");
- },
- Remove: function(e) {
- return d.Event(e, this, "Remove");
- },
- Mouseover: function(e) {
- return d.Event(e, this, "Mouseover");
- },
- Mouseout: function(e) {
- return d.Event(e, this, "Mouseout");
- },
- Mousedown: function(e) {
- return d.Event(e, this, "Mousedown");
- },
- Mouseup: function(e) {
- return d.Event(e, this, "Mouseup");
- },
- Touchstart: function(e) {
- return d.Event(e, this, "Touchstart");
- },
- Touchend: function(e) {
- return d.Event(e, this, "Touchend");
- },
- Event: function(e, t, n, r) {
- if (d.skipMouseover && n === "Mouseover" && !r) return h(e);
- if (d.skipUp) {
- if (n.match(/Mouseup|Touchend/)) return delete d.skipUp, h(e);
- (n === "Touchstart" || n === "Mousedown" && !d.skipMousedown) && delete d.skipUp;
- }
- e || (e = window.event);
- var i = t.menuItem;
- return i && i[n] ? i[n](e, t) : null;
- },
- BGSTYLE: {
- position: "absolute",
- left: 0,
- top: 0,
- "z-index": 200,
- width: "100%",
- height: "100%",
- border: 0,
- padding: 0,
- margin: 0
- },
- Background: function(e) {
- var n = t.addElement(document.body, "div", {
- style: this.BGSTYLE,
- id: "MathJax_MenuFrame"
- }, [ [ "div", {
- style: this.BGSTYLE,
- menuItem: e,
- onmousedown: this.Remove
- } ] ]), r = n.firstChild;
- 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;
- },
- Resize: function() {
- setTimeout(d.SetWH, 0);
- },
- SetWH: function() {
- var e = document.getElementById("MathJax_MenuFrame");
- 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");
- },
- saveCookie: function() {
- t.Cookie.Set("menu", this.cookie);
- },
- getCookie: function() {
- this.cookie = t.Cookie.Get("menu");
- },
- getImages: function() {
- if (d.isMobile) {
- var e = new Image;
- e.src = c.closeImg;
- }
- }
- }), v = d.ITEM = MathJax.Object.Subclass({
- name: "",
- Create: function(e) {
- if (!this.hidden) {
- var n = {
- onmouseover: d.Mouseover,
- onmouseout: d.Mouseout,
- onmouseup: d.Mouseup,
- onmousedown: d.Mousedown,
- ondragstart: h,
- onselectstart: h,
- onselectend: h,
- ontouchstart: d.Touchstart,
- ontouchend: d.Touchend,
- className: "MathJax_MenuItem",
- menuItem: this
- };
- this.disabled && (n.className += " MathJax_MenuDisabled"), t.addElement(e, "div", n, this.Label(n, e));
- }
- },
- Mouseover: function(e, t) {
- this.disabled || this.Activate(t);
- if (!this.menu || !this.menu.posted) {
- var n = document.getElementById("MathJax_MenuFrame").childNodes, r = t.parentNode.childNodes;
- for (var i = 0, s = r.length; i < s; i++) {
- var o = r[i].menuItem;
- o && o.menu && o.menu.posted && o.Deactivate(r[i]);
- }
- s = n.length - 1;
- while (s >= 0 && t.parentNode.menuItem !== n[s].menuItem) n[s].menuItem.posted = !1, n[s].parentNode.removeChild(n[s]), s--;
- this.Timer && !d.isMobile && this.Timer(e, t);
- }
- },
- Mouseout: function(e, t) {
- (!this.menu || !this.menu.posted) && this.Deactivate(t), this.timer && (clearTimeout(this.timer), delete this.timer);
- },
- Mouseup: function(e, t) {
- return this.Remove(e, t);
- },
- Touchstart: function(e, t) {
- return this.TouchEvent(e, t, "Mousedown");
- },
- Touchend: function(e, t) {
- return this.TouchEvent(e, t, "Mouseup");
- },
- TouchEvent: function(e, t, n) {
- 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);
- },
- Remove: function(e, t) {
- return t = t.parentNode.menuItem, t.Remove(e, t);
- },
- Activate: function(e) {
- this.Deactivate(e), e.className += " MathJax_MenuActive";
- },
- Deactivate: function(e) {
- e.className = e.className.replace(/ MathJax_MenuActive/, "");
- },
- With: function(t) {
- return t && e.Insert(this, t), this;
- }
- });
- d.ITEM.COMMAND = d.ITEM.Subclass({
- action: function() {},
- Init: function(e, t, n) {
- this.name = e, this.action = t, this.With(n);
- },
- Label: function(e, t) {
- return [ this.name ];
- },
- Mouseup: function(e, t) {
- return this.disabled || (this.Remove(e, t), o.Post([ "command", this ]), this.action.call(this, e)), h(e);
- }
- }), d.ITEM.SUBMENU = d.ITEM.Subclass({
- menu: null,
- marker: u && !e.Browser.isSafari ? "\u25b6" : "\u25b8",
- Init: function(e, t) {
- this.name = e;
- var n = 1;
- t instanceof d.ITEM || (this.With(t), n++), this.menu = d.apply(d, [].slice.call(arguments, n));
- },
- Label: function(e, t) {
- return this.menu.posted = !1, [ this.name + " ", [ "span", {
- className: "MathJax_MenuArrow"
- }, [ this.marker ] ] ];
- },
- Timer: function(e, t) {
- this.timer && clearTimeout(this.timer), e = {
- clientX: e.clientX,
- clientY: e.clientY
- }, this.timer = setTimeout(r([ "Mouseup", this, e, t ]), c.delay);
- },
- Touchend: function(e, t) {
- var n = this.menu.posted, r = this.SUPER(arguments).Touchend.apply(this, arguments);
- return n && (this.Deactivate(t), delete v.lastItem, delete v.lastMenu), r;
- },
- Mouseup: function(e, t) {
- if (!this.disabled) if (!this.menu.posted) this.timer && (clearTimeout(this.timer), delete this.timer), this.menu.Post(e, t); else {
- var n = document.getElementById("MathJax_MenuFrame").childNodes, r = n.length - 1;
- while (r >= 0) {
- var i = n[r];
- i.menuItem.posted = !1, i.parentNode.removeChild(i);
- if (i.menuItem === this.menu) break;
- r--;
- }
- }
- return h(e);
- }
- }), d.ITEM.RADIO = d.ITEM.Subclass({
- variable: null,
- marker: u ? "\u25cf" : "\u2713",
- Init: function(e, t, n) {
- this.name = e, this.variable = t, this.With(n), this.value == null && (this.value = this.name);
- },
- Label: function(e, t) {
- var n = {
- className: "MathJax_MenuRadioCheck"
- };
- return c.settings[this.variable] !== this.value && (n = {
- style: {
- display: "none"
- }
- }), [ [ "span", n, [ this.marker ] ], " " + this.name ];
- },
- Mouseup: function(e, t) {
- if (!this.disabled) {
- var n = t.parentNode.childNodes;
- for (var r = 0, i = n.length; r < i; r++) {
- var s = n[r].menuItem;
- s && s.variable === this.variable && (n[r].firstChild.style.display = "none");
- }
- t.firstChild.display = "", c.settings[this.variable] = this.value, d.cookie[this.variable] = c.settings[this.variable], d.saveCookie(), o.Post([ "radio button", this ]);
- }
- return this.Remove(e, t), this.action && !this.disabled && this.action.call(d, this), h(e);
- }
- }), d.ITEM.CHECKBOX = d.ITEM.Subclass({
- variable: null,
- marker: "\u2713",
- Init: function(e, t, n) {
- this.name = e, this.variable = t, this.With(n);
- },
- Label: function(e, t) {
- var n = {
- className: "MathJax_MenuCheck"
- };
- return c.settings[this.variable] || (n = {
- style: {
- display: "none"
- }
- }), [ [ "span", n, [ this.marker ] ], " " + this.name ];
- },
- Mouseup: function(e, t) {
- 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);
- }
- }), d.ITEM.LABEL = d.ITEM.Subclass({
- Init: function(e, t) {
- this.name = e, this.With(t);
- },
- Label: function(e, t) {
- return delete e.onmouseover, delete e.onmouseout, delete e.onmousedown, e.className += " MathJax_MenuLabel", [ this.name ];
- }
- }), d.ITEM.RULE = d.ITEM.Subclass({
- Label: function(e, t) {
- return delete e.onmouseover, delete e.onmouseout, delete e.onmousedown, e.className += " MathJax_MenuRule", null;
- }
- }), d.About = function() {
- var n = i["HTML-CSS"] || {
- fontInUse: ""
- }, r = n.webFonts ? "" : "local ", s = n.webFonts ? " web" : "", o = (n.imgFonts ? "Image" : r + n.fontInUse + s) + " fonts";
- o === "local fonts" && i.SVG && (o = "web SVG fonts");
- var u = [ "MathJax.js v" + MathJax.fileversion, [ "br" ] ];
- u.push([ "div", {
- style: {
- "border-top": "groove 2px",
- margin: ".25em 0"
- }
- } ]), 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", {
- style: {
- "border-top": "groove 2px",
- margin: ".25em 0"
- }
- } ]), d.About.GetJax(u, MathJax.Extension, "Extension", !0), u.push([ "div", {
- style: {
- "border-top": "groove 2px",
- margin: ".25em 0"
- }
- } ], [ "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);
- var a = t.addElement(d.About.div, "div", {
- id: "MathJax_About"
- }, [ [ "b", {
- style: {
- fontSize: "120%"
- }
- }, [ "MathJax" ] ], " v" + MathJax.version, [ "br" ], "using " + o, [ "br" ], [ "br" ], [ "span", {
- style: {
- display: "inline-block",
- "text-align": "left",
- "font-size": "80%",
- "max-height": "20em",
- overflow: "auto",
- "background-color": "#E4E4E4",
- padding: ".4em .6em",
- border: "1px inset"
- }
- }, u ], [ "br" ], [ "br" ], [ "a", {
- href: "http://www.mathjax.org/"
- }, [ "www.mathjax.org" ] ], [ "img", {
- src: c.closeImg,
- style: {
- width: "21px",
- height: "21px",
- position: "absolute",
- top: ".2em",
- right: ".2em"
- },
- onclick: d.About.Remove
- } ] ]), f = document.documentElement || {}, l = window.innerHeight || f.clientHeight || f.scrollHeight || 0;
- 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");
- }, d.About.Remove = function(e) {
- d.About.div && (document.body.removeChild(d.About.div), delete d.About.div);
- }, d.About.GetJax = function(e, t, n, r) {
- var i = [];
- 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);
- i.sort();
- for (var o = 0, u = i.length; o < u; o++) e.push(i[o], [ "br" ]);
- return e;
- }, d.Help = function() {
- window.open(c.helpURL, "MathJaxHelp");
- }, d.ShowSource = function(e) {
- e || (e = window.event);
- var t = {
- screenX: e.screenX,
- screenY: e.screenY
- };
- if (!d.jax) return;
- if (this.format === "MathML") {
- var i = MathJax.ElementJax.mml;
- if (i && typeof i.mbase.prototype.toMathML != "undefined") try {
- d.ShowSource.Text(d.jax.root.toMathML(), e);
- } catch (s) {
- if (!s.restart) throw s;
- r.After([ this, d.ShowSource, t ], s.restart);
- } else if (!n.loadingToMathML) {
- n.loadingToMathML = !0, d.ShowSource.Window(e), r.Queue(n.Require("[MathJax]/extensions/toMathML.js"), function() {
- delete n.loadingToMathML, i.mbase.prototype.toMathML || (i.mbase.prototype.toMathML = function() {});
- }, [ this, d.ShowSource, t ]);
- return;
- }
- } else {
- if (d.jax.originalText == null) {
- alert("No original form available");
- return;
- }
- d.ShowSource.Text(d.jax.originalText, e);
- }
- }, d.ShowSource.Window = function(e) {
- if (!d.ShowSource.w) {
- var t = [], n = c.windowSettings;
- for (var r in n) n.hasOwnProperty(r) && t.push(r + "=" + n[r]);
- d.ShowSource.w = window.open("", "_blank", t.join(","));
- }
- return d.ShowSource.w;
- }, d.ShowSource.Text = function(e, t) {
- var n = d.ShowSource.Window(t);
- delete d.ShowSource.w, e = e.replace(/^\s*/, "").replace(/\s*$/, ""), e = e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
- 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 {
- 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();
- var r = n.document.body.firstChild;
- setTimeout(function() {
- var e = n.outerHeight - n.innerHeight || 30, i = n.outerWidth - n.innerWidth || 30, s, o;
- 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));
- }, 50);
- }
- }, d.Scale = function() {
- var t = i["HTML-CSS"], n = i.NativeMML, r = i.SVG, s = (t || n || r || {
- config: {
- scale: 100
- }
- }).config.scale, o = prompt("Scale all mathematics (compared to surrounding text) by", s + "%");
- 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%)"));
- }, d.Zoom = function() {
- MathJax.Extension.MathZoom || n.Require("[MathJax]/extensions/MathZoom.js");
- }, d.Renderer = function() {
- var t = e.outputJax["jax/mml"];
- if (t[0] !== c.settings.renderer) {
- var n = e.Browser, r, i = d.Renderer.Messages, s;
- switch (c.settings.renderer) {
- case "NativeMML":
- 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");
- break;
- case "SVG":
- c.settings.warnedSVG || n.isMSIE && !f && (r = i.SVG.MSIE);
- }
- if (r) {
- 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();
- if (!confirm(r)) return;
- s && (d.cookie[s] = c.settings[s] = !0), d.cookie.renderer = c.settings.renderer, d.saveCookie();
- }
- e.Queue([ "setRenderer", e, c.settings.renderer, "jax/mml" ], [ "Rerender", e ]);
- }
- }, d.Renderer.Messages = {
- MML: {
- 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.",
- MSIE: "Internet Explorer requires the MathPlayer plugin in order to process MathML output.",
- Opera: "Opera's support for MathML is limited, so switching to MathML output may cause some expressions to render poorly.",
- Safari: "Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly.",
- Firefox: "Your browser's native MathML does not implement all the features used by MathJax, so some expressions may not render properly."
- },
- SVG: {
- 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."
- }
- }, d.Font = function() {
- var e = i["HTML-CSS"];
- if (!e) return;
- document.location.reload();
- }, d.MPEvents = function(e) {
- var t = c.settings.discoverable, n = d.MPEvents.Messages;
- if (!f) {
- if (c.settings.mpMouse && !confirm(n.IE8warning)) {
- delete d.cookie.mpContext, delete c.settings.mpContext, delete d.cookie.mpMouse, delete c.settings.mpMouse, d.saveCookie();
- return;
- }
- c.settings.mpContext = c.settings.mpMouse, d.cookie.mpContext = d.cookie.mpMouse = c.settings.mpMouse, d.saveCookie(), MathJax.Hub.Queue([ "Rerender", MathJax.Hub ]);
- } else !t && e.name === "Menu Events" && c.settings.mpContext && alert(n.IE9warning);
- }, d.MPEvents.Messages = {
- 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?",
- IE9warning: "The MathJax contextual menu will be disabled, but you can Alt-Click on an expression to obtain the MathJax menu instead."
- }, e.Browser.Select({
- MSIE: function(e) {
- var t = document.compatMode === "BackCompat", n = e.versionAtLeast("8.0") && document.documentMode > 7;
- d.Augment({
- margin: 20,
- msieBackgroundBug: document.documentMode < 9,
- msieFixedPositionBug: t || !n,
- msieAboutBug: t
- }), f && (delete c.styles["#MathJax_About"].filter, delete c.styles[".MathJax_Menu"].filter);
- },
- Firefox: function(e) {
- d.skipMouseover = e.isMobile && e.versionAtLeast("6.0"), d.skipMousedown = e.isMobile;
- }
- }), d.isMobile = e.Browser.isMobile, d.noContextMenu = e.Browser.noContextMenu, e.Register.StartupHook("End Config", function() {
- 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, {
- nativeTouch: !0,
- format: "MathML"
- }), v.COMMAND("Original Form", d.ShowSource, {
- nativeTouch: !0
- }), v.RULE(), v.CHECKBOX("Show TeX hints in MathML", "texHints")), v.RULE(), v.SUBMENU("Math Settings", v.SUBMENU("Zoom Trigger", v.RADIO("Hover", "zoom", {
- action: d.Zoom
- }), v.RADIO("Click", "zoom", {
- action: d.Zoom
- }), v.RADIO("Double-Click", "zoom", {
- action: d.Zoom
- }), v.RADIO("No Zoom", "zoom", {
- value: "None"
- }), v.RULE(), v.LABEL("Trigger Requires:"), v.CHECKBOX(e.Browser.isMac ? "Option" : "Alt", "ALT"), v.CHECKBOX("Command", "CMD", {
- hidden: !e.Browser.isMac
- }), v.CHECKBOX("Control", "CTRL", {
- hidden: e.Browser.isMac
- }), 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", {
- hidden: !c.showRenderer
- }, v.RADIO("HTML-CSS", "renderer", {
- action: d.Renderer
- }), v.RADIO("MathML", "renderer", {
- action: d.Renderer,
- value: "NativeMML"
- }), v.RADIO("SVG", "renderer", {
- action: d.Renderer
- })), v.SUBMENU("MathPlayer", {
- hidden: !e.Browser.isMSIE || !c.showMathPlayer,
- disabled: !e.Browser.hasMathPlayer
- }, v.LABEL("Let MathPlayer Handle:"), v.CHECKBOX("Menu Events", "mpContext", {
- action: d.MPEvents,
- hidden: !f
- }), v.CHECKBOX("Mouse Events", "mpMouse", {
- action: d.MPEvents,
- hidden: !f
- }), v.CHECKBOX("Mouse and Menu Events", "mpMouse", {
- action: d.MPEvents,
- hidden: f
- })), v.SUBMENU("Font Preference", {
- hidden: !c.showFontMenu
- }, v.LABEL("For HTML-CSS:"), v.RADIO("Auto", "font", {
- action: d.Font
- }), v.RULE(), v.RADIO("TeX (local)", "font", {
- action: d.Font
- }), v.RADIO("TeX (web)", "font", {
- action: d.Font
- }), v.RADIO("TeX (image)", "font", {
- action: d.Font
- }), v.RULE(), v.RADIO("STIX (local)", "font", {
- action: d.Font
- })), v.SUBMENU("Contextual Menu", {
- hidden: !c.showContext
- }, v.RADIO("MathJax", "context"), v.RADIO("Browser", "context")), v.COMMAND("Scale All Math ...", d.Scale), v.RULE().With({
- hidden: !c.showDiscoverable,
- name: "discover_rule"
- }), v.CHECKBOX("Highlight on Hover", "discoverable", {
- hidden: !c.showDiscoverable
- })), v.RULE(), v.COMMAND("About MathJax", d.About), v.COMMAND("MathJax Help", d.Help)), d.isMobile && function() {
- var e = c.settings, t = d.menu.Find("Math Settings", "Zoom Trigger").menu;
- t.items[0].disabled = t.items[1].disabled = !0;
- if (e.zoom === "Hover" || e.zoom == "Click") e.zoom = "None";
- t.items = t.items.slice(0, 4), navigator.appVersion.match(/[ (]Android[) ]/) && d.ITEM.SUBMENU.Augment({
- marker: "\u00bb"
- });
- }();
- }), d.showRenderer = function(e) {
- d.cookie.showRenderer = c.showRenderer = e, d.saveCookie(), d.menu.Find("Math Settings", "Math Renderer").hidden = !e;
- }, d.showMathPlayer = function(e) {
- d.cookie.showMathPlayer = c.showMathPlayer = e, d.saveCookie(), d.menu.Find("Math Settings", "MathPlayer").hidden = !e;
- }, d.showFontMenu = function(e) {
- d.cookie.showFontMenu = c.showFontMenu = e, d.saveCookie(), d.menu.Find("Math Settings", "Font Preference").hidden = !e;
- }, d.showContext = function(e) {
- d.cookie.showContext = c.showContext = e, d.saveCookie(), d.menu.Find("Math Settings", "Contextual Menu").hidden = !e;
- }, d.showDiscoverable = function(e) {
- 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;
- }, MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready", function() {
- MathJax.OutputJax["HTML-CSS"].config.imageFont || (d.menu.Find("Math Settings", "Font Preference", "TeX (image)").disabled = !0);
- }), 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" ]);
- }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.CallBack, MathJax.OutputJax), function(e, t, n, r, i) {
- var s = "2.1", o = e.CombineConfig("MathZoom", {
- styles: {
- "#MathJax_Zoom": {
- position: "absolute",
- "background-color": "#F0F0F0",
- overflow: "auto",
- display: "block",
- "z-index": 301,
- padding: ".5em",
- border: "1px solid black",
- margin: 0,
- "font-weight": "normal",
- "font-style": "normal",
- "text-align": "left",
- "text-indent": 0,
- "text-transform": "none",
- "line-height": "normal",
- "letter-spacing": "normal",
- "word-spacing": "normal",
- "word-wrap": "normal",
- "white-space": "nowrap",
- "float": "none",
- "box-shadow": "5px 5px 15px #AAAAAA",
- "-webkit-box-shadow": "5px 5px 15px #AAAAAA",
- "-moz-box-shadow": "5px 5px 15px #AAAAAA",
- "-khtml-box-shadow": "5px 5px 15px #AAAAAA",
- filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')"
- },
- "#MathJax_ZoomOverlay": {
- position: "absolute",
- left: 0,
- top: 0,
- "z-index": 300,
- display: "inline-block",
- width: "100%",
- height: "100%",
- border: 0,
- padding: 0,
- margin: 0,
- "background-color": "white",
- opacity: 0,
- filter: "alpha(opacity=0)"
- },
- "#MathJax_ZoomEventTrap": {
- position: "absolute",
- left: 0,
- top: 0,
- "z-index": 302,
- display: "inline-block",
- border: 0,
- padding: 0,
- margin: 0,
- "background-color": "white",
- opacity: 0,
- filter: "alpha(opacity=0)"
- }
- }
- }), u, a, f;
- MathJax.Hub.Register.StartupHook("MathEvents Ready", function() {
- f = MathJax.Extension.MathEvents.Event, u = MathJax.Extension.MathEvents.Event.False, a = MathJax.Extension.MathEvents.Hover;
- });
- var l = MathJax.Extension.MathZoom = {
- version: s,
- settings: e.config.menuSettings,
- scrollSize: 18,
- HandleEvent: function(e, t, n) {
- 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;
- },
- Click: function(e, t) {
- if (this.settings.zoom === "Click") return this.Zoom(e, t);
- },
- DblClick: function(e, t) {
- if (this.settings.zoom === "Double-Click") return this.Zoom(e, t);
- },
- Hover: function(e, t) {
- return this.settings.zoom === "Hover" ? (this.Zoom(e, t), !0) : !1;
- },
- Zoom: function(n, r) {
- this.Remove(), a.ClearHoverTimer(), f.ClearSelection();
- var i = MathJax.OutputJax[r.jaxID], s = i.getJaxFromMath(r);
- s.hover && a.UnHover(s);
- var l = Math.floor(.85 * document.body.clientWidth), c = Math.floor(.85 * Math.max(document.body.clientHeight, document.documentElement.clientHeight)), h = t.Element("span", {
- style: {
- position: "relative",
- display: "inline-block",
- height: 0,
- width: 0
- },
- id: "MathJax_ZoomFrame"
- }, [ [ "span", {
- id: "MathJax_ZoomOverlay",
- onmousedown: this.Remove
- } ], [ "span", {
- id: "MathJax_Zoom",
- onclick: this.Remove,
- style: {
- visibility: "hidden",
- fontSize: this.settings.zscale,
- "max-width": l + "px",
- "max-height": c + "px"
- }
- }, [ [ "span", {
- style: {
- display: "inline-block",
- "white-space": "nowrap"
- }
- } ] ] ] ]), p = h.lastChild, v = p.firstChild, m = h.firstChild;
- r.parentNode.insertBefore(h, r), r.parentNode.insertBefore(r, h), v.addEventListener && v.addEventListener("mousedown", this.Remove, !0);
- if (this.msieTrapEventBug) {
- var y = t.Element("span", {
- id: "MathJax_ZoomEventTrap",
- onmousedown: this.Remove
- });
- h.insertBefore(y, p);
- }
- if (this.msieZIndexBug) {
- var w = t.addElement(document.body, "img", {
- src: "about:blank",
- id: "MathJax_ZoomTracker",
- width: 0,
- height: 0,
- style: {
- width: 0,
- height: 0,
- position: "relative"
- }
- });
- h.style.position = "relative", h.style.zIndex = o.styles["#MathJax_ZoomOverlay"]["z-index"], h = w;
- }
- var E = i.Zoom(s, v, r, l, c);
- 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);
- },
- Position: function(e, t) {
- var n = this.Resize(), r = n.x, i = n.y, s = t.mW, o = -s - Math.floor((e.offsetWidth - s) / 2), u = t.Y;
- e.style.left = Math.max(o, 10 - r) + "px", e.style.top = Math.max(u, 10 - i) + "px", l.msiePositionBug || l.SetWH();
- },
- Resize: function(e) {
- l.onresize && l.onresize(e);
- var t = 0, n = 0, r, i = document.getElementById("MathJax_ZoomFrame"), s = document.getElementById("MathJax_ZoomOverlay");
- r = i;
- while (r.offsetParent) t += r.offsetLeft, r = r.offsetParent;
- l.operaPositionBug && (i.style.border = "1px solid"), r = i;
- while (r.offsetParent) n += r.offsetTop, r = r.offsetParent;
- return l.operaPositionBug && (i.style.border = ""), s.style.left = -t + "px", s.style.top = -n + "px", l.msiePositionBug ? setTimeout(l.SetWH, 0) : l.SetWH(), {
- x: t,
- y: n
- };
- },
- SetWH: function() {
- var e = document.getElementById("MathJax_ZoomOverlay");
- e.style.width = e.style.height = "1px";
- var t = document.documentElement || document.body;
- e.style.width = t.scrollWidth + "px", e.style.height = Math.max(t.clientHeight, t.scrollHeight) + "px";
- },
- Remove: function(n) {
- var r = document.getElementById("MathJax_ZoomFrame");
- if (r) {
- var i = MathJax.OutputJax[r.previousSibling.jaxID], s = i.getJaxFromMath(r.previousSibling);
- e.signal.Post([ "math unzoomed", s ]), r.parentNode.removeChild(r), r = document.getElementById("MathJax_ZoomTracker"), r && r.parentNode.removeChild(r);
- if (l.operaRefreshBug) {
- var o = t.addElement(document.body, "div", {
- style: {
- position: "fixed",
- left: 0,
- top: 0,
- width: "100%",
- height: "100%",
- backgroundColor: "white",
- opacity: 0
- },
- id: "MathJax_OperaDiv"
- });
- document.body.removeChild(o);
- }
- window.removeEventListener ? removeEventListener("resize", l.Resize, !1) : window.detachEvent ? detachEvent("onresize", l.Resize) : (window.onresize = l.onresize, delete l.onresize);
- }
- return u(n);
- }
- };
- e.Browser.Select({
- MSIE: function(e) {
- var t = document.documentMode || 0, n = t >= 9;
- 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;
- },
- Opera: function(e) {
- l.operaPositionBug = !0, l.operaRefreshBug = !0;
- }
- }), l.topImg = l.msieInlineBlockAlignBug ? t.Element("img", {
- style: {
- width: 0,
- height: 0,
- position: "relative"
- },
- src: "about:blank"
- }) : t.Element("span", {
- style: {
- width: 0,
- height: 0,
- display: "inline-block"
- }
- });
- if (l.operaPositionBug || l.msieTopBug) l.topImg.style.border = "1px solid";
- 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" ]);
- }(MathJax.Hub, MathJax.HTML, MathJax.Ajax, MathJax.OutputJax["HTML-CSS"], MathJax.OutputJax.NativeMML), MathJax.Extension["TeX/AMSmath"] = {
- version: "2.1",
- number: 0,
- startNumber: 0,
- labels: {},
- eqlabels: {},
- refs: []
- }, MathJax.Hub.Register.StartupHook("TeX Jax Ready", function() {
- 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) {
- var n = [];
- for (var r = 0, i = e.length; r < i; r++) n[r] = t.Parse.prototype.Em(e[r]);
- return n.join(" ");
- };
- r.Add({
- mathchar0mo: {
- iiiint: [ "2A0C", {
- texClass: e.TEXCLASS.OP
- } ]
- },
- macros: {
- mathring: [ "Accent", "2DA" ],
- nobreakspace: "Tilde",
- negmedspace: [ "Spacer", e.LENGTH.NEGATIVEMEDIUMMATHSPACE ],
- negthickspace: [ "Spacer", e.LENGTH.NEGATIVETHICKMATHSPACE ],
- idotsint: [ "MultiIntegral", "\\int\\cdots\\int" ],
- dddot: [ "Accent", "20DB" ],
- ddddot: [ "Accent", "20DC" ],
- sideset: [ "Macro", "\\mathop{\\mathop{\\rlap{\\phantom{#3}}}\\nolimits#1\\!\\mathop{#3}\\nolimits#2}", 3 ],
- boxed: [ "Macro", "\\fbox{$\\displaystyle{#1}$}", 1 ],
- tag: "HandleTag",
- notag: "HandleNoTag",
- label: "HandleLabel",
- ref: "HandleRef",
- eqref: [ "HandleRef", !0 ],
- substack: [ "Macro", "\\begin{subarray}{c}#1\\end{subarray}", 1 ],
- injlim: [ "NamedOp", "inj lim" ],
- projlim: [ "NamedOp", "proj lim" ],
- varliminf: [ "Macro", "\\mathop{\\underline{\\mmlToken{mi}{lim}}}" ],
- varlimsup: [ "Macro", "\\mathop{\\overline{\\mmlToken{mi}{lim}}}" ],
- varinjlim: [ "Macro", "\\mathop{\\underrightarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}" ],
- varprojlim: [ "Macro", "\\mathop{\\underleftarrow{\\mmlToken{mi}{lim}\\Rule{-1pt}{0pt}{1pt}}\\Rule{0pt}{0pt}{.45em}}" ],
- DeclareMathOperator: "HandleDeclareOp",
- operatorname: "HandleOperatorName",
- genfrac: "Genfrac",
- frac: [ "Genfrac", "", "", "", "" ],
- tfrac: [ "Genfrac", "", "", "", 1 ],
- dfrac: [ "Genfrac", "", "", "", 0 ],
- binom: [ "Genfrac", "(", ")", "0em", "" ],
- tbinom: [ "Genfrac", "(", ")", "0em", 1 ],
- dbinom: [ "Genfrac", "(", ")", "0em", 0 ],
- cfrac: "CFrac",
- shoveleft: [ "HandleShove", e.ALIGN.LEFT ],
- shoveright: [ "HandleShove", e.ALIGN.RIGHT ],
- xrightarrow: [ "xArrow", 8594, 5, 6 ],
- xleftarrow: [ "xArrow", 8592, 7, 3 ]
- },
- environment: {
- align: [ "AMSarray", null, !0, !0, "rlrlrlrlrlrl", o([ 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18, 2, 5 / 18 ]) ],
- "align*": [ "AMSar…
Large files files are truncated, but you can click here to view the full file