From 8791896940b1dac75d1ed2e84e7370e89027863d Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 11 Sep 2021 19:35:03 +0200 Subject: [PATCH] More MathJax v2.7.5 files added (#670) --- THIRD_PARTY.txt | 6 + core/constants.js | 6 + pages/updates/updates.html | 4 + resources/mathjax/2.7.5/config/default.jsm | 1104 +++++++++++++++++ .../mathjax/2.7.5/extensions/MathEvents.jsm | 19 + .../mathjax/2.7.5/extensions/tex2jax.jsm | 19 + .../mathjax/2.7.5/jax/element/mml/jax.jsm | 19 + .../mathjax/2.7.5/jax/input/TeX/config.jsm | 19 + resources/mathjax/2.7.5/jax/input/TeX/jax.jsm | 19 + 9 files changed, 1215 insertions(+) create mode 100644 resources/mathjax/2.7.5/config/default.jsm create mode 100644 resources/mathjax/2.7.5/extensions/MathEvents.jsm create mode 100644 resources/mathjax/2.7.5/extensions/tex2jax.jsm create mode 100644 resources/mathjax/2.7.5/jax/element/mml/jax.jsm create mode 100644 resources/mathjax/2.7.5/jax/input/TeX/config.jsm create mode 100644 resources/mathjax/2.7.5/jax/input/TeX/jax.jsm diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index 877e6309..b3aa5a76 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1231,11 +1231,14 @@ https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.cs https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/default.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS_HTML-full.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-MML-AM_CHTML.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/MathEvents.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/MathMenu.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/MathZoom.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/tex2jax.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/TeX/begingroup.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/TeX/cancel.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/extensions/TeX/mhchem3/mhchem.js @@ -1244,11 +1247,14 @@ https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/fonts/HTML-CSS/TeX/woff/Mat https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/jax.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/optable/BasicLatin.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/optable/GeneralPunctuation.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/optable/Latin1Supplement.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/optable/MathOperators.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/element/mml/optable/SuppMathOperators.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/input/TeX/config.js +https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/input/TeX/jax.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/CommonHTML/autoload/mtable.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/CommonHTML/fonts/TeX/fontdata.js https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/jax/output/CommonHTML/jax.js diff --git a/core/constants.js b/core/constants.js index 207b39f8..d3336ead 100644 --- a/core/constants.js +++ b/core/constants.js @@ -334,24 +334,30 @@ const IgnoredHost = { * https://codeberg.org/nobody/LocalCDN/issues/75 */ const MathJaxFiles = { + 'config/default.js': true, 'config/TeX-AMS_HTML-full.js': true, 'config/TeX-AMS-MML_HTMLorMML.js': true, 'config/TeX-MML-AM_CHTML.js': true, 'extensions/TeX/begingroup.js': true, 'extensions/TeX/cancel.js': true, 'extensions/TeX/mhchem3/mhchem.js': true, + 'extensions/MathEvents.js': true, 'extensions/MathMenu.js': true, 'extensions/MathZoom.js': true, + 'extensions/tex2jax.js': true, 'fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff': true, 'fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff': true, 'fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff': true, 'fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff': true, 'fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff': true, + 'jax/element/mml/jax.js': true, 'jax/element/mml/optable/BasicLatin.js': true, 'jax/element/mml/optable/GeneralPunctuation.js': true, 'jax/element/mml/optable/Latin1Supplement.js': true, 'jax/element/mml/optable/MathOperators.js': true, 'jax/element/mml/optable/SuppMathOperators.js': true, + 'jax/input/TeX/config.js': true, + 'jax/input/TeX/jax.js': true, 'jax/output/CommonHTML/fonts/TeX/fontdata.js': true, 'jax/output/CommonHTML/autoload/mtable.js': true, 'jax/output/CommonHTML/jax.js': true, diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 717a185d..fb20edbd 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -47,6 +47,10 @@
  • angularjs-slider v7.0.0 -> v7.0.1 (#668)
  • twitter-bootstrap v5.1.0 -> v5.1.1 (#669)
  • +

    Added

    +
    diff --git a/resources/mathjax/2.7.5/config/default.jsm b/resources/mathjax/2.7.5/config/default.jsm new file mode 100644 index 00000000..a4120d48 --- /dev/null +++ b/resources/mathjax/2.7.5/config/default.jsm @@ -0,0 +1,1104 @@ +/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ + +/************************************************************* + * + * MathJax/config/default.js + * + * This configuration file is loaded when you load MathJax + * via + * + * Use it to customize the MathJax settings. See comments below. + * + * --------------------------------------------------------------------- + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/* + * This file lists most, but not all, of the options that can be set for + * MathJax and its various components. Some additional options are + * available, however, and are listed in the various links at: + * + * http://www.mathjax.org/resources/docs/?configuration.html#configuration-options-by-component + * + * You can add these to the configuration object below if you + * want to change them from their default values. + */ + +MathJax.Hub.Config({ + + // + // A comma-separated list of configuration files to load + // when MathJax starts up. E.g., to define local macros, etc. + // The default directory is the MathJax/config directory. + // + // Example: config: ["local/local.js"], + // Example: config: ["local/local.js","MMLtoHTML.js"], + // + config: [], + + // + // A comma-separated list of CSS stylesheet files to be loaded + // when MathJax starts up. The default directory is the + // MathJax/config directory. + // + // Example: styleSheets: ["MathJax.css"], + // + styleSheets: [], + + // + // Styles to be defined dynamically at startup time. + // + // Example: + // styles: { + // ".MathJax_Preview": { + // color: "#888" + // } + // }, + // + styles: {}, + + // + // A comma-separated list of input and output jax to initialize at startup. + // Their main code is loaded only when they are actually used, so it is not + // inefficient to include jax that may not actually be used on the page. These + // are found in the MathJax/jax directory. The choices include + // + // input/TeX + // input/MathML + // input/AsciiMath + // + // output/HTML-CSS + // output/NativeMML + // output/SVG + // + // If you change the input jax, you may need to include the appropriate + // preprocessor in the extensions array below. + // + jax: ["input/TeX", "output/HTML-CSS"], + + // + // A comma-separated list of extensions to load at startup. The default + // directory is MathJax/extensions. + // + // Example: extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"], + // + // You may wish to include "mml2jax.js" if you are using "input/MathML" in the + // jax array above, and "asciimath2jax.js" if you using "input/AsciiMath". + // Include "jsmath2jax.js" if you are converting from using jsMath to MathJax. + // + extensions: ["tex2jax.js"], + + // + // Patterns to remove from before and after math script tags. If you are not + // using one of the preprocessors (e.g., tex2jax), you need to insert something + // extra into your HTML file in order to avoid a bug in Internet Explorer. IE + // removes spaces from the DOM that it thinks are redundent, and since a SCRIPT + // tag usually doesn't add content to the page, if there is a space before and after + // a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts + // the typeset mathematics, this means there will be no space before it and the + // preceding text. In order to avoid this, you should include some "guard characters" + // before or after the math SCRIPT tag; define the patterns you want to use below. + // Note that these are used as regular expressions, so you will need to quote + // special characters. Furthermore, since they are javascript strings, you must + // quote javascript special characters as well. So to obtain a backslash, you must + // use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the + // regular expression. That means that if you want an actual backslash in your + // guard characters, you need to use "\\\\" in order to get \\ in the regular + // expression, and \ in the actual text. If both preJax and postJax are defined, + // both must be present in order to be removed. + // + // See also the preRemoveClass comments below. + // + // Example: + // preJax: "\\\\\\\\", // makes a double backslash the preJax text + // or + // preJax: "\\[\\[", // jax scripts must be enclosed in double brackets + // postJax: "\\]\\]", + // + preJax: null, + postJax: null, + + // + // The CSS class for a math preview to be removed preceding a MathJax + // SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this + // class, its contents are removed when MathJax processes the SCRIPT + // tag. This allows you to include a math preview in a form that will + // be displayed prior to MathJax performing its typesetting. It also + // avoids the Internet Explorer space-removal bug, and can be used in + // place of preJax and postJax if that is more convenient. + // + // For example + // + // [math] + // + // would display "[math]" in place of the math until MathJax is able to typeset it. + // + preRemoveClass: "MathJax_Preview", + + // + // This value controls whether the "Processing Math: nn%" message are displayed + // in the lower left-hand corner. Set to "false" to prevent those messages (though + // file loading and other messages will still be shown). + // + showProcessingMessages: true, + + // + // This value controls the verbosity of the messages in the lower left-hand corner. + // Set it to "none" to eliminate all messages, or set it to "simple" to show + // "Loading..." and "Processing..." rather than showing the full file name and the + // percentage of the mathematics processed. + // + messageStyle: "normal", + + // + // These two parameters control the alignment and shifting of displayed equations. + // The first can be "left", "center", or "right", and determines the alignment of + // displayed equations. When the alignment is not "center", the second determines + // an indentation from the left or right side for the displayed equations. When + // the alignment is "center", the indent allows you to shift the center to the right + // or left (negative is left). + // + displayAlign: "center", + displayIndent: "0", + + // + // Normally MathJax will perform its starup commands (loading of + // configuration, styles, jax, and so on) as soon as it can. If you + // expect to be doing additional configuration on the page, however, you + // may want to have it wait until the page's onload hander is called. If so, + // set this to "onload". + // + delayStartupUntil: "none", + + // + // Normally MathJax will typeset the mathematics on the page as soon as + // the page is loaded. If you want to delay that process, in which case + // you will need to call MathJax.Hub.Typeset() yourself by hand, set + // this value to true. + // + skipStartupTypeset: false, + + // + // A list of element ID's that are the ones to process for mathematics + // when any of the Hub typesetting calls (Typeset, Process, Update, etc) + // are called with no element specified. This lets you restrict the + // processing to particular containers rather than scanning the entire + // document for mathematics. If none are supplied, the entire document + // is processed. + // + elements: [], + + // + // Since typesetting usually changes the vertical dimensions of the + // page, if the URL contains an anchor position you may no longer be + // positioned at the correct position on the page, so MathJax can + // reposition to that location after it completes its initial + // typesetting of the page. This value controls whether MathJax will + // reposition the browser to the #hash location from the page URL after + // typesetting for the page. + // + positionToHash: true, + + // + // These control whether to attach the MathJax contextual menu to the + // expressions typeset by MathJax. Since the code for handling + // MathPlayer in Internet Explorer is somewhat delicate, it is + // controlled separately via (showMathMenuMSIE). The latter is now + // deprecated in favor of the MathJax contextual menu settings for + // MathPlayer. + // + // These values used to be listed in the separate output jax, but + // have been moved to this more central location since they are shared + // by all output jax. + // + showMathMenu: true, + showMathMenuMSIE: true, + + + // + // The default settings for the MathJax contextual menu (overridden by + // the MathJax cookie when users change the menu settings). + // + menuSettings: { + zoom: "None", // when to do MathZoom + CTRL: false, // require CTRL for MathZoom? + ALT: false, // require Alt or Option? + CMD: false, // require CMD? + Shift: false, // require Shift? + discoverable: false, // make math menu discoverable on hover? + zscale: "200%", // the scaling factor for MathZoom + renderer: null, // set when Jax are loaded + font: "Auto", // what font HTML-CSS should use + context: "MathJax", // or "Browser" for pass-through to browser menu + locale: null, // the language to use for messages + mpContext: false, // true means pass menu events to MathPlayer in IE + mpMouse: false, // true means pass mouse events to MathPlayer in IE + texHints: true, // include class names for TeXAtom elements + FastPreview: null, // use PreviewHTML output as preview? + assistiveMML: null, // include hidden MathML for screen readers? + inTabOrder: true, // set to true if math elements should be included in the tabindex + semantics: false // add semantics tag with original form in MathML output + }, + + // + // The message and style for when there is a processing error handling + // the mathematics (something has gone wrong with the input or output + // jax that prevents it from operating properly). + // + errorSettings: { + message: ["[",["MathProcessingError","Math Processing Error"],"]"], + style: {color: "#CC0000", "font-style":"italic"} // style for message + }, + + + //============================================================================ + // + // These parameters control the tex2jax preprocessor (when you have included + // "tex2jax.js" in the extensions list above). + // + tex2jax: { + + // + // The delimiters that surround in-line math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + inlineMath: [ +// ['$','$'], // uncomment this for standard TeX math delimiters + ['\\(','\\)'] + ], + + // + // The delimiters that surround displayed math expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // Comment out any that you don't want, but be sure there is no extra + // comma at the end of the last item in the list -- some browsers won't + // be able to handle that. + // + displayMath: [ + ['$$','$$'], + ['\\[','\\]'] + ], + + // + // This array lists the names of the tags whose contents should not be + // processed by tex2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by tex2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `tex2jax` from processing its contents. + // + ignoreClass: "tex2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by tex2jax. This is used to turn on processing within + // tags that have been marked as ignored or skipped above. Note that + // this is a regular expression, and so you need to be sure to quote + // any regexp special characters. The pattern is automatically + // preceded by '(^| )(' and followed by ')( |$)', so your pattern + // will have to match full words in the class name. Use this to + // restart processing within an element that has been marked as + // ignored above. + // + processClass: "tex2jax_process", + + // + // Set to "true" to allow \$ to produce a dollar without starting in-line + // math mode. If you uncomment the ['$','$'] line above, you should change + // this to true so that you can insert plain dollar signs into your documents + // + processEscapes: false, + + // + // Controls whether tex2jax processes LaTeX environments outside of math + // mode. Set to "false" to prevent processing of environments except within + // math mode. + // + processEnvironments: true, + + // + // Controls whether tex2jax processes \ref{...} commands outside + // of math mode. Set to "false" to prevent processing of \ref + // except within math mode. + // + processRefs: true, + + // + // Controls whether tex2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "TeX", which + // means use the TeX code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the asciimath2jax preprocessor (when you have included + // "asciimath2jax.js" in the extensions list above). + // + asciimath2jax: { + + // + // The delimiters that surround asciimath expressions. The first in each + // pair is the initial delimiter and the second is the terminal delimiter. + // + delimiters: [ + ['`','`'] + ], + + // + // This array lists the names of the tags whose contents should not be + // processed by asciimath2jax (other than to look for ignore/process classes + // as listed below). You can add to (or remove from) this list to prevent + // MathJax from processing mathematics in specific contexts. + // + skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"], + + // + // This is the class name used to mark elements whose contents should + // not be processed by asciimath2jax (other than to look for the + // processClass pattern below). Note that this is a regular + // expression, and so you need to be sure to quote any regexp special + // characters. The pattern is automatically preceded by '(^| )(' and + // followed by ')( |$)', so your pattern will have to match full words + // in the class name. Assigning an element this class name will + // prevent `asciimath2jax` from processing its contents. + // + ignoreClass: "asciimath2jax_ignore", + + // + // This is the class name used to mark elements whose contents SHOULD + // be processed by asciimath2jax. This is used to turn on processing + // within tags that have been marked as ignored or skipped above. + // Note that this is a regular expression, and so you need to be sure + // to quote any regexp special characters. The pattern is + // automatically preceded by '(^| )(' and followed by ')( |$)', so + // your pattern will have to match full words in the class name. Use + // this to restart processing within an element that has been marked + // as ignored above. + // + processClass: "asciimath2jax_process", + + // Controls whether asciimath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates in-line + // and display mathetics on the page. The default is "AsciiMath", which + // means use the AsciiMath code as the preview (until it is processed by + // MathJax). Set to "none" to prevent the previews from being + // inserted (the math will simply disappear until it is typeset). Set + // to an array containing the description of an HTML snippet in order + // to use the same preview for all equations on the page (e.g., you + // could have it say "[math]" or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "AsciiMath" + + }, + + //============================================================================ + // + // These parameters control the mml2jax preprocessor (when you have included + // "mml2jax.js" in the extensions list above). + // + mml2jax: { + + // + // Controls whether mml2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "mathml" which means use + // the tag as the preview (until it is processed by MathJax). + // Set to "alttext", to use the tag's alttext attribute as the + // preview, if the tag has one. Set to "none" to + // prevent the previews from being inserted (the math will simply + // disappear until it is typeset). Set to "altimg" to use an image + // described by the altimg* attributes of the element. + // Set to an array containing the + // description of an HTML snippet in order to use the same preview for + // all equations on the page (e.g., you could have it say "[math]" or + // load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "mathml" + + }, + + //============================================================================ + // + // These parameters control the jsMath2jax preprocessor (when you have included + // "jsMath2jax.js" in the extensions list above). + // + jsMath2jax: { + + // + // Controls whether jsMath2jax inserts MathJax_Preview spans to make a + // preview available, and what preview to use, when it locates + // mathematics on the page. The default is "TeX", which means use the + // TeX code as the preview (until it is processed by MathJax). Set to + // "none" to prevent the previews from being inserted (the math will + // simply disappear until it is typeset). Set to an array containing + // the description of an HTML snippet in order to use the same preview + // for all equations on the page (e.g., you could have it say "[math]" + // or load an image). + // + // E.g., preview: ["[math]"], + // or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]] + // + preview: "TeX" + + }, + + //============================================================================ + // + // These parameters control the TeX input jax. + // + TeX: { + + // + // This specifies the side on which \tag{} macros will place the tags. + // Set to "left" to place on the left-hand side. + // + TagSide: "right", + + // + // This is the amound of indentation (from right or left) for the tags. + // + TagIndent: "0.8em", + + // + // This is the width to use for the multline environment + // + MultLineWidth: "85%", + + // + // List of macros to define. These are of the form + // name: value + // where 'value' is the replacement text for the macro \name. + // The 'value' can also be [value,n] where 'value' is the replacement + // text and 'n' is the number of parameters for the macro. + // Note that backslashes must be doubled in the replacement string. + // + // E.g., + // + // Macros: { + // RR: '{\\bf R}', + // bold: ['{\\bf #1}', 1] + // } + // + Macros: {}, + + // + // Equation numbering parameters. + // + equationNumbers: { + autoNumber: "none", // "AMS" for standard AMS environment numbering, + // or "all" to number all displayed equations +// formatNumber: function (n) {return n}, // format for equation number n +// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref +// formatID: function (n) {return 'mjx-eqn-'+String(n).replace(/\s/g,"_")}, +// // element ID to use for reference +// formatURL: function (id,base) {return base+'#'+encodeURIComponent(id)}, +// // URL to use for references + useLabelIds: true // make element ID's use \label name rather than equation number + }, + + // + // Controls the TeX/noErrors extension + // + noErrors: { + disabled: false, // set to true to return to original error messages + multiLine: true, // false to not include original line breaks + inlineDelimiters: ["",""], // or use ["$","$"] or ["\\(","\\)"] to put back delimiters + style: { + "font-size": "90%", + "text-align": "left", + "color": "black", + "padding": "1px 3px", + "border": "1px solid" + } + }, + + // + // Controls the TeX/noUndefined extension + // + noUndefined: { + disabled: false, // set to true to return to original error messages + attributes: { // attributes to set for the undefined control sequence + mathcolor: "red" + } + }, + + // + // Controls the TeX/unicode extension + unicode: { + fonts: "STIXGeneral,'Arial Unicode MS'" // the default font list for unknown characters + } + + }, + + //============================================================================ + // + // These parameters control the AsciiMath input jax. + // + AsciiMath: { + // + // Determines whether the unicode positions for phi and varphi are + // to be swapped or not. (Unicode originally had these reversed, and + // many fonts have them reversed as well.) When set to true, phi + // and varphi will correspond to the LaTeX macros of the same name. + // + fixphi: true, + + // + // Determines whether the MathML should be marked so that the HTML-CSS + // and SVG output jax will use MathML spacing rules rather than TeX + // spacing rules. Since AsciiMath was designed for MathML output, the + // MathML rules are used by default. + // + useMathMLspacing: true, + + // + // Determines whether limits are placed above and below operators, + // or next to them. (AsciiMath doesn't have separate in-line and + // display modes like TeX and MathML do, so this is the only control + // you have over its output) + // + displaystyle: true, + + // + // The character to use for decimal places when scanning for a number. + // If you change it to ",", beware of things like "(1,2)" which would need + // to be changed to "(1, 2)" to be parsed correctly. + // + decimal: "." + }, + + //============================================================================ + // + // These parameters control the MathML input jax. + // + MathML: { + // + // This specifies whether to use TeX spacing or MathML spacing when the + // HTML-CSS output jax is used. + // + useMathMLspacing: false + }, + + //============================================================================ + // + // These parameters control the HTML-CSS output jax. + // + "HTML-CSS": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This is a list of the fonts to look for on a user's computer in + // preference to using MathJax's web-based fonts. These must + // correspond to directories available in the jax/output/HTML-CSS/fonts + // directory, where MathJax stores data about the characters available + // in the fonts. Set this to ["TeX"], for example, to prevent the + // use of the STIX fonts, or set it to an empty list, [], if + // you want to force MathJax to use web-based or image fonts. + // + availableFonts: ["STIX","TeX"], + + // + // This is the preferred font to use when more than one of those + // listed above is available. + // + preferredFont: "TeX", + + // + // This is the web-based font to use when none of the fonts listed + // above are available on the user's computer. Note that currently + // only the TeX font is available in a web-based form. Set this to + // + // webFont: null, + // + // if you want to prevent the use of web-based fonts. + // + webFont: "TeX", + + // + // This is the font to use for image fallback mode (when none of the + // fonts listed above are available and the browser doesn't support + // web-fonts via the @font-face CSS directive). Note that currently + // only the TeX font is available as an image font. Set this to + // + // imageFont: null, + // + // if you want to prevent the use of image fonts (e.g., you have not + // installed the image fonts on your server). In this case, only + // browsers that support web-based fonts will be able to view your pages + // without having the fonts installed on the client computer. The browsers + // that support web-based fonts include: IE6 and later, Chrome, Safari3.1 + // and above, Firefox3.5 and later, and Opera10 and later. Note that + // Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users + // will be required to to download and install either the STIX fonts or the + // MathJax TeX fonts. + // + imageFont: "TeX", + + // + // This is the font-family CSS value used for characters that are not + // in the selected font (e.g., for web-based fonts, this is where to + // look for characters not included in the MathJax_* fonts). IE will + // stop looking after the first font that exists on the system (even + // if it doesn't contain the needed character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + // + matchFontHeight: true, + + // + // When true, MathJax will not measure the widths or heights of the + // subexpressions as it creates its output, but instead will rely on + // its internal calculations based on the bounding boxes of the + // characters it uses, and will only take measurements when it + // absolutely has to. Since measurements cause display reflows, they + // slows down MathJax considerably, so without them MathJax runs + // faster, but can produce slightly less accurate character placements, + // especially in width fractions or roots. + // + noReflows: true, + + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js, + // which can be overridden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the NativeMML output jax. + // + NativeMML: { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax_MathML": { + // color: "red" // MathML is in red + // } + // } + // + styles: {} + }, + + //============================================================================ + // + // These parameters control the SVG output jax. + // + "SVG": { + + // + // This controls the global scaling of mathematics as compared to the + // surrounding text. Values between 100 and 133 are usually good choices. + // + scale: 100, + + // + // Don't allow the matching of math text to surrounding text to use a scaling + // factor smaller than this. + // + minScaleAdjust: 50, + + // + // This specifies the font to use for SVG output (currently the only + // one available) + // + font: "TeX", + + // + // This is the stroke width to use for all character paths (1em = 1000 + // units). This is a cheap way of getting slightly lighter or darker + // characters + // + blacker: 10, + + // + // This is the font-family CSS value used for characters that are not + // in the selected font. IE will stop looking after the first font + // that exists on the system (even if it doesn't contain the needed + // character), so order these carefully. + // + undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif", + + // + // This setting controls whether elements will be typeset + // using the math fonts or the font of the surrounding text. When + // false, the mathvariant="normal" font will be used; when true, + // the font will be inherited from the surrounding paragraph. + // + mtextFontInherit: false, + + // + // This controls whether the MathML structure is retained and CSS + // classes are added to mark the original MathML elements (as in the + // HTML-CSS output). By default, the SVG output jax removes unneeded + // nesting in order to produce a more efficient markup, but if you + // want to use CSS to style the elements as if they were MathML, you + // might need to set this to true. + // + addMMLclasses: false, + + // + // These values control how "chunky" the display of mathematical + // expressions will be. + // + // EqnChunk is the number of equations that will be typeset before + // they appear on screen. Larger values make for less visual flicker + // as the equations are drawn, but also mean longer delays before the + // reader sees anything. + // + // EqChunkFactor is the factor by which the EqnChunk will grow after each + // chunk is displayed. + // + // EqChunkDelay is the time (in milliseconds) to delay between chunks + // (to allow the browser to respond to other user interaction). + // + // Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get + // the behavior from MathJax v1.1 and below. + // + EqnChunk: 50, + EqnChunkFactor: 1.5, + EqnChunkDelay: 100, + + // This option indicates whether MathJax should try to correct the + // x-height of equations to match the size of the surrounding text. + matchFontHeight: true, + + // + // These settings control automatic line breaking. It is off by + // default, so only explicit line breaks are performed (via + // linebreak="newline" attributes on and elements). To + // perform automatic line breaking on line expressions, set + // 'automatic' to 'true' below. The line breaks will be applied via a + // penalty-based heuristic, which does well, but isn't perfect. You + // might need to use linebreak="goodbreak" or linebreak="badbreak" by + // hand in order to get better effects. It is also possible to modify + // the penalty values; contact the MathJax user's forum for details. + // + linebreaks: { + + // + // This controls the automatic breaking of expressions: + // when false, only process linebreak="newline", + // when true, line breaks are inserted automatically in long expressions. + // + automatic: false, + + // + // This controls how wide the lines of mathematics can be + // + // Use an explicit width like "30em" for a fixed width. + // Use "container" to compute the size from the containing element. + // Use "nn% container" for a portion of the container. + // Use "nn%" for a portion of the window size. + // + // The container-based widths may be slower, and may not produce the + // expected results if the layout width changes due to the removal + // of previews or inclusion of mathematics during typesetting. + // + width: "container" + }, + + // + // These are the styles used for merror elements in SVG output. Note + // that only a limited number of style attributes are supported by + // SVG, but you can at least change the colors and borders. + // + // + merrorStyle: { + fontSize:"90%", color:"#C00", background:"#FF8", + border: "1px solid #C00", padding:"3px" + }, + + // + // This allows you to define or modify the styles used to display + // various math elements created by MathJax. + // + // Example: + // styles: { + // ".MathJax .merror": { + // color: "#CC0000", + // border: "1px solid #CC0000" + // } + // } + // + styles: {}, + + // + // Configuration for tooltips + // (see also the #MathJax_Tooltip CSS in MathJax/jax/output/SVG/config.js, + // which can be overridden using the styles values above). + // + tooltip: { + delayPost: 600, // milliseconds delay before tooltip is posted after mouseover + delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout + offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position + } + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathMenu: { + // + // This is the hover delay for the display of submenus in the + // contextual menu. When the mouse is still over a submenu label for + // this long, the menu will appear. (The menu also will appear if you + // click on the label.) It is in milliseconds. + // + delay: 150, + + // + // This is the URL for the MathJax Help menu item. + // + helpURL: "http://www.mathjax.org/help-v2/user/", + + // + // These control whether the "Math Renderer", "MathPlayer", "Font + // Preferences", "Contextual Menu", and "Discoverable" menu items will + // be displayed or not. + // + showRenderer: true, + showMathPlayer: true, + showFontMenu: false, + showContext: false, + showDiscoverable: false, + + // + // These are the settings for the Annotation menu. If the root has + // a child that contains one of the following annotation + // formats, the source will be available via the "Show Math As" menu. + // Each format has a list of possible encodings. + // + semanticsAnnotations: { + "TeX": ["TeX", "LaTeX", "application/x-tex"], + "StarMath": ["StarMath 5.0"], + "Maple": ["Maple"], + "ContentMathML": ["MathML-Content", "application/mathml-content+xml"], + "OpenMath": ["OpenMath"] + }, + + // + // These are the settings for the Show Source window. The initial + // width and height will be reset after the source is shown in an + // attempt to make the window fit the output better. + // + windowSettings: { + status: "no", toolbar: "no", locationbar: "no", menubar: "no", + directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes", + width: 100, height: 50 + }, + + // + // This allows you to change the CSS that controls the menu + // appearance. See the extensions/MathMenu.js file for details + // of the default settings. + // + styles: {} + + }, + + //============================================================================ + // + // These parameters control the contextual menus that are available on the + // mathematics within the page (provided the showMathMenu value is true above). + // + MathEvents: { + // + // This is the time required for the mouse to be held still over a + // typeset equation in order for it to count as a hover (used when the + // zoom trigger is "Hover"). It is in milliseconds. + // + hover: 500 + }, + + //============================================================================ + // + // These parameters control the MMLorHTML configuration file. + // NOTE: if you add MMLorHTML.js to the config array above, + // you must REMOVE the output jax from the jax array. + // + MMLorHTML: { + // + // The output jax that is to be preferred when both are possible + // (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax). + // + prefer: { + MSIE: "MML", + Firefox: "HTML", + Opera: "HTML", + Safari: "HTML", + Chrome: "HTML", + other: "HTML" + } + } +}); + +MathJax.Ajax.loadComplete("[MathJax]/config/default.js"); diff --git a/resources/mathjax/2.7.5/extensions/MathEvents.jsm b/resources/mathjax/2.7.5/extensions/MathEvents.jsm new file mode 100644 index 00000000..c8370f8f --- /dev/null +++ b/resources/mathjax/2.7.5/extensions/MathEvents.jsm @@ -0,0 +1,19 @@ +/* + * /MathJax/extensions/MathEvents.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(d,h,l,g,m,b,j){var p="2.7.5";var i=MathJax.Extension;var c=i.MathEvents={version:p};var k=d.config.menuSettings;var o={hover:500,frame:{x:3.5,y:5,bwidth:1,bcolor:"#A6D",hwidth:"15px",hcolor:"#83A"},button:{x:-6,y:-3,wx:-2},fadeinInc:0.2,fadeoutInc:0.05,fadeDelay:50,fadeoutStart:400,fadeoutDelay:15*1000,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_Menu_Button .MathJax_Hover_Arrow":{position:"absolute",cursor:"pointer",display:"inline-block",border:"2px solid #AAA","border-radius":"4px","-webkit-border-radius":"4px","-moz-border-radius":"4px","-khtml-border-radius":"4px","font-family":"'Courier New',Courier","font-size":"9px",color:"#F0F0F0"},".MathJax_Menu_Button .MathJax_Hover_Arrow span":{display:"block","background-color":"#AAA",border:"1px solid","border-radius":"3px","line-height":0,padding:"4px"},".MathJax_Hover_Arrow:hover":{color:"white!important",border:"2px solid #CCC!important"},".MathJax_Hover_Arrow:hover span":{"background-color":"#CCC!important"}}};var n=c.Event={LEFTBUTTON:0,RIGHTBUTTON:2,MENUKEY:"altKey",KEY:{RETURN:13,ESCAPE:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},Mousedown:function(q){return n.Handler(q,"Mousedown",this)},Mouseup:function(q){return n.Handler(q,"Mouseup",this)},Mousemove:function(q){return n.Handler(q,"Mousemove",this)},Mouseover:function(q){return n.Handler(q,"Mouseover",this)},Mouseout:function(q){return n.Handler(q,"Mouseout",this)},Click:function(q){return n.Handler(q,"Click",this)},DblClick:function(q){return n.Handler(q,"DblClick",this)},Menu:function(q){return n.Handler(q,"ContextMenu",this)},Handler:function(t,r,s){if(l.loadingMathMenu){return n.False(t)}var q=b[s.jaxID];if(!t){t=window.event}t.isContextMenu=(r==="ContextMenu");if(q[r]){return q[r](t,s)}if(i.MathZoom){return i.MathZoom.HandleEvent(t,r,s)}},False:function(q){if(!q){q=window.event}if(q){if(q.preventDefault){q.preventDefault()}else{q.returnValue=false}if(q.stopPropagation){q.stopPropagation()}q.cancelBubble=true}return false},Keydown:function(r,q){if(!r){r=window.event}if(r.keyCode===n.KEY.SPACE){n.ContextMenu(r,this)}},ContextMenu:function(t,E,w){var B=b[E.jaxID],v=B.getJaxFromMath(E);var F=(B.config.showMathMenu!=null?B:d).config.showMathMenu;if(!F||(k.context!=="MathJax"&&!w)){return}if(c.msieEventBug){t=window.event||t}n.ClearSelection();f.ClearHoverTimer();if(v.hover){if(v.hover.remove){clearTimeout(v.hover.remove);delete v.hover.remove}v.hover.nofade=true}var u=MathJax.Menu;var G,D;if(u){if(u.loadingDomain){return n.False(t)}G=m.loadDomain("MathMenu");if(!G){u.jax=v;var r=u.menu.Find("Show Math As").submenu;r.items[0].name=v.sourceMenuTitle;r.items[0].format=(v.sourceMenuFormat||"MathML");r.items[1].name=j[v.inputJax].sourceMenuTitle;r.items[5].disabled=!j[v.inputJax].annotationEncoding;var A=r.items[2];A.disabled=true;var q=A.submenu.items;annotationList=MathJax.Hub.Config.semanticsAnnotations;for(var z=0,y=q.length;z0){this.HoverFadeTimer(q,q.hover.inc);return}s.parentNode.removeChild(s);if(r){r.parentNode.removeChild(r)}if(q.hover.remove){clearTimeout(q.hover.remove)}delete q.hover},HoverFadeTimer:function(q,s,r){q.hover.inc=s;if(!q.hover.timer){q.hover.timer=setTimeout(g(["HoverFade",this,q]),(r||o.fadeDelay))}},HoverMenu:function(q){if(!q){q=window.event}return b[this.jax].ContextMenu(q,this.math,true)},ClearHover:function(q){if(q.hover.remove){clearTimeout(q.hover.remove)}if(q.hover.timer){clearTimeout(q.hover.timer)}f.ClearHoverTimer();delete q.hover},Px:function(q){if(Math.abs(q)<0.006){return"0px"}return q.toFixed(2).replace(/\.?0+$/,"")+"px"},getImages:function(){if(k.discoverable){var q=new Image();q.src=o.button.src}}};var a=c.Touch={last:0,delay:500,start:function(r){var q=new Date().getTime();var s=(q-a.last0)},patternQuote:function(a){return a.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},endPattern:function(a){return new RegExp(this.patternQuote(a)+"|\\\\.|[{}]","g")},sortLength:function(d,c){if(d.length!==c.length){return c.length-d.length}return(d==c?0:(d0||this.Get("scriptlevel")>0)&&g>=0){return""}return this.TEXSPACELENGTH[Math.abs(g)]},TEXSPACELENGTH:["",a.LENGTH.THINMATHSPACE,a.LENGTH.MEDIUMMATHSPACE,a.LENGTH.THICKMATHSPACE],TEXSPACE:[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]],autoDefault:function(e){return""},isSpacelike:function(){return false},isEmbellished:function(){return false},Core:function(){return this},CoreMO:function(){return this},childIndex:function(g){if(g==null){return}for(var f=0,e=this.data.length;f=55296&&e.charCodeAt(0)<56320)?a.VARIANT.ITALIC:a.VARIANT.NORMAL)}return""},setTeXclass:function(f){this.getPrevClass(f);var e=this.data.join("");if(e.length>1&&e.match(/^[a-z][a-z0-9]*$/i)&&this.texClass===a.TEXCLASS.ORD){this.texClass=a.TEXCLASS.OP;this.autoOP=true}return this}});a.mn=a.mbase.Subclass({type:"mn",isToken:true,texClass:a.TEXCLASS.ORD,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT}});a.mo=a.mbase.Subclass({type:"mo",isToken:true,defaults:{mathvariant:a.INHERIT,mathsize:a.INHERIT,mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,form:a.AUTO,fence:a.AUTO,separator:a.AUTO,lspace:a.AUTO,rspace:a.AUTO,stretchy:a.AUTO,symmetric:a.AUTO,maxsize:a.AUTO,minsize:a.AUTO,largeop:a.AUTO,movablelimits:a.AUTO,accent:a.AUTO,linebreak:a.LINEBREAK.AUTO,lineleading:a.INHERIT,linebreakstyle:a.AUTO,linebreakmultchar:a.INHERIT,indentalign:a.INHERIT,indentshift:a.INHERIT,indenttarget:a.INHERIT,indentalignfirst:a.INHERIT,indentshiftfirst:a.INHERIT,indentalignlast:a.INHERIT,indentshiftlast:a.INHERIT,texClass:a.AUTO},defaultDef:{form:a.FORM.INFIX,fence:false,separator:false,lspace:a.LENGTH.THICKMATHSPACE,rspace:a.LENGTH.THICKMATHSPACE,stretchy:false,symmetric:false,maxsize:a.SIZE.INFINITY,minsize:"0em",largeop:false,movablelimits:false,accent:false,linebreak:a.LINEBREAK.AUTO,lineleading:"1ex",linebreakstyle:"before",indentalign:a.INDENTALIGN.AUTO,indentshift:"0",indenttarget:"",indentalignfirst:a.INDENTALIGN.INDENTALIGN,indentshiftfirst:a.INDENTSHIFT.INDENTSHIFT,indentalignlast:a.INDENTALIGN.INDENTALIGN,indentshiftlast:a.INDENTSHIFT.INDENTSHIFT,texClass:a.TEXCLASS.REL},SPACE_ATTR:{lspace:1,rspace:2},useMMLspacing:3,hasMMLspacing:function(){if(this.useMMLspacing){return true}return this.form&&(this.OPTABLE[this.form]||{})[this.data.join("")]},autoDefault:function(g,n){var l=this.def;if(!l){if(g==="form"){return this.getForm()}var k=this.data.join("");var f=[this.Get("form"),a.FORM.INFIX,a.FORM.POSTFIX,a.FORM.PREFIX];for(var h=0,e=f.length;h=55296&&k<56320){k=(((k-55296)<<10)+(j.charCodeAt(1)-56320))+65536}for(var g=0,e=this.RANGES.length;g=0;e--){if(this.data[0]&&!this.data[e].isSpacelike()){return this.data[e]}}return null},Core:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core]},CoreMO:function(){if(!(this.isEmbellished())||typeof(this.core)==="undefined"){return this}return this.data[this.core].CoreMO()},toString:function(){if(this.inferred){return"["+this.data.join(",")+"]"}return this.SUPER(arguments).toString.call(this)},setTeXclass:function(g){var f,e=this.data.length;if((this.open||this.close)&&(!g||!g.fnOP)){this.getPrevClass(g);g=null;for(f=0;f0){e++}return e},adjustChild_texprimestyle:function(e){if(e==this.den){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.msqrt=a.mbase.Subclass({type:"msqrt",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD,setTeXclass:a.mbase.setSeparateTeXclasses,adjustChild_texprimestyle:function(e){return true}});a.mroot=a.mbase.Subclass({type:"mroot",linebreakContainer:true,texClass:a.TEXCLASS.ORD,adjustChild_displaystyle:function(e){if(e===1){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f===1){e+=2}return e},adjustChild_texprimestyle:function(e){if(e===0){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setSeparateTeXclasses});a.mstyle=a.mbase.Subclass({type:"mstyle",isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,inferRow:true,defaults:{scriptlevel:a.INHERIT,displaystyle:a.INHERIT,scriptsizemultiplier:Math.sqrt(1/2),scriptminsize:"8pt",mathbackground:a.INHERIT,mathcolor:a.INHERIT,dir:a.INHERIT,infixlinebreakstyle:a.LINEBREAKSTYLE.BEFORE,decimalseparator:"."},adjustChild_scriptlevel:function(g){var f=this.scriptlevel;if(f==null){f=this.Get("scriptlevel")}else{if(String(f).match(/^ *[-+]/)){var e=this.Get("scriptlevel",null,true);f=e+parseInt(f)}}return f},inheritFromMe:true,noInherit:{mpadded:{width:true,height:true,depth:true,lspace:true,voffset:true},mtable:{width:true,height:true,depth:true,align:true}},getRemoved:{fontfamily:"fontFamily",fontweight:"fontWeight",fontstyle:"fontStyle",fontsize:"fontSize"},setTeXclass:a.mbase.setChildTeXclass});a.merror=a.mbase.Subclass({type:"merror",inferRow:true,linebreakContainer:true,texClass:a.TEXCLASS.ORD});a.mpadded=a.mbase.Subclass({type:"mpadded",inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,width:"",height:"",depth:"",lspace:0,voffset:0},setTeXclass:a.mbase.setChildTeXclass});a.mphantom=a.mbase.Subclass({type:"mphantom",texClass:a.TEXCLASS.ORD,inferRow:true,isSpacelike:a.mbase.childrenSpacelike,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,setTeXclass:a.mbase.setChildTeXclass});a.mfenced=a.mbase.Subclass({type:"mfenced",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,open:"(",close:")",separators:","},addFakeNodes:function(){var f=this.getValues("open","close","separators");f.open=f.open.replace(/[ \t\n\r]/g,"");f.close=f.close.replace(/[ \t\n\r]/g,"");f.separators=f.separators.replace(/[ \t\n\r]/g,"");if(f.open!==""){this.SetData("open",a.mo(f.open).With({fence:true,form:a.FORM.PREFIX,texClass:a.TEXCLASS.OPEN}))}if(f.separators!==""){while(f.separators.length0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(f){var e=this.Get("scriptlevel");if(f>0){e++}return e},adjustChild_texprimestyle:function(e){if(e===this.sub){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.msub=a.msubsup.Subclass({type:"msub"});a.msup=a.msubsup.Subclass({type:"msup",sub:2,sup:1});a.mmultiscripts=a.msubsup.Subclass({type:"mmultiscripts",adjustChild_texprimestyle:function(e){if(e%2===1){return true}return this.Get("texprimestyle")}});a.mprescripts=a.mbase.Subclass({type:"mprescripts"});a.none=a.mbase.Subclass({type:"none"});a.munderover=a.mbase.Subclass({type:"munderover",base:0,under:1,over:2,sub:1,sup:2,ACCENTS:["","accentunder","accent"],linebreakContainer:true,isEmbellished:a.mbase.childEmbellished,Core:a.mbase.childCore,CoreMO:a.mbase.childCoreMO,defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,accent:a.AUTO,accentunder:a.AUTO,align:a.ALIGN.CENTER,texClass:a.AUTO,subscriptshift:"",superscriptshift:""},autoDefault:function(e){if(e==="texClass"){return(this.isEmbellished()?this.CoreMO().Get(e):a.TEXCLASS.ORD)}if(e==="accent"&&this.data[this.over]){return this.data[this.over].CoreMO().Get("accent")}if(e==="accentunder"&&this.data[this.under]){return this.data[this.under].CoreMO().Get("accent")}return false},adjustChild_displaystyle:function(e){if(e>0){return false}return this.Get("displaystyle")},adjustChild_scriptlevel:function(g){var f=this.Get("scriptlevel");var e=(this.data[this.base]&&!this.Get("displaystyle")&&this.data[this.base].CoreMO().Get("movablelimits"));if(g==this.under&&(e||!this.Get("accentunder"))){f++}if(g==this.over&&(e||!this.Get("accent"))){f++}return f},adjustChild_texprimestyle:function(e){if(e===this.base&&this.data[this.over]){return true}return this.Get("texprimestyle")},setTeXclass:a.mbase.setBaseTeXclasses});a.munder=a.munderover.Subclass({type:"munder"});a.mover=a.munderover.Subclass({type:"mover",over:1,under:2,sup:1,sub:2,ACCENTS:["","accent","accentunder"]});a.mtable=a.mbase.Subclass({type:"mtable",defaults:{mathbackground:a.INHERIT,mathcolor:a.INHERIT,align:a.ALIGN.AXIS,rowalign:a.ALIGN.BASELINE,columnalign:a.ALIGN.CENTER,groupalign:"{left}",alignmentscope:true,columnwidth:a.WIDTH.AUTO,width:a.WIDTH.AUTO,rowspacing:"1ex",columnspacing:".8em",rowlines:a.LINES.NONE,columnlines:a.LINES.NONE,frame:a.LINES.NONE,framespacing:"0.4em 0.5ex",equalrows:false,equalcolumns:false,displaystyle:false,side:a.SIDE.RIGHT,minlabelspacing:"0.8em",texClass:a.TEXCLASS.ORD,useHeight:1},adjustChild_displaystyle:function(){return(this.displaystyle!=null?this.displaystyle:this.defaults.displaystyle)},inheritFromMe:true,noInherit:{mover:{align:true},munder:{align:true},munderover:{align:true},mtable:{align:true,rowalign:true,columnalign:true,groupalign:true,alignmentscope:true,columnwidth:true,width:true,rowspacing:true,columnspacing:true,rowlines:true,columnlines:true,frame:true,framespacing:true,equalrows:true,equalcolumns:true,displaystyle:true,side:true,minlabelspacing:true,texClass:true,useHeight:1}},linebreakContainer:true,Append:function(){for(var f=0,e=arguments.length;f>10)+55296)+String.fromCharCode((e&1023)+56320)}});a.xml=a.mbase.Subclass({type:"xml",Init:function(){this.div=document.createElement("div");return this.SUPER(arguments).Init.apply(this,arguments)},Append:function(){for(var f=0,e=arguments.length;f":d.REL,"?":[1,1,b.CLOSE],"\\":d.ORD,"^":d.ORD11,_:d.ORD11,"|":[2,2,b.ORD,{fence:true,stretchy:true,symmetric:true}],"#":d.ORD,"$":d.ORD,"\u002E":[0,3,b.PUNCT,{separator:true}],"\u02B9":d.ORD,"\u0300":d.ACCENT,"\u0301":d.ACCENT,"\u0303":d.WIDEACCENT,"\u0304":d.ACCENT,"\u0306":d.ACCENT,"\u0307":d.ACCENT,"\u0308":d.ACCENT,"\u030C":d.ACCENT,"\u0332":d.WIDEACCENT,"\u0338":d.REL4,"\u2015":[0,0,b.ORD,{stretchy:true}],"\u2017":[0,0,b.ORD,{stretchy:true}],"\u2020":d.BIN3,"\u2021":d.BIN3,"\u20D7":d.ACCENT,"\u2111":d.ORD,"\u2113":d.ORD,"\u2118":d.ORD,"\u211C":d.ORD,"\u2205":d.ORD,"\u221E":d.ORD,"\u2305":d.BIN3,"\u2306":d.BIN3,"\u2322":d.REL4,"\u2323":d.REL4,"\u2329":d.OPEN,"\u232A":d.CLOSE,"\u23AA":d.ORD,"\u23AF":[0,0,b.ORD,{stretchy:true}],"\u23B0":d.OPEN,"\u23B1":d.CLOSE,"\u2500":d.ORD,"\u25EF":d.BIN3,"\u2660":d.ORD,"\u2661":d.ORD,"\u2662":d.ORD,"\u2663":d.ORD,"\u3008":d.OPEN,"\u3009":d.CLOSE,"\uFE37":d.WIDEACCENT,"\uFE38":d.WIDEACCENT}}},{OPTYPES:d});var c=a.mo.prototype.OPTABLE;c.infix["^"]=d.WIDEREL;c.infix._=d.WIDEREL;c.prefix["\u2223"]=d.OPEN;c.prefix["\u2225"]=d.OPEN;c.postfix["\u2223"]=d.CLOSE;c.postfix["\u2225"]=d.CLOSE})(MathJax.ElementJax.mml);MathJax.ElementJax.mml.loadComplete("jax.js"); diff --git a/resources/mathjax/2.7.5/jax/input/TeX/config.jsm b/resources/mathjax/2.7.5/jax/input/TeX/config.jsm new file mode 100644 index 00000000..5e4a4bf6 --- /dev/null +++ b/resources/mathjax/2.7.5/jax/input/TeX/config.jsm @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/input/TeX/config.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.5",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/\s/g,"_")},formatURL:function(b,a){return a+"#"+encodeURIComponent(b)},useLabelIds:true}},resetEquationNumbers:function(){}});MathJax.InputJax.TeX.Register("math/tex");MathJax.InputJax.TeX.loadComplete("config.js"); diff --git a/resources/mathjax/2.7.5/jax/input/TeX/jax.jsm b/resources/mathjax/2.7.5/jax/input/TeX/jax.jsm new file mode 100644 index 00000000..5fea334d --- /dev/null +++ b/resources/mathjax/2.7.5/jax/input/TeX/jax.jsm @@ -0,0 +1,19 @@ +/* + * /MathJax/jax/input/TeX/jax.js + * + * Copyright (c) 2009-2018 The MathJax Consortium + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(d,c,j){var i,h="\u00A0";var k=function(m){return MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var f=MathJax.Object.isArray;var e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var o,n,p,q;for(o=0,n=arguments.length;o":"27E9","\\lt":"27E8","\\gt":"27E9","/":"/","|":["|",{texClass:i.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"23B0","\\rmoustache":"23B1","\\lgroup":"27EE","\\rgroup":"27EF","\\arrowvert":"23D0","\\Arrowvert":"2016","\\bracevert":"23AA","\\Vert":["2016",{texClass:i.TEXCLASS.ORD}],"\\|":["2016",{texClass:i.TEXCLASS.ORD}],"\\vert":["|",{texClass:i.TEXCLASS.ORD}],"\\uparrow":"2191","\\downarrow":"2193","\\updownarrow":"2195","\\Uparrow":"21D1","\\Downarrow":"21D3","\\Updownarrow":"21D5","\\backslash":"\\","\\rangle":"27E9","\\langle":"27E8","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"2309","\\lceil":"2308","\\rfloor":"230B","\\lfloor":"230A","\\lbrack":"[","\\rbrack":"]"},macros:{displaystyle:["SetStyle","D",true,0],textstyle:["SetStyle","T",false,0],scriptstyle:["SetStyle","S",false,1],scriptscriptstyle:["SetStyle","SS",false,2],rm:["SetFont",i.VARIANT.NORMAL],mit:["SetFont",i.VARIANT.ITALIC],oldstyle:["SetFont",i.VARIANT.OLDSTYLE],cal:["SetFont",i.VARIANT.CALIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",i.VARIANT.BOLD],bbFont:["SetFont",i.VARIANT.DOUBLESTRUCK],scr:["SetFont",i.VARIANT.SCRIPT],frak:["SetFont",i.VARIANT.FRAKTUR],sf:["SetFont",i.VARIANT.SANSSERIF],tt:["SetFont",i.VARIANT.MONOSPACE],tiny:["SetSize",0.5],Tiny:["SetSize",0.6],scriptsize:["SetSize",0.7],small:["SetSize",0.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:["NamedFn"],arccos:["NamedFn"],arctan:["NamedFn"],arg:["NamedFn"],cos:["NamedFn"],cosh:["NamedFn"],cot:["NamedFn"],coth:["NamedFn"],csc:["NamedFn"],deg:["NamedFn"],det:"NamedOp",dim:["NamedFn"],exp:["NamedFn"],gcd:"NamedOp",hom:["NamedFn"],inf:"NamedOp",ker:["NamedFn"],lg:["NamedFn"],lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:["NamedFn"],log:["NamedFn"],max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:["NamedFn"],sin:["NamedFn"],sinh:["NamedFn"],sup:"NamedOp",tan:["NamedFn"],tanh:["NamedFn"],limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","00AF",null,1],underline:["UnderOver","005F"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"Middle",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",i.LENGTH.THINMATHSPACE],":":["Spacer",i.LENGTH.MEDIUMMATHSPACE],">":["Spacer",i.LENGTH.MEDIUMMATHSPACE],";":["Spacer",i.LENGTH.THICKMATHSPACE],"!":["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],enspace:["Spacer",".5em"],quad:["Spacer","1em"],qquad:["Spacer","2em"],thinspace:["Spacer",i.LENGTH.THINMATHSPACE],negthinspace:["Spacer",i.LENGTH.NEGATIVETHINMATHSPACE],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],big:["MakeBig",i.TEXCLASS.ORD,0.85],Big:["MakeBig",i.TEXCLASS.ORD,1.15],bigg:["MakeBig",i.TEXCLASS.ORD,1.45],Bigg:["MakeBig",i.TEXCLASS.ORD,1.75],bigl:["MakeBig",i.TEXCLASS.OPEN,0.85],Bigl:["MakeBig",i.TEXCLASS.OPEN,1.15],biggl:["MakeBig",i.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",i.TEXCLASS.OPEN,1.75],bigr:["MakeBig",i.TEXCLASS.CLOSE,0.85],Bigr:["MakeBig",i.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",i.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",i.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",i.TEXCLASS.REL,0.85],Bigm:["MakeBig",i.TEXCLASS.REL,1.15],biggm:["MakeBig",i.TEXCLASS.REL,1.45],Biggm:["MakeBig",i.TEXCLASS.REL,1.75],mathord:["TeXAtom",i.TEXCLASS.ORD],mathop:["TeXAtom",i.TEXCLASS.OP],mathopen:["TeXAtom",i.TEXCLASS.OPEN],mathclose:["TeXAtom",i.TEXCLASS.CLOSE],mathbin:["TeXAtom",i.TEXCLASS.BIN],mathrel:["TeXAtom",i.TEXCLASS.REL],mathpunct:["TeXAtom",i.TEXCLASS.PUNCT],mathinner:["TeXAtom",i.TEXCLASS.INNER],vcenter:["TeXAtom",i.TEXCLASS.VCENTER],mathchoice:["Extension","mathchoice"],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,true],eqalign:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:"Cr",hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",i.LENGTH.THICKMATHSPACE,".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],mathcal:["Macro","{\\cal #1}",1],mathscr:["Macro","{\\scr #1}",1],mathrm:["Macro","{\\rm #1}",1],mathbf:["Macro","{\\bf #1}",1],mathbb:["Macro","{\\bbFont #1}",1],Bbb:["Macro","{\\bbFont #1}",1],mathit:["Macro","{\\it #1}",1],mathfrak:["Macro","{\\frak #1}",1],mathsf:["Macro","{\\sf #1}",1],mathtt:["Macro","{\\tt #1}",1],textrm:["Macro","\\mathord{\\rm\\text{#1}}",1],textit:["Macro","\\mathord{\\it\\text{#1}}",1],textbf:["Macro","\\mathord{\\bf\\text{#1}}",1],textsf:["Macro","\\mathord{\\sf\\text{#1}}",1],texttt:["Macro","\\mathord{\\tt\\text{#1}}",1],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde","\u00A0":"Tilde",begin:"BeginEnd",end:"BeginEnd",newcommand:["Extension","newcommand"],renewcommand:["Extension","newcommand"],newenvironment:["Extension","newcommand"],renewenvironment:["Extension","newcommand"],def:["Extension","newcommand"],let:["Extension","newcommand"],verb:["Extension","verb"],boldsymbol:["Extension","boldsymbol"],tag:["Extension","AMSmath"],notag:["Extension","AMSmath"],label:["Extension","AMSmath"],ref:["Extension","AMSmath"],eqref:["Extension","AMSmath"],nonumber:["Macro","\\notag"],unicode:["Extension","unicode"],color:"Color",href:["Extension","HTML"],"class":["Extension","HTML"],style:["Extension","HTML"],cssId:["Extension","HTML"],bbox:["Extension","bbox"],mmlToken:"MmlToken",require:"Require"},environment:{array:["AlignedArray"],matrix:["Array",null,null,null,"c"],pmatrix:["Array",null,"(",")","c"],bmatrix:["Array",null,"[","]","c"],Bmatrix:["Array",null,"\\{","\\}","c"],vmatrix:["Array",null,"\\vert","\\vert","c"],Vmatrix:["Array",null,"\\Vert","\\Vert","c"],cases:["Array",null,"\\{",".","ll",null,".2em","T"],equation:[null,"Equation"],"equation*":[null,"Equation"],eqnarray:["ExtensionEnv",null,"AMSmath"],"eqnarray*":["ExtensionEnv",null,"AMSmath"],align:["ExtensionEnv",null,"AMSmath"],"align*":["ExtensionEnv",null,"AMSmath"],aligned:["ExtensionEnv",null,"AMSmath"],multline:["ExtensionEnv",null,"AMSmath"],"multline*":["ExtensionEnv",null,"AMSmath"],split:["ExtensionEnv",null,"AMSmath"],gather:["ExtensionEnv",null,"AMSmath"],"gather*":["ExtensionEnv",null,"AMSmath"],gathered:["ExtensionEnv",null,"AMSmath"],alignat:["ExtensionEnv",null,"AMSmath"],"alignat*":["ExtensionEnv",null,"AMSmath"],alignedat:["ExtensionEnv",null,"AMSmath"]},p_height:1.2/0.85});if(this.config.Macros){var m=this.config.Macros;for(var n in m){if(m.hasOwnProperty(n)){if(typeof(m[n])==="string"){g.macros[n]=["Macro",m[n]]}else{g.macros[n]=["Macro"].concat(m[n])}g.macros[n].isUser=true}}}};var a=MathJax.Object.Subclass({Init:function(n,o){this.string=n;this.i=0;this.macroCount=0;var m;if(o){m={};for(var p in o){if(o.hasOwnProperty(p)){m[p]=o[p]}}}this.stack=d.Stack(m,!!o);this.Parse();this.Push(b.stop())},Parse:function(){var o,m;while(this.i=55296&&m<56320){o+=this.string.charAt(this.i++)}if(g.special.hasOwnProperty(o)){this[g.special[o]](o)}else{if(g.letter.test(o)){this.Variable(o)}else{if(g.digit.test(o)){this.Number(o)}else{this.Other(o)}}}}},Push:function(){this.stack.Push.apply(this.stack,arguments)},mml:function(){if(this.stack.Top().type!=="mml"){return null}return this.stack.Top().data[0]},mmlToken:function(m){return m},ControlSequence:function(p){var m=this.GetCS(),o=this.csFindMacro(m);if(o){if(!f(o)){o=[o]}var n=o[0];if(!(n instanceof Function)){n=this[n]}n.apply(this,[p+m].concat(o.slice(1)))}else{if(g.mathchar0mi.hasOwnProperty(m)){this.csMathchar0mi(m,g.mathchar0mi[m])}else{if(g.mathchar0mo.hasOwnProperty(m)){this.csMathchar0mo(m,g.mathchar0mo[m])}else{if(g.mathchar7.hasOwnProperty(m)){this.csMathchar7(m,g.mathchar7[m])}else{if(g.delimiter.hasOwnProperty("\\"+m)){this.csDelimiter(m,g.delimiter["\\"+m])}else{this.csUndefined(p+m)}}}}}},csFindMacro:function(m){return(g.macros.hasOwnProperty(m)?g.macros[m]:null)},csMathchar0mi:function(m,o){var n={mathvariant:i.VARIANT.ITALIC};if(f(o)){n=o[1];o=o[0]}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csMathchar0mo:function(m,o){var n={stretchy:false};if(f(o)){n=o[1];n.stretchy=false;o=o[0]}this.Push(this.mmlToken(i.mo(i.entity("#x"+o)).With(n)))},csMathchar7:function(m,o){var n={mathvariant:i.VARIANT.NORMAL};if(f(o)){n=o[1];o=o[0]}if(this.stack.env.font){n.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.entity("#x"+o)).With(n)))},csDelimiter:function(m,o){var n={};if(f(o)){n=o[1];o=o[0]}if(o.length===4){o=i.entity("#x"+o)}else{o=i.chars(o)}this.Push(this.mmlToken(i.mo(o).With({fence:false,stretchy:false}).With(n)))},csUndefined:function(m){d.Error(["UndefinedControlSequence","Undefined control sequence %1",m])},Variable:function(n){var m={};if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(i.mi(i.chars(n)).With(m)))},Number:function(p){var m,o=this.string.slice(this.i-1).match(g.number);if(o){m=i.mn(o[0].replace(/[{}]/g,""));this.i+=o[0].length-1}else{m=i.mo(i.chars(p))}if(this.stack.env.font){m.mathvariant=this.stack.env.font}this.Push(this.mmlToken(m))},Open:function(m){this.Push(b.open())},Close:function(m){this.Push(b.close())},Tilde:function(m){this.Push(i.mtext(i.chars(h)))},Space:function(m){},Superscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sup;if((o.type==="msubsup"&&o.data[o.sup])||(o.type==="munderover"&&o.data[o.over]&&!o.subsupOK)){d.Error(["DoubleExponent","Double exponent: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.over]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.over}else{o=i.msubsup(o,null,null);m=o.sup}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},Subscript:function(r){if(this.GetNext().match(/\d/)){this.string=this.string.substr(0,this.i+1)+" "+this.string.substr(this.i+1)}var q,o,p=this.stack.Top();if(p.type==="prime"){o=p.data[0];q=p.data[1];this.stack.Pop()}else{o=this.stack.Prev();if(!o){o=i.mi("")}}if(o.isEmbellishedWrapper){o=o.data[0].data[0]}var n=o.movesupsub,m=o.sub;if((o.type==="msubsup"&&o.data[o.sub])||(o.type==="munderover"&&o.data[o.under]&&!o.subsupOK)){d.Error(["DoubleSubscripts","Double subscripts: use braces to clarify"])}if(o.type!=="msubsup"){if(n){if(o.type!=="munderover"||o.data[o.under]){if(o.movablelimits&&o.isa(i.mi)){o=this.mi2mo(o)}o=i.munderover(o,null,null).With({movesupsub:true})}m=o.under}else{o=i.msubsup(o,null,null);m=o.sub}}this.Push(b.subsup(o).With({position:m,primes:q,movesupsub:n}))},PRIME:"\u2032",SMARTQUOTE:"\u2019",Prime:function(o){var n=this.stack.Prev();if(!n){n=i.mi()}if(n.type==="msubsup"&&n.data[n.sup]){d.Error(["DoubleExponentPrime","Prime causes double exponent: use braces to clarify"])}var m="";this.i--;do{m+=this.PRIME;this.i++,o=this.GetNext()}while(o==="'"||o===this.SMARTQUOTE);m=["","\u2032","\u2033","\u2034","\u2057"][m.length]||m;this.Push(b.prime(n,this.mmlToken(i.mo(m))))},mi2mo:function(m){var n=i.mo();n.Append.apply(n,m.data);var o;for(o in n.defaults){if(n.defaults.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}for(o in i.copyAttributes){if(i.copyAttributes.hasOwnProperty(o)&&m[o]!=null){n[o]=m[o]}}n.lspace=n.rspace="0";n.useMMLspacing&=~(n.SPACE_ATTR.lspace|n.SPACE_ATTR.rspace);return n},Comment:function(m){while(this.id.config.MAXMACROS){d.Error(["MaxMacroSub1","MathJax maximum macro substitution count exceeded; is there a recursive macro call?"])}},Matrix:function(n,p,v,r,u,o,m,w,t){var s=this.GetNext();if(s===""){d.Error(["MissingArgFor","Missing argument for %1",n])}if(s==="{"){this.i++}else{this.string=s+"}"+this.string.slice(this.i+1);this.i=0}var q=b.array().With({requireClose:true,arraydef:{rowspacing:(o||"4pt"),columnspacing:(u||"1em")}});if(w){q.isCases=true}if(t){q.isNumbered=true;q.arraydef.side=t}if(p||v){q.open=p;q.close=v}if(m==="D"){q.arraydef.displaystyle=true}if(r!=null){q.arraydef.columnalign=r}this.Push(q)},Entry:function(p){this.Push(b.cell().With({isEntry:true,name:p}));if(this.stack.Top().isCases){var o=this.string;var t=0,s=-1,q=this.i,n=o.length;while(qd.config.MAXMACROS){d.Error(["MaxMacroSub2","MathJax maximum substitution count exceeded; is there a recursive latex environment?"])}if(q[0]&&this[q[0]]){n=this[q[0]].apply(this,[n].concat(q.slice(2)))}}this.Push(n)},envFindName:function(m){return(g.environment.hasOwnProperty(m)?g.environment[m]:null)},Equation:function(m,n){return n},ExtensionEnv:function(n,m){this.Extension(n.name,m,"environment")},Array:function(n,p,u,s,t,o,m,q){if(!s){s=this.GetArgument("\\begin{"+n.name+"}")}var v=("c"+s).replace(/[^clr|:]/g,"").replace(/[^|:]([|:])+/g,"$1");s=s.replace(/[^clr]/g,"").split("").join(" ");s=s.replace(/l/g,"left").replace(/r/g,"right").replace(/c/g,"center");var r=b.array().With({arraydef:{columnalign:s,columnspacing:(t||"1em"),rowspacing:(o||"4pt")}});if(v.match(/[|:]/)){if(v.charAt(0).match(/[|:]/)){r.frame.push("left");r.frame.dashed=v.charAt(0)===":"}if(v.charAt(v.length-1).match(/[|:]/)){r.frame.push("right")}v=v.substr(1,v.length-2);r.arraydef.columnlines=v.split("").join(" ").replace(/[^|: ]/g,"none").replace(/\|/g,"solid").replace(/:/g,"dashed")}if(p){r.open=this.convertDelimiter(p)}if(u){r.close=this.convertDelimiter(u)}if(m==="D"){r.arraydef.displaystyle=true}else{if(m){r.arraydef.displaystyle=false}}if(m==="S"){r.arraydef.scriptlevel=1}if(q){r.arraydef.useHeight=false}this.Push(n);return r},AlignedArray:function(m){var n=this.GetBrackets("\\begin{"+m.name+"}");return this.setArrayAlign(this.Array.apply(this,arguments),n)},setArrayAlign:function(n,m){m=this.trimSpaces(m||"");if(m==="t"){n.arraydef.align="baseline 1"}else{if(m==="b"){n.arraydef.align="baseline -1"}else{if(m==="c"){n.arraydef.align="center"}else{if(m){n.arraydef.align=m}}}}return n},convertDelimiter:function(m){if(m){m=(g.delimiter.hasOwnProperty(m)?g.delimiter[m]:null)}if(m==null){return null}if(f(m)){m=m[0]}if(m.length===4){m=String.fromCharCode(parseInt(m,16))}return m},trimSpaces:function(n){if(typeof(n)!="string"){return n}var m=n.replace(/^\s+|\s+$/g,"");if(m.match(/\\$/)&&n.match(/ $/)){m+=" "}return m},nextIsSpace:function(){return this.string.charAt(this.i).match(/\s/)},GetNext:function(){while(this.nextIsSpace()){this.i++}return this.string.charAt(this.i)},GetCS:function(){var m=this.string.slice(this.i).match(/^([a-z]+|.) ?/i);if(m){this.i+=m[1].length;return m[1]}else{this.i++;return" "}},GetArgument:function(n,o){switch(this.GetNext()){case"":if(!o){d.Error(["MissingArgFor","Missing argument for %1",n])}return null;case"}":if(!o){d.Error(["ExtraCloseMissingOpen","Extra close brace or missing open brace"])}return null;case"\\":this.i++;return"\\"+this.GetCS();case"{":var m=++this.i,p=1;while(this.i1){n=[i.mrow.apply(i,n)]}}return n},InternalText:function(n,m){n=n.replace(/^\s+/,h).replace(/\s+$/,h);return i.mtext(i.chars(n)).With(m)},setDef:function(m,n){n.isUser=true;g.macros[m]=n},setEnv:function(m,n){n.isUser=true;g.environment[m]=n},SubstituteArgs:function(n,m){var q="";var p="";var r;var o=0;while(on.length){d.Error(["IllegalMacroParam","Illegal macro parameter reference"])}p=this.AddArgs(this.AddArgs(p,q),n[r-1]);q=""}}else{q+=r}}}return this.AddArgs(p,q)},AddArgs:function(n,m){if(m.match(/^[a-z]/i)&&n.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)){n+=" "}if(n.length+m.length>d.config.MAXBUFFER){d.Error(["MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?"])}return n+m}});d.Augment({Stack:e,Parse:a,Definitions:g,Startup:l,config:{MAXMACROS:10000,MAXBUFFER:5*1024},sourceMenuTitle:["TeXCommands","TeX Commands"],annotationEncoding:"application/x-tex",prefilterHooks:MathJax.Callback.Hooks(true),postfilterHooks:MathJax.Callback.Hooks(true),Config:function(){this.SUPER(arguments).Config.apply(this,arguments);if(this.config.equationNumbers.autoNumber!=="none"){if(!this.config.extensions){this.config.extensions=[]}this.config.extensions.push("AMSmath.js")}},Translate:function(m){var n,o=false,q=MathJax.HTML.getScript(m);var s=(m.type.replace(/\n/g," ").match(/(;|\s|\n)mode\s*=\s*display(;|\s|\n|$)/)!=null);var r={math:q,display:s,script:m};var t=this.prefilterHooks.Execute(r);if(t){return t}q=r.math;try{n=d.Parse(q).mml()}catch(p){if(!p.texError){throw p}n=this.formatError(p,q,s,m);o=true}if(n.isa(i.mtable)&&n.displaystyle==="inherit"){n.displaystyle=s}if(n.inferred){n=i.apply(MathJax.ElementJax,n.data)}else{n=i(n)}if(s){n.root.display="block"}if(o){n.texError=true}r.math=n;return this.postfilterHooks.Execute(r)||r.math},prefilterMath:function(n,o,m){return n},postfilterMath:function(n,o,m){this.combineRelations(n.root);return n},formatError:function(p,o,q,m){var n=p.message.replace(/\n.*/,"");c.signal.Post(["TeX Jax - parse error",n,o,q,m]);return i.Error(n)},Error:function(m){if(f(m)){m=k.apply(k,m)}throw c.Insert(Error(m),{texError:true})},Macro:function(m,n,o){g.macros[m]=["Macro"].concat([].slice.call(arguments,1));g.macros[m].isUser=true},fenced:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.INNER});m.Append(i.mo(o).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.OPEN}));if(n.type==="mrow"&&n.inferred){m.Append.apply(m,n.data)}else{m.Append(n)}m.Append(i.mo(p).With({fence:true,stretchy:true,symmetric:true,texClass:i.TEXCLASS.CLOSE}));return m},fixedFence:function(o,n,p){var m=i.mrow().With({open:o,close:p,texClass:i.TEXCLASS.ORD});if(o){m.Append(this.mathPalette(o,"l"))}if(n.type==="mrow"){m.Append.apply(m,n.data)}else{m.Append(n)}if(p){m.Append(this.mathPalette(p,"r"))}return m},mathPalette:function(p,n){if(p==="{"||p==="}"){p="\\"+p}var o="{\\bigg"+n+" "+p+"}",m="{\\big"+n+" "+p+"}";return d.Parse("\\mathchoice"+o+m+m+m,{}).mml()},combineRelations:function(q){var r,n,p,o;for(r=0,n=q.data.length;r