mathjax-docs-2.7+20171212/0000755000000000000000000000000013213762601011526 5ustar mathjax-docs-2.7+20171212/LICENSE.txt0000644000000000000000000002613613213762601013361 0ustar Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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-docs-2.7+20171212/README.md0000644000000000000000000000477713213762601013024 0ustar # MathJax Documentation [![Documentation Status](https://readthedocs.org/projects/mathjax/badge/?version=latest)](https://docs.mathjax.org) ## Beautiful math in all browsers. MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. It was designed with the goal of consolidating the recent advances in web technologies into a single, definitive, math-on-the-web platform supporting the major browsers and operating systems. It requires no setup on the part of the user (no plugins to download or software to install), so the page author can write web documents that include mathematics and be confident that users will be able to view it naturally and easily. Simply include MathJax and some mathematics in a web page, and MathJax does the rest. See or for additional details. ## Beautiful documentation. The MathJax installation and usage documentation is available in this repository. The documents are also available on the MathJax web site on line at . Please help us improve the documentation! You can use the editor feature on github to to simplify this. ## Community The main MathJax website is , and it includes announcements and other important information. MathJax is maintained and distributed on GitHub at . A user forum for asking questions and getting assistance is hosted at Google, and the bug tracker is hosted at GitHub: Bug tracker: MathJax-Users Group: Before reporting a bug, please check that it has not already been reported. Also, please use the bug tracker for reporting bugs rather than the help forum. ## License Just like MathJax, this documentation is license under Apache License, Version 2.0. > Copyright (c) 2009-2013 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-docs-2.7+20171212/_static/0000755000000000000000000000000013213762601013154 5ustar mathjax-docs-2.7+20171212/_static/components.svg0000644000000000000000000000275613213762601016074 0ustar TeX Input MathML Input ASCIIMath Input MathML Element MathML Output HTML+CSS Output SVG Output mathjax-docs-2.7+20171212/_static/mathjax_mathml.user.js0000644000000000000000000000146413213762601017472 0ustar // ==UserScript== // @name MathJax MathML // @namespace http://www.mathjax.org/ // @description Insert MathJax into pages containing MathML // @include * // ==/UserScript== if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { if ((document.getElementsByTagName("math").length > 0) || (document.getElementsByTagNameNS == null ? false : (document.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math").length > 0))) { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"; var config = 'MathJax.Hub.Startup.onload()'; document.getElementsByTagName("head")[0].appendChild(script); } } mathjax-docs-2.7+20171212/_static/mathjax_wikipedia.user.js0000644000000000000000000000215513213762601020154 0ustar // ==UserScript== // @name MathJax in Wikipedia // @namespace http://www.mathjax.org/ // @description Insert MathJax into Wikipedia pages // @include http://en.wikipedia.org/wiki/* // ==/UserScript== if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) { // // Replace the images with MathJax scripts of type math/tex // var images = document.getElementsByTagName('img'), count = 0; for (var i = images.length - 1; i >= 0; i--) { var img = images[i]; if (img.className === "tex") { var script = document.createElement("script"); script.type = "math/tex"; if (window.opera) {script.innerHTML = img.alt} else {script.text = img.alt} img.parentNode.replaceChild(script,img); count++; } } if (count) { // // Load MathJax and have it process the page // var script = document.createElement("script"); script.type = "text/javascript"; script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full"; document.getElementsByTagName("head")[0].appendChild(script); } } mathjax-docs-2.7+20171212/advanced/0000755000000000000000000000000013213762601013273 5ustar mathjax-docs-2.7+20171212/advanced/callbacks.rst0000644000000000000000000002211413213762601015744 0ustar .. _using-callbacks: *************** Using Callbacks *************** A "callback" is a function that MathJax calls when it completes an action that may occur asynchronously (like loading a file). Many of MathJax's functions operate asynchronously, and MathJax uses callbacks to allow you to synchronize your code with the action of those functions. The `MathJax.Callback` structure manages these callbacks. Callbacks can include not only a function to call, but also data to be passed to the function, and an object to act as the JavaScript `this` value in the resulting call (i.e., the object on which the callback is to execute). Callbacks can be collected into :ref:`Queues ` where the callbacks will be processed in order, with later callbacks waiting until previous ones have completed before they are called. They are also used with :ref:`Signals ` as the means of receiving information about the signals as they occur. A number of methods in `MathJax.Hub` and `MathJax.Ajax` accept callback specifications as arguments and return callback structures. These routines always will return a callback even when none was specified in the arguments, and in that case, the callback is a "do nothing" callback. The reason for this is so that the resulting callback can be used in a `MathJax.Callback.Queue` for synchronization purposes, so that the actions following it in the queue will not be performed until after the callback has been fired. For example, the :meth:`MathJax.Ajax.Require()` method can be used to load external files, and it returns a callback that is called when the file has been loaded and executed. If you want to load several files and wait for them all to be loaded before performing some action, you can create a `Queue` into which you push the results of the :meth:`MathJax.Ajax.Require()` calls, and then push a callback for the action. The final action will not be performed until all the file-load callbacks (which precede it in the queue) have been called; i.e., the action will not occur until all the files are loaded. Specifying a Callback --------------------- Callbacks can be specified in a number of different ways, depending on the functionality that is required of the callback. The easiest case is to simply provide a function to be called, but it is also possible to include data to pass to the function when it is called, and to specify the object that will be used as `this` when the function is called. For example, the :meth:`MathJax.Ajax.Require()` method can accept a callback as its second argument (it will be called when the file given as the first argument is loaded and executed). So you can call .. code-block:: javascript MathJax.Ajax.Require("[MathJax]/config/myConfig.js",function () { alert("My configuration file is loaded"); }); and an alert will appear when the file is loaded. An example of passing arguments to the callback function includes the following: .. code-block:: javascript function loadHook (x) {alert("loadHook: "+x)} MathJax.Ajax.Require("[MathJax]/config/myConfig.js",[loadHook,"myConfig"]); Here, the ``loadHook()`` function accepts one argument and generates an alert that includes the value passed to it. The callback in the :meth:`MathJax.Ajax.Require()` call is ``[loadHook,"myConfig"]``, which means that (the equivalent of) ``loadHook("myConfig")`` will be performed when the file is loaded. The result should be an alert with the text `loadHook: myConfig`. The callback for the :meth:`MathJax.Ajax.Require()` method actually gets called with a status value, in addition to any parameters already included in the callback specification, that indicates whether the file loaded successfully, or failed for some reason (perhaps the file couldn't be found, or it failed to compile and run). So you could use .. code-block:: javascript MathJax.Ajax.Require("[MathJax]/config/myConfig.js",function (status) { if (status === MathJax.Ajax.STATUS.OK) { alert("My configuration file is loaded"); } else { alert("My configuration file failed to load!"); } }); to check if the file loaded properly. With additional parameters, the example might be .. code-block:: javascript function loadHook (x,status) {alert("loadHook: "+x+" has status "+status)} MathJax.Ajax.Require("[MathJax]/config/myConfig.js",[loadHook,"myConfig"]); Note that the parameters given in the callback specification are used first, and then additional parameters from the call to the callback come afterward. Callbacks to Object Methods =========================== When you use a method of a JavaScript object, a special variable called `this` is defined that refers to the object whose method is being called. It allows you to access other methods or properties of the object without knowing explicitly where the object is stored. For example, .. code-block:: javascript var aPerson = { firstname: "John", lastname: "Smith", showName: function () {alert(this.firstname+" "+this.lastname)} }; creates an object that contains three items, a `firstname`, and `lastname`, and a method that shows the person's full name in an alert. So ``aPerson.showName()`` would cause an alert with the text ``John Smith`` to appear. Note, however that this only works if the method is called as ``aPerson.showName()``; if instead you did .. code-block:: javascript var f = aPerson.showName; // assign f the function from aPerson f(); // and call the function the association of the function with the data in ``aPerson`` is lost, and the alert will probably show ``undefined undefined``. (In this case, ``f`` will be called with ``this`` set to the ``window`` variable, and so ``this.firstname`` and ``this.lastname`` will refer to undefined values.) Because of this, it is difficult to use an object's method as a callback if you refer to it as a function directly. For example, .. code-block:: javascript var aFile = { name: "[MathJax]/config/myConfig.js", onload: function (status) { alert(this.name+" is loaded with status "+status); } }; MathJax.Ajax.Require(aFile.name,aFile.onload); would produce an alert indicating that "undefined" was loaded with a particular status. That is because ``aFile.onload`` is a reference to the `onload` method, which is just a function, and the association with the `aFile` object is lost. One could do .. code-block:: javascript MathJax.Ajax.Require(aFile.name,function (status) {aFile.onload(status)}); but that seems needlessly verbose, and it produces a closure when one is not really needed. Instead, MathJax provides an alternative specification for a callback that allows you to specify both the method and the object it comes from: .. code-block:: javascript MathJax.Ajax.Require(aFile.name,["onload",aFile]); This requests that the callback should call ``aFile.onload`` as the function, which will maintain the connection between ``aFile`` and its method, thus preserving the correct value for `this` within the method. As in the previous cases, you can pass parameters to the method as well by including them in the array that specifies the callback: .. code-block:: javascript MathJax.Ajax.Require("filename",["method",object,arg1,arg2,...]); This approach is useful when you are pushing a callback for one of MathJax's Hub routines into the MathJax processing queue. For example, .. code-block:: javascript MathJax.Hub.Queue(["Typeset",MathJax.Hub,"MathDiv"]); pushes the equivalent of ``MathJax.Hub.Typeset("MathDiv")`` into the processing queue. See the :ref:`Callback Object ` reference pages for more information about the valid methods of specifying a callback. Creating a Callback Explicitly ============================== When you call a method that accepts a callback, you usually pass it a callback specification (like in the examples above), which *describes* a callback (the method will create the actual `Callback` object, and return that to you as its return value). You don't usually create `Callback` objects directly yourself. There are times, however, when you may wish to create a callback object for use with functions that don't create callbacks for you. For example, the ``setTimeout()`` function can take a function as its argument, and you may want that function to be a method of an object, and would run into the problem described in the previous section if you simply passed the object's method to ``setTimeout()``. Or you might want to pass an argument to the function called by ``setTimeout()``. (Altough the ``setTimeout()`` function can accept additional arguements that are supposed to be passed on to the code when it is called, some versions of Internet Explorer do not implement that feature, so you can't rely on it.) You can use a `Callback` object to do this, and the :meth:`MathJax.Callback()` method will create one for you. For example, .. code-block:: javascript function f(x) {alert("x = "+x)} setTimeout(MathJax.Callback([f,"Hello World!"]),500); would create a callback that calls ``f("Hello World!")``, and schedules it to be called in half a second. mathjax-docs-2.7+20171212/advanced/debugging-tips.rst0000644000000000000000000000343713213762601016744 0ustar .. _debugging-tips: ********************** MathJax Debugging tips ********************** This page documents basic tips for debugging MathJax in your application. Using unpacked resources ======================== MathJax provides both packged (minified) and unpacked versions of all its components. For debugging, it is useful to switch to an unpacked versions. For example, if your copy of MathJax lives at `https://example.com/MathJax.js` just add `unpacked/` before `MathJax.js`, e.g., .. code-block:: html to .. code-block:: html Getting traceback information ============================= .. code-block:: javascript MathJax.Hub.lastError MathJax stores the error object from the last `Math Processing Error` in `MathJax.Hub.lastError`. This allow developers to access the stack trace information when needed. Add listener for MathJax errors =============================== MathJax provides a detailed signaling infrastructure which a developers can hook into. The following example hooks into Math Processing Errors. .. code-block:: javascript MathJax.Hub.Register.MessageHook("Math Processing Error",function (message) { // do something with the error. message[2] is the Error object that records the problem. }); Another example hooks into TeX parsing errors. .. code-block:: javascript MathJax.Hub.Register.MessageHook("TeX Jax - parse error",function (message) { // do something with the error. message[1] will contain the data about the error. }); .. note:: For more information, see :ref:`mathjax-api`. mathjax-docs-2.7+20171212/advanced/dynamic.rst0000644000000000000000000001442513213762601015457 0ustar .. _ajax-mathjax: *************************** Loading MathJax Dynamically *************************** MathJax is designed to be included via a ``

TeX: \(\frac a b\)

MathML: x

AsciiMath: `a^2 + b^2 = c^2`

then the page ``http://localhost/MathJax/unpacked/test0.html`` should contain formatted equations corresponding to the TeX, MathML and AsciiMath sources. ``MathJax.js`` is the main file, initializes MathJax and loads all its components. The most important ones are represented in the diagram below. The input modes (in blue) are located in ``unpacked/jax/input/`` and transform the corresponding given input text into MathJax's internal strutures (in red) located in ``unpacked/jax/element`` (only one format at the moment, essentially "MathML"). Then this internal structure is rendered by the output modes (in green) located in ``unpacked/jax/output``. The MathJax extensions are located in ``unpacked/extensions/`` and can modify or extend the MathJax components. .. image:: /_static/components.svg :width: 50% :alt: MathJax components One feature of MathJax is that other Javascript files are loaded only when they are necessary. Extensions generally use other components so you must be sure that they are already loaded before running the extension. Similarly, the extension may need to indicate when it is ready so that other components can use it. :ref:`synchronization` is explained in the MathJax documentation but we will review the rules when needed. A Simple measureTime Extension ------------------------------ In this section, we are willing to write a small extension that indicates at the bottom of the page how much time MathJax has taken to typeset the page. First we create the following Javascript file: .. code-block:: javascript // unpacked/extensions/measureTime.js MathJax.HTML.addElement(document.body, "div", {style: {color: "red"}}, ["Hello World!"]); MathJax.Ajax.loadComplete("[MathJax]/extensions/measureTime.js"); The first line is just using the convenient :ref:`MathJax.HTML ` to create a ``
Hello World!
`` element. The second line will tell to MathJax that ``measureTime.js`` has been successfully loaded. Again, we refer to :ref:`Synchronizing your code with MathJax ` for details. Now modify test0.html and insert a ``text/x-mathjax-config`` script just before the one loading MathJax. Use that to add ``measureTime.js`` to the list of extensions to load: .. code-block:: html ... ... \[ \exp(x) = \expexpansion \] \[ f(x) = \taylor{f}{x}{a} \] \[ \log(1+h) = \taylorlog{h} \text{ for } |h| < 1 \] \[ \sin\left(\frac{\epsilon}{3}\right) = \taylorsin{\left(\frac{\epsilon}{3}\right)} \] Dealing with Dependencies ------------------------- Suppose that we want to create another extension Taylor2.js that uses some command from Taylor.js. Hence Taylor2 depends on Taylor and we should do some synchronization. We have already seen that the Taylor extension waits for the "TeX Jax Ready" signal before defining the macros. In order to inform the Taylor2 extensions when it is ready, the Taylor extension must itself send a "TeX Taylor Ready" signal. The appropriate place for that is of course after the macros are defined: .. code-block:: javascript // unpacked/extensions/TeX/Taylor.js MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () { MathJax.InputJax.TeX.Definitions.Add({ ... }); MathJax.Hub.Startup.signal.Post("TeX Taylor Ready"); }); MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/Taylor.js"); Now define Taylor2.js as follows: .. code-block:: javascript // unpacked/extensions/TeX/Taylor2.js MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () { MathJax.InputJax.TeX.Definitions.Add({ macros: { sinexpansion: ["Extension", "Taylor"] } }); }); MathJax.Hub.Register.StartupHook("TeX Taylor Ready", function () { MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions, { macros: { sinexpansion: ["Macro", "\\taylorsin{x}"] } }); }); MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/Taylor2.js"); When the input Jax is ready, ``\sinexpansion`` will be define as a function that loads the Taylor extension and restarts the processing afterward. When the Taylor extension is ready, ``\sinexpansion`` becomes the wanted ``\\taylorsin{x}`` definition. Now, you can use this command in a test3 page. Note that only only the Taylor2 extension is specified in the list of extension to load. .. code-block:: html ... ... \[ \sin(x) = \sinexpansion \] ... We won't give the details in this tutorial, but note that other MathJax components have similar methods to stop, wait for an extension and restart the execution again. More Advanced Extensions ------------------------ In general, writing more sophisticated extensions require a good understanding of the MathJax codebase. Although the :ref:`public MathJax API ` is available in the documentation, this is not always the case of the internal code. The rule of thumb is thus to read the relevant ``jax.js`` files in ``unpacked/jax`` (if necessary the Javascript file they can load too) and to make your extension redefine or expand the code. Here is an example. We modify the behavior of ``\frac`` so that the outermost fractions are drawn normally but those that have a ``\frac`` ancestor are drawn bevelled. We also define a new command ``\bfrac`` that draws bevelled fractions by default. It has an optional parameter to indicate whether we want a bevelled fraction and can take values "auto" (like ``\frac``), "true" or "false". One has to read carefully the TeX parser to understand how this extension is working. .. code-block:: javascript //unpacked/extensions/bevelledFraction.js MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () { MathJax.InputJax.TeX.Definitions.Add({ macros: { frac: "Frac", bfrac: "BFrac" } }, null, true); MathJax.InputJax.TeX.Parse.Augment({ Frac: function (name) { var old = this.stack.env.bevelled; this.stack.env.bevelled = true; var num = this.ParseArg(name); var den = this.ParseArg(name); this.stack.env.bevelled = old; var frac = MathJax.ElementJax.mml.mfrac(num, den); frac.bevelled = this.stack.env.bevelled; this.Push(frac); }, BFrac: function (name) { var bevelled = this.GetBrackets(name); if (bevelled === "auto") bevelled = this.stack.env.bevelled; else bevelled = (bevelled !== "false"); var old = this.stack.env.bevelled; this.stack.env.bevelled = true; var num = this.ParseArg(name); var den = this.ParseArg(name); this.stack.env.bevelled = old; var frac = MathJax.ElementJax.mml.mfrac(num, den); frac.bevelled = bevelled; this.Push(frac); } }); }); MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/mfracBevelled.js"); Again you can use this command in a ``test4`` page. .. code-block:: html ... ... \[ \frac a b \] \[ \frac {\frac a b}{\frac c d} \] \[ \bfrac a b \] \[ \bfrac[true] a b \] \[ \bfrac[false] a b \] \[ \bfrac[auto] a b \] \[ \frac {\bfrac[auto] a b}{\bfrac[false] a b} \] \[ \bfrac {\frac a b}{\bfrac[auto] a b} \] ... mathjax-docs-2.7+20171212/advanced/mathjax-node.rst0000644000000000000000000000060113213762601016401 0ustar .. mathjax-node: ***************************** MathJax-node API for NodeJS ***************************** MathJax can be used in NodeJS via the `MathJax-node `__ library. To install via NPM use .. code-block:: bash npm install mathjax-node For more information visit `the GitHub repository `__. mathjax-docs-2.7+20171212/advanced/model.rst0000644000000000000000000002414313213762601015131 0ustar **************************** The MathJax Processing Model **************************** The purpose of MathJax is to bring the ability to include mathematics easily in web pages to as wide a range of browsers as possible. Authors can specify mathematics in a variety of formats (e.g., :term:`MathML`, :term:`LaTeX`, or :term:`AsciiMath`), and MathJax provides high-quality mathematical typesetting even in those browsers that do not have native MathML support. This all happens without the need for special downloads or plugins, but rendering will be enhanced if high-quality math fonts (e.g., :term:`STIX`) are available to the browser. MathJax is broken into several different kinds of components: page preprocessors, input processors, output processors, and the MathJax Hub that organizes and connects the others. The input and output processors are called :term:`jax`, and are described in more detail below. When MathJax runs, it looks through the page for special tags that hold mathematics; for each such tag, it locates an appropriate input jax which it uses to convert the mathematics into an internal form (called an element jax), and then calls an output jax to transform the internal format into HTML content that displays the mathematics within the page. The page author configures MathJax by indicating which input and output jax are to be used. Often, and especially with pages that are authored by hand, the mathematics is not stored (initially) within the special tags needed by MathJax, as that would require more notation than the average page author is willing to type. Instead, it is entered in a form that is more natural to the page author, for example, using the standard TeX math delimiters ``$...$`` and ``$$...$$`` to indicate what part of the document is to be typeset as mathematics. In this case, MathJax can run a preprocessor to locate the math delimiters and replace them by the special tags that it uses to mark the formulas. There are preprocessors for :ref:`TeX notation `, :ref:`MathML notation `, :ref:`AsciiMath notation ` and the :ref:`jsMath notation ` that uses `span` and `div` tags. For pages that are constructed programmatically, such as HTML pages that result from running a processor on text in some other format (e.g., pages produced from Markdown documents, or via programs like `tex4ht`), it would be best to use MathJax's special tags directly, as described below, rather than having MathJax run another preprocessor. This will speed up the final display of the mathematics, since the extra preprocessing step would not be needed. It also avoids the conflict between the use of the less-than sign, ``<``, in mathematics and as an HTML special character (that starts an HTML tag), and several other issues involved in having the mathematics directly in the text of the page (see the documentation on the various input jax for more details on this). .. _mathjax-script-tags: How mathematics is stored in the page ===================================== In order to identify mathematics in the page, MathJax uses special `` represents an in-line equation in TeX notation, and .. code-block:: html is a displayed TeX equation. Alternatively, using MathML notation, you could use .. code-block:: html for in-line math, or .. code-block:: html for displayed equations in MathML notation. As other input jax are created, they will use other types to identify the mathematics they can process. Page authors can use one of MathJax's preprocessors to convert from math delimiters that are more natural for the author to type (e.g., TeX math delimiters like ``$$...$$``) to MathJax's `` mathjax-docs-2.7+20171212/advanced/signals.rst0000644000000000000000000001744213213762601015475 0ustar .. _using-signals: ************* Using Signals ************* Because much of MathJax operates asynchronously, it is important for MathJax to be able to indicate to other components operating on the page that certain actions have been taken. For example, as MathJax is starting up, it loads external files such as its configuration files and the various input and output :term:`jax` that are used on the page. This means that MathJax may not be ready to run until well after the ``

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

This example loops through the math elements on the page and displays the original TeX and the resulting MathML. Note that using the callbacks is the only safe way to do this, as the ``jax.root.toMathML()`` call may signal that it needs to load a file by throwing the reset error. If you do not take this into account, your code may work most of the time, but will cause errors in isolated circumstances. mathjax-docs-2.7+20171212/advanced/typeset.rst0000644000000000000000000002364413213762601015533 0ustar .. _typeset-math: ************************** Modifying Math on the Page ************************** If you are writing a dynamic web page where content containing mathematics may appear after MathJax has already typeset the rest of the page, then you will need to tell MathJax to look for mathematics in the page again when that new content is produced. To do that, you need to use the :meth:`MathJax.Hub.Typeset()` method. This will cause the preprocessors (if any were loaded) to run over the page again, and then MathJax will look for unprocessed mathematics on the page and typeset it, leaving unchanged any math that has already been typeset. You should not simply call this method directly, however. Because MathJax operates asynchonously (see :ref:`Synchronizing with MathJax ` for details), you need to be sure that your call to :meth:`MathJax.Hub.Typeset()` is synchronized with the other actions that MathJax is taking. For example, it may already be typesetting portions of the page, or it may be waiting for an output jax to load, etc., and so you need to queue the typeset action to be performed after MathJax has finished whatever else it may be doing. That may be immediately, but it may not, and there is no way to tell. To queue the typeset action, use the command .. code-block:: javascript MathJax.Hub.Queue(["Typeset",MathJax.Hub]); This will cause MathJax to typeset the page when it is next able to do so. It guarantees that the typesetting will synchronize properly with the loading of jax, extensions, fonts, stylesheets, and other asynchronous activity, and is the only truly safe way to ask MathJax to process additional material. The :meth:`MathJax.Hub.Typeset()` command also accepts a parameter that is a DOM element whose content is to be typeset. That could be a paragraph, or a ``
`` element, or even a MathJax math `` Type some TeX code:

You typed: ${}$
There are a number of additional example pages at `test/examples.html `_ that illustrate how to call MathJax dynamically or perform other actions with MathJax. .. _reset-equation-numbers: Reset Automatic Equation Numbering ================================== The :ref:`TeX input ` allows you to automatically number equations. When modifying a page, this can lead to problems as numbered equations may be removed and added; most commonly, duplicate labels (and thus ``id``'s in the DOM) lead to issues. You can reset equation numbering using the TeX Input's ``resetEquationNumbers`` but you will need to re-process the page to update the labels afterwards, e.g., .. code-block:: javascript MathJax.Hub.Queue( ["resetEquationNumbers",MathJax.InputJax.TeX], ["PreProcess",MathJax.Hub], ["Reprocess",MathJax.Hub] ); mathjax-docs-2.7+20171212/api/0000755000000000000000000000000013213762601012277 5ustar mathjax-docs-2.7+20171212/api/ajax.rst0000644000000000000000000001702713213762601013763 0ustar .. _api-ajax: *********************** The MathJax.Ajax Object *********************** The `MathJax.Ajax` structure holds the data and functions for handling loading of external modules. Modules are loaded only once, even if called for in several places. The loading of files is asynchronous, and so the code that requests an external module will continue to run even when that module has not completed loading, so it is important to be aware of the timing issues this may cause. Similarly, creating or loading stylesheets is an asynchronous action. In particular, all actions that rely on the file or stylesheet having been loaded must be delayed until after the file has been downloaded completely. This is the reason for the large number of routines that take callback functions. Any operation that could cause the loading of a file or stylesheet must be synchronized with the rest of the code via such callbacks. Since processing any mathematics might cause files to be loaded (e.g., little-used markup might be implemented in an extension that is loaded only when that markup is used), any code that dynamically typesets mathematics will need to be structured to use callbacks to guarantee that the mathematics has been completely processed before the code tries to use it. See the :ref:`Synchronizing with MathJax ` documentation for details on how to do this properly. Properties ========== .. describe:: timeout Number of milliseconds to wait for a file to load before it is considered to have failed to load. *Default:* 15 seconds .. describe:: STATUS.OK The value used to indicate that a file load has occurred successfully. .. describe:: STATUS.ERROR The value used to indicate that a file load has caused an error or a timeout to occur. .. describe:: loaded An object containing the names of the files that have been loaded (or requested) so far. ``MathJax.Ajax.loaded["file"]`` will be non-``null`` when the file has been loaded, with the value being the ``MathJax.Ajax.STATUS`` value of the load attempt. .. describe:: loading An object containing the files that are currently loading, the callbacks that are to be run when they load or timeout, and additional internal data. .. describe:: loadHooks An object containing the load hooks for the various files, set up by the :meth:`LoadHook()` method, or by the :meth:`MathJax.Hub.Register.LoadHook()` method. Methods ======= .. method:: Require(file[,callback]) Loads the given file if it hasn't been already. The file must be a JavaScript file or a CSS stylesheet; i.e., it must end in ``.js`` or ``.css``. Alternatively, it can be an object with a single `key:value` pair where the `key` is one of ``js`` or ``css`` and the `value` is the file of that type to be loaded (this makes it possible to have the file be created by a CGI script, for example, or to use a ``data::`` URL). The file must be relative to the MathJax home directory and can not contain ``../`` file path components. When the file is completely loaded and run, the `callback`, if provided, will be executed passing it the status of the file load. If there was an error while loading the file, or if the file fails to load within the time limit given by ``MathJax.Ajax.timout``, the status will be ``MathJax.Ajax.STATUS.ERROR`` otherwise it will be ``MathJax.Ajax.STATUS.OK``. If the file is already loaded, the callback will be called immediately and the file will not be loaded again. :Parameters: - **file** --- name of the file to be loaded - **callback** --- the callback specification :Returns: the callback object .. method:: Load(file[,callback]) Used internally to load a given file without checking if it already has been loaded, or where it is to be found. :Parameters: - **file** --- name of the file to be loaded - **callback** --- the callback specification :Returns: the callback object .. method:: loadComplete(file) Called from within the loaded files to inform MathJax that the file has been completely loaded and initialized. The `file` parameter is the name of the file that has been loaded. This routine will cause any callback functions registered for the file or included in the :meth:`MathJax.Ajax.Require()` calls to be executed, passing them the status of the load (``MathJax.Ajax.STATUS.OK`` or ``MathJax.Ajax.STATUS.ERROR``) as their last parameter. :Parameters: - **file** --- name of the file that has been loaded :Returns: ``null`` .. method:: loadTimeout(file) Called when the timeout period is over and the file hasn't loaded. This indicates an error condition, and the :meth:`MathJax.Ajax.loadError()` method will be executed, then the file's callback will be run with ``MathJax.Ajax.STATUS.ERROR`` as its parameter. :Parameters: - **file** --- name of the file that timed out :Returns: ``null`` .. method:: loadError(file) The default error handler called when a file fails to load. It puts a warning message into the MathJax message box on screen. :Parameters: - **file** --- the name of the file that failed to load :Returns: ``null`` .. method:: LoadHook(file,callback) Registers a callback to be executed when the given file is loaded. The file load operation needs to be started when this method is called, so it can be used to register a hook for a file that may be loaded in the future. :Parameters: - **file** --- the name of the file to wait for - **callback** --- the callback specification :Returns: the callback object .. method:: Preloading(file1[,file2...]) Used with combined configuration files to indicate what files are in the configuration file. Marks the files as loading (since there will never be an explicit :meth:`Load()` or :meth:`Require()` call for them), so that load-hooks and other load-related events can be properly processed when the :meth:`loadComplete()` occurs. :Parameters: - **file1, file2, ...** --- the names of the files in the combined file :Returns: ``null`` .. method:: Styles(styles[,callback]) Creates a stylesheet from the given style data. `styles` can either be a string containing a stylesheet definition, or an object containing a :ref:`CSS Style Object `. For example: .. code-block:: javascript MathJax.Ajax.Styles("body {font-family: serif; font-style: italic}"); and .. code-block:: javascript MathJax.Ajax.Styles({ body: { "font-family": "serif", "font-style": "italic" } }); both set the body font family and style. The callback routine is called when the stylesheet has been created and is available for use. :Parameters: - **styles** --- CSS style object for the styles to set - **callback** --- the callback specification :Returns: the callback object .. note:: Internet Explorer has a limit of 32 dynamically created stylesheets, so it is best to combine your styles into one large group rather than making several smaller calls. .. method:: fileURL(file) Returns a complete URL to a file (replacing ``[MathJax]`` with the actual root URL location). :Parameters: - **file** --- the file name possibly including ``[MathJax]`` :Returns: the full URL for the file mathjax-docs-2.7+20171212/api/callback.rst0000644000000000000000000002467713213762601014605 0ustar .. _api-callback: ************************** The MathJax.Callback Class ************************** The ``MathJax.Callback`` object is one of the key mechanisms used by MathJax to synchronize its actions with those that occur asynchronously, like loading files and stylesheets. A `Callback` object is used to tie the execution of a function to the completion of an asynchronous action. See :ref:`Synchronizing with MathJax ` for more details, and :ref:`Using Callbacks ` in particular for examples of how to specify and use MathJax `Callback` objects. Specifying a callback --------------------- When a method includes a callback as one of its arguments, that callback can be specified in a number of different ways, depending on the functionality that is required of the callback. The easiest case is to simply provide a function to be called, but it is also possible to include data to pass to the function when it is executed, and even the object that will be used as the javascript `this` object when the function is called. Most functions that take callbacks as arguments accept a `callback specification` rather than an actual callback object, though you can use the :meth:`MathJax.Callback` function to convert a callback specification into a Callback object if needed. A callback specification is any one of the following: .. describe:: fn A function that is to be called when the callback is executed. No additional data is passed to it (other than what it is called with at the time the callback is executed), and `this` will be the window object. .. describe:: [fn] An array containing a function to be called when the callback is executed (as above). .. describe:: [fn, data...] An array containing a function together with data to be passed to that function when the callback is executed; `this` is still the window object. For example, .. code-block:: javascript [function (x,y) {return x+y}, 2, 3] would specify a callback that would pass ``2`` and ``3`` to the given function, and it would return their sum, ``5``, when the callback is executed. .. describe:: [object, fn] An array containing an object to use as `this` and a function to call for the callback. For example, .. code-block:: javascript [{x:'foo', y:'bar'}, function () {this.x}] would produce a callback that returns the string ``"foo"`` when it is called. .. describe:: [object, fn, data...] Similar to the previous case, but with data that is passed to the function as well. .. describe:: ["method", object] Here, `object` is an object that has a method called `method`, and the callback will execute that method (with the object as `this`) when it is called. For example, .. code-block:: javascript ["toString",[1,2,3,4]] would call the `toString` method on the array ``[1,2,3,4]`` when the callback is called, returning ``1,2,3,4``. .. describe:: ["method", object, data...] Similar to the previous case, but with data that is passed to the method. E.g., .. code-block:: javascript ["slice",[1,2,3,4],1,3] would perform the equivalent of ``[1,2,3,4].slice(1,3)``, which returns the array ``[2,3]`` as a result. .. describe:: {hook: fn, data: [...], object: this} Here the data for the callback are given in an associative array of `key:value` pairs. The value of `hook` is the function to call, the value of `data` is an array of the arguments to pass to the function, and the value of `object` is the object to use as `this` in the function call. The specification need not include all three `key:value` pairs; any that are missing get default values (a function that does nothing, an empty array, and the window object, respectively). .. describe:: "string" This specifies a callback where the string is executed via an ``eval()`` statement. The code is run in the global context, so any variables or functions created by the string become part of the global namespace. The return value is the value of the last statement executed in the string. Executing a Callback Object =========================== The `Callback` object is itself a function, and calling that function executes the callback. You can pass the callback additional parameters, just as you can any function, and these will be added to the callback function's argument list following any data that was supplied at the time the callback was created. For example .. code-block:: javascript var f = function (x,y) {return x + " and " +y} var cb = MathJax.Callback([f, "foo"]); var result = cb("bar"); // sets result to "foo and bar" Usually, the callback is not executed by the code that creates it (as it is in the example above), but by some other code that runs at a later time at the completion of some other activity (say the loading of a file), or in response to a user action. For example: .. code-block:: javascript function f(x) {alert("x contains "+x)}; function DelayedX(time) { var x = "hi"; setTimeout(MathJax.Callback([f, x], time)); } The ``DelayedX`` function arranges for the function ``f`` to be called at a later time, passing it the value of a local variable, ``x``. Normally, this would require the use of a closure, but that is not needed when a `MathJax.Callback` object is used. Callback Object Properties -------------------------- .. describe:: hook The function to be called when the callback is executed. .. describe:: data An array containing the arguments to pass to the callback function when it is executed. .. describe:: object The object to use as `this` during the call to the callback function. .. describe:: called Set to ``true`` after the callback has been called, and undefined otherwise. A callback will not be executed a second time unless the callback's :meth:`reset()` method is called first, or its ``autoReset`` property is set to ``true``. .. describe:: autoReset Set this to ``true`` if you want to be able to call the callback more than once. (This is the case for signal listeners, for example). .. describe:: isCallback Always set to ``true`` (used to detect if an object is a callback or not). Callback Object Methods ----------------------- .. method:: reset() Clears the callback's `called` property. MathJax.Callback Methods ------------------------ .. method:: Delay(time[, callback]) Waits for the specified time (given in milliseconds) and then performs the callback. It returns the Callback object (or a blank one if none was supplied). The returned callback structure has a `timeout` property set to the result of the ``setTimeout()`` call that was used to perform the wait so that you can cancel the wait, if needed. Thus :meth:`MathJax.Callback.Delay()` can be used to start a timeout delay that executes the callback if an action doesn't occur within the given time (and if the action does occur, the timeout can be canceled). Since :meth:`MathJax.Callback.Delay()` returns a callback structure, it can be used in a callback queue to insert a delay between queued commands. :Parameters: - **time** --- the amount of time to wait - **callback** --- the callback specification :Returns: the callback object .. method:: Queue([callback,...]) Creates a `MathJax.CallBack.Queue` object and pushes the given callbacks into the queue. See :ref:`Using Queues ` for more details about MathJax queues. :Parameters: - **callback** --- one or more callback specifications :Returns: the `Queue` object .. method:: Signal(name) Looks for a named signal, creates it if it doesn't already exist, and returns the signal object. See :ref:`Using Signals ` for more details. :Parameters: - **name** --- name of the signal to get or create :Returns: the `Signal` object .. method:: ExecuteHooks(hooks[, data[,reset]]) Calls each callback in the `hooks` array (or the single hook if it is not an array), passing it the arguments stored in the data array. If `reset` is ``true``, then the callback's :meth:`reset()` method will be called before each hook is executed. If any of the hooks returns a `Callback` object, then it collects those callbacks and returns a new callback that will execute when all the ones returned by the hooks have been completed. Otherwise, :meth:`MathJax.Callback.ExecuteHooks()` returns ``null``. :Parameters: - **hooks** --- array of hooks to be called, or a hook - **data** --- array of arguments to pass to each hook in turn - **reset** --- ``true`` if the :meth:`reset()` method should be called :Returns: callback that waits for all the hooks to complete, or ``null`` .. method:: Hooks(reset) Creates a prioritized list of hooks that are called in order based on their priority (low priority numbers are handled first). This is meant to replace :meth:`MathJax.Callback.ExecuteHooks()` and is used internally for signal callbacks, pre- and post-filters, and other lists of callbacks. :Parameters: - **reset** --- ``true`` if callbacks can be called more than once :Returns: the `Hooks` object The list has the following methods: .. method:: Add(hook[,priority]) Add a callback to the prioritized list. If ``priority`` is not provided, the default is 10. The ``hook`` is a `Callback` specification as described above. :Parameters: - **hook** --- callback specification to add to the list - **priority** --- priority of the hook in the list (default: 10) :Returns: the callback object being added .. method:: Remove(hook) :noindex: Remove a given hook (as returned from :meth:`Add()` above) from the prioritized list. :Parameters: - **hook** --- the callback to be removed :Returns: ``null`` .. method:: Execute() Execute the list of callbacks, resetting them if requested. If any of the hooks return callbacks, then ``Execute()`` returns a callback that will be executed when they all have completed. :Returns: a callback object or ``null`` mathjax-docs-2.7+20171212/api/elementjax.rst0000644000000000000000000001056413213762601015173 0ustar .. _api-element-jax: **************************** The MathJax.ElementJax Class **************************** The element jax is the bridge between the input and output jax, and contains the data produced by the input jax needed by the output jax to display the results. It is tied to the individual `` where ``path-to-MathJax`` is the URL to the MathJax directory on your server or hard disk. If you are using MathJax from the CDN, you can view the contents of `default.js `_ as a reference, but you will not be able to edit the CDN copy. It is possible to use the CDN copy of MathJax with your own configuration file, however; see :ref:`Using a Local Configuration File with the CDN ` for details. The remaining files in the ``MathJax/config`` directory are combined configuration files that include not just configuration parameters but also the files that MathJax would need to load for those configurations; you can browse the directory on `Github `_. This means MathJax will have to load fewer files, and since each file access requires establishing connections over the network, it can be faster to load one larger file than several smaller ones. See :ref:`Loading and Configuring MathJax ` for more details about how to load configurations, and how to modify the parameters for a configuration file. The following sections describe the contents of the combined configuration files. Each comes in two flavors: a standard version and a "full" version. The standard version simply defines the output processor(s) that are part of the configuration, but doesn't load the code that implements the output processor. The full version loads the complete output processors, so everything that MathJax needs for the page should be loaded up front, and there will be no delay once the page is ready to be processed. To obtain the "full" version, add ``-full`` to the end of the configuration file name. The ``TeX-MML-AM_CHTML`` configuration file ================================================ This configuration file is one of the most general of the pre-defined configurations. It loads all the main MathJax components, including the TeX, MathML, and AsciiMath preprocessors and input processors, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the CommonHTML output processor definitions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","input/MathML","input/AsciiMath","output/CommonHTML"], extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js","AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax, the TeX, MathML, and AsciiMath input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The `-full` version also loads the CommonHTML output jax main code, plus the CommonHTML `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on CommonHTML output processor. The ``TeX-MML-AM_HTMLorMML`` configuration file ================================================ This configuration file is one of the most general of the pre-defined configurations. It loads all the main MathJax components, including the TeX, MathML, and AsciiMath preprocessors and input processors, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, both the native MathML and HTML-CSS output processor definitions, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax, the TeX, MathML, and AsciiMath input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The `-full` version also loads the HTML-CSS, PreviewHTML, and NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on the NativeMML and HTML-CSS output processors. See the :ref:`MMLorHTML configuration ` section for details on the options that control the ``MMLorHTML`` configuration. The ``TeX-MML-AM_SVG`` configuration file ================================================ This configuration file is one of the most general of the pre-defined configurations. It loads all the main MathJax components, including the TeX, MathML, and AsciiMath preprocessors and input processors, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the SVG output processor, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["tex2jax.js","mml2jax.js","asciimath2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax, the TeX, MathML, and AsciiMath input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The `-full` version also loads the SVG and PreviewHTML output jax main code, plus the SVG `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on the SVG output processor. The ``TeX-AMS-MML_HTMLorMML`` configuration file ================================================ This configuration file is a commonly used pre-defined configuration. It loads the most commonly used MathJax components, including the TeX and MathML preprocessors and input processors, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, both the native MathML and HTML-with-CSS output processor definitions, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax, the TeX and MathML input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the HTML-CSS, PreviewHTML, and NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See :ref:`MathJax Output Formats ` for more information on the NativeMML and HTML-CSS output processors. See the :ref:`MMLorHTML configuration ` section for details on the options that control the ``MMLorHTML`` configuration. The ``TeX-AMS_CHTML`` configuration file ======================================== This configuration file is for sites that only use TeX format for their mathematics, and that want the output to be as close to TeX output as possible. This configuration uses the CommonHTML output jax. The user can still use the MathJax contextual menu to select any other output jax if they desire. This file includes all the important MathJax components for TeX input and output, including the `tex2jax` preprocessor and TeX input jax, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the CommonHTML output, the AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","output/CommonHTML"], extensions: ["tex2jax.js","MathMenu.js","MathZoom.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the CommonHTML output jax main code, plus the CommonHTML `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See :ref:`MathJax Output Formats ` for more information on the CommonHTML output processor. The ``TeX-AMS_SVG`` configuration file ================================================ This configuration file is for sites that only use TeX format for their mathematics, and that want the output to be as close to TeX output as possible. This uses the SVG output jax. The user can still use the MathJax contextual menu to select another output jax if they desire. This file includes all the important MathJax components for TeX input and output, including the `tex2jax` preprocessor and TeX input jax, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the SVG output processor, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","output/SVG", "output/PreviewHTML"], extensions: ["tex2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the SVG and PreviewHTML output jax main code, plus the SVG `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See :ref:`MathJax Output Formats ` for more information on the SVG output processor. The ``TeX-AMS_HTML`` configuration file ================================================ This configuration file is for sites that only use TeX format for their mathematics, and that want the output to be as close to TeX output as possible. This uses the HTML-CSS output jax (even when the user's browser understands MathML). The user can still use the MathJax contextual menu to select the NativeMML output jax if they desire. This file includes all the important MathJax components for TeX input and output, including the `tex2jax` preprocessor and TeX input jax, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the HTML-with-CSS output processor definition, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","output/HTML-CSS", "output/PreviewHTML"], extensions: ["tex2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the HTML-CSS and PreviewHTML output jax main code, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See :ref:`MathJax Output Formats ` for more information on the HTML-CSS output processor. The ``MML_CHTML`` configuration file ==================================== This configuration file is for sites that only use MathML format for their mathematics. It will use the CommonHTML output. The user can still use the MathJax contextual menu to select any other output format if they desire. This file includes all the important MathJax components for MathML input and output, including the `mml2jax` preprocessor and MathML input jax, the CommonHTML output processor definition files, the AssistiveMML extension, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/MathML", "output/CommonHTML"], extensions: ["mml2jax.js","MathMenu.js","MathZoom.js", "AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the MathML input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the CommonHTML output jax main code, plus the CommonHTML `mtable` extension, which is normally loaded on demand. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See :ref:`MathJax Output Formats ` for more information on the CommonHTML output processor. The ``MML_SVG`` configuration file ================================================ This configuration file is for sites that only use MathML format for their mathematics. It will use the SVG output. The user can still use the MathJax contextual menu to select the other output formats if they desire. This file includes all the important MathJax components for MathML input and output, including the `mml2jax` preprocessor and MathML input jax, the SVG output processor definition files, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/MathML","output/SVG", "output/PreviewHTML"], extensions: ["mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the MathML input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the SVG and PreviewHTML output jax main code files, plus the SVG `mtable` extension, which is normally loaded on demand. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See :ref:`MathJax Output Formats ` for more information on the SVG output processor. The ``MML_HTMLorMML`` configuration file ================================================ This configuration file is for sites that only use MathML format for their mathematics. It will use MathML output in browsers where that is supported well, and HTML-CSS output otherwise. The user can still use the MathJax contextual menu to select the other output format if they desire. This file includes all the important MathJax components for MathML input and output, including the `mml2jax` preprocessor and MathML input jax, the NativeMML and HTML-CSS output processor definition files, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the MathML input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the HTML-CSS, PreviewHTML, and NativeMML output jax main code files, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See :ref:`MathJax Output Formats ` for more information on the NativeMML and HTML-CSS output processors. See the :ref:`MMLorHTML configuration ` section for details on the options that control the ``MMLorHTML`` configuration. The ``AM_CHTML`` configuration file ================================================ This configuration file is for sites that only use AsciiMath format for their mathematics. It will use CommonHTML output. The user can still use the MathJax contextual menu to select the other output formats if they desire. This file includes all the important MathJax components for AsciiMath input and output, including the `asciimath2jax` preprocessor and AsciiMath input jax, the CommonHTML output processor definition files, the AssistiveMML extension, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/AsciiMath","output/CommonHTML"], extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js","AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the CommonHTML output jax main code, plus the CommonHTML `mtable` extension, which is normally loaded on demand. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on the CommonHTML output processors. The ``AM_SVG`` configuration file ================================================ This configuration file is for sites that only use AsciiMath format for their mathematics. It will use SVG output. The user can still use the MathJax contextual menu to select the other output formats if they desire. This file includes all the important MathJax components for AsciiMath input and output, including the `asciimath2jax` preprocessor and AsciiMath input jax, the CommonHTML output processor definition files, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/AsciiMath","output/SVG", "output/PreviewHTML", extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js","AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the SVG and PreviewHTML output jax main code, plus the SVG `mtable` extension, which is normally loaded on demand. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on the CommonHTML output processors. The ``AM_HTMLorMML`` configuration file ================================================ This configuration file is for sites that only use AsciiMath format for their mathematics. It will use MathML output in browsers where that is supported well, and HTML-CSS output otherwise. The user can still use the MathJax contextual menu to select the other output format if they desire. This file includes all the important MathJax components for AsciiMath input and output, including the `asciimath2jax` preprocessor and AsciiMath input jax, the NativeMML and HTML-CSS output processor definition files, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/AsciiMath","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["asciimath2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"] }); In addition, it loads the mml Element Jax and the TeX input jax main code (not just the definition file), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the HTML-CSS and PreviewHTML output jax main code, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. See the :ref:`asciimath2jax configuration ` section for other configuration options for the ``asciimath2jax`` preprocessor, and the :ref:`AsciiMath input jax configuration ` section for options that control the AsciiMath input processor. See :ref:`MathJax Output Formats ` for more information on the HTML-CSS and NativeMML output processors. See the :ref:`MMLorHTML configuration ` section for details on the options that control the ``MMLorHTML`` configuration. The ``TeX-AMS-MML_SVG`` configuration file ================================================ This configuration file is the same as `TeX-AMS-MML_HTMLorMML` except that it uses the SVG output renderer rather than the NativeMML or HTML-CSS ones. It loads all the main MathJax components, including the TeX and MathML preprocessors and input processors, the AMSmath, AMSsymbols, noErrors, and noUndefined TeX extensions, the SVG output processor definitions, the fast-preview and AssistiveMML extensions, and the MathMenu and MathZoom extensions. It is equivalent to the following configuration: .. code-block:: javascript MathJax.Hub.Config({ jax: ["input/TeX","input/MathML","output/SVG", "output/PreviewHTML"], extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] } }); In addition, it loads the mml Element Jax, the TeX and MathML input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the SVG and PreviewHTML output jax main code, plus the SVG `mtable` extension, which is normally loaded on demand. See the :ref:`tex2jax configuration ` section for other configuration options for the ``tex2jax`` preprocessor, and the :ref:`TeX input jax configuration ` section for options that control the TeX input processor. See the :ref:`mml2jax configuration ` section for other configuration options for the ``mml2jax`` preprocessor, and the :ref:`MathML input jax configuration ` section for options that control the MathML input processor. See :ref:`MathJax Output Formats ` for more information on the SVG output processor. The ``Accessible`` configuration file [Deprecated] ================================================== This configuration file is essentially the same as ``TeX-AMS-MML_HTMLorMML`` except that it includes options that are designed for assistive technology, particularly for those with visual challenges. .. warning:: *This file is deprecated* since the controls that make MathJax work with screen readers are now available in the MathJax contextual menu and the AssistiveMML extension, and so there is no need to set them in the configuration file any longer. So you can use any of the other pre-defined configurations and readers with special needs should be able to change the MathJax settings themselves to be appropriate for their software. The Accessible configuration is equivalent to the following: .. code-block:: javascript MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"], extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"], TeX: { extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"] }, menuSettings: { zoom: "Double-Click", mpContext: true, mpMouse: true }, errorSettings: { message: ["[Math Error]"] } }); This turns off the MathJax contextual menu for IE when MathPlayer is active, and passes mouse events on to MathPlayer to allow screen readers full access to MathPlayer. It also sets the zoom trigger to double-click, so that readers can see a larger version of the mathematics by double-clicking on any equation. In addition, it loads the mml Element Jax, the TeX and MathML input jax main code (not just the definition files), as well as the `toMathML` extension, which is used by the Show Source option in the MathJax contextual menu. The ``-full`` version also loads the HTML-CSS, CommomHTML, and NativeMML output jax main code, plus the HTML-CSS `mtable` extension, which is normally loaded on demand. mathjax-docs-2.7+20171212/configuration.rst0000644000000000000000000005015113213762601015131 0ustar .. _loading: ******************************* Loading and Configuring MathJax ******************************* You load MathJax into a web page by including its main JavaScript file into the page. That is done via a `` where ``path-to-MathJax`` is replaced by the URL of the copy of MathJax that you are loading. For example, if you are using `cdnjs `_ as a distributed network service, the tag might be .. code-block:: html If you have installed MathJax yourself, ``path-to-MathJax`` will be the location of MathJax on your server, or (if you are using MathJax locally rather than through a server) the location of that directory on your hard disk. For example, if the MathJax directory is at the top level of your web server's directory hierarchy, you might use .. code-block:: html to load MathJax. If you install MathJax on a server in a domain that is different from the one containing the page that will load MathJax, then there are issues involved in doing so that you need to take into consideration. See the :ref:`Notes About Shared Servers ` for more details. When you load MathJax, it is common to request a specific configuration file as discussed in the section on :ref:`Using a Configuration File ` below, and in more detail in the :ref:`Common Configurations ` section. A typical invocation of MathJax would be .. code-block:: html which loads MathJax with a configuration file that includes everything you need in order to enter mathematics in either TeX, LaTeX, or MathML notation, and produces output using MathML if the browser supports that well enough, or HTML-with-CSS otherwise. If you **don't** load an explicit configuration file, you will need to include an in-line configuration block in order to tell MathJax how to read and display the mathematics on your pages. See the section below on :ref:`Using In-line Configuration Options ` for details. It is best to load MathJax in the document's ```` block, but it is also possible to load MathJax into the ```` section, if needed. If you do this, load it as early as possible, as MathJax will begin to load its components as soon as it is included in the page, and that will help speed up the processing of the mathematics on your page. MathJax does expect there to be a ```` section to the document, however, so be sure there is one if you are loading MathJax in the ````. It is also possible to load MathJax dynamically after the page has been prepared, for example, via a `GreaseMonkey `_ script, or using a specially prepared `bookmarklet `_. This is an advanced topic, however; see :ref:`Loading MathJax Dynamically ` for more details. .. _loading-CDN: Loading MathJax from a CDN ========================== MathJax is available as a web service from various free CDN providers, so you can obtain MathJax from there without needing to install it on your own server. .. warning:: We retired our self-hosted CDN at `cdn.mathjax.org` in April, 2017. We recommend using `cdnjs.com `_ which uses the same provider. The use of ``cdn.mathjax.org`` was governed by its `terms of service `_. A CDN is part of a distributed "cloud" network, so it is handled by servers around the world. That means that you should get access to a server geographically near you, for a fast, reliable connection. Most CDN services offer several versions of MathJax. For example, `cdnjs` hosts all tagged versions since v1.1 so you can link to the version you prefer. .. note:: Some CDN providers :ref:`on our list ` offer a "rolling release" link, i.e, a link that updates to each newer version of MathJax upon release. The URL that you use to obtain MathJax determines the version that you get. For example, `cdnjs` uses a URL that includes the version tag so you can load the current version via .. code-block:: sh https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js # the 2.7.2 release Pre-releases are also available on `cdnjs`. .. note:: If you wish to use the development version of MathJax, you will need to install your own copy; see :ref:`Installing and Testing MathJax ` for information on how to do that. Alternatively, you can load the ``develop`` branch via `rawgit.com `. If you wish to use a CDN but use your own configuration file rather than one of the pre-defined ones, see the information at the end of the :ref:`Using a Local Configuration File ` section below. Configuring MathJax =================== There are two ways to configure MathJax: via a configuration file, or by including configuration commands within the web page itself. These can be used independently, or in combination. For example, you can load a main pre-defined configuration file, but include in-line commands to adjust the configuration to your needs. Note that you must use at least one of these two forms of configuration. Unlike MathJax v1.0, version 1.1 and higher does not load a default configuration file. If you have been using version 1.0's ``config/MathJax.js`` for your configuration, you will need to load that configuration file explicitly via a ``config`` parameter, as described below. .. _config-files: Using a configuration file ========================== The easiest way to configure MathJax is to use a configuration file. MathJax comes with a number of pre-defined and pre-combined configuration files, which are stored in the ``MathJax/config`` directory. The contents of these files are explained in more detail in the :ref:`Common Configurations ` section. Considerations for using combined configuration files ----------------------------------------------------- Usually, MathJax loads its components only when they are needed, but each component will require a separate file to be loaded, and that can cause delays before the mathematics is displayed. The combined configuration files load the majority of the needed files all as one large file, reducing the number of network requests that are needed. That means you will probably be getting the components that MathJax needs faster than you would without the combined file, but you may be loading components that are never actually used; that is the trade off. Each of the combined configuration files comes in two flavors: the ones listed above, which only configure the output processors but don't include the main code, and a "full" version, that also includes the complete output processors. For example, with ``TeX-AMS_CHTML.js`` and ``TeX-AMS_CHTML-full.js``, the latter includes the complete CommonHTML output processor. The "full" configuration files are substantially larger (on the order of 70KB more), so you need to decide whether it is worth loading the full configuration for your pages. If most of your pages include mathematics, then it is to your advantage to load the full version, but if you are including MathJax in a theme file for a blog or wiki that only includes mathematics occasionally, then perhaps it is better to use the standard configuration instead, in which case the output processors are only loaded when they are actually needed, saving the loading of 70KB for pages that don't. Of course, if your server is configured to compress the files it sends, the difference between the two is considerably reduced. Furthermore, most browsers will cache the JavaScript they receive, so the download cost should only occur on the first page a user views, so it may be best to use the "full" version after all. Note, however, that older mobile devices sometimes have limits on the size of files that they cache, so they may be forced to download the configuration on every page. You need to keep these issues in mind as you decide on which configuration to use. To load a configuration file, use ``config=filename`` (where ``filename`` is one of the names above without the ``.js``) as a parameter to the URL of the ``MathJax.js`` file. For example .. code-block:: html loads the ``config/TeX-AMS-MML_HTMLorMML.js`` configuration file from the MathJax distributed network service. You can include more than one configuration file by separating them with commas. For example, if you have a locally defined configuration file called ``MathJax/config/local/local.js`` that modifies the settings for the ``TeX-AMS_HML`` configuration, defines some new TeX macros, and so on, you can use .. code-block:: html to first load the main configuration, then the local modifications. .. _local-config-files: Using a local configuration file with a CDN =========================================== You can load MathJax from a CDN provider but still use a configuration from your own local server. For example, suppose you have a configuration file called ``local.js`` on your own server, in a directory called ``MathJax/config/local``. Then you can load MathJax from a CDN and still use your configuration file as follows: .. code-block:: html Because the ``local.js`` file is not on the CDN server, you must give the complete URL to the local configuration file. Note that you also have to edit the :meth:`loadComplete()` call that is at the bottom of the configuration file to change it from ``[MathJax]/config/local/local.js`` to the complete URL as you give it in the ``config`` parameter. In the example above, it would be .. code-block:: javascript MathJax.Ajax.loadComplete("http://myserver.com/MathJax/config/local/local.js"); That is because the ``[MathJax]`` in the original URL refers to the root directory where ``MathJax.js`` was loaded, which is on the CDN, not your local server, and so you need to tell MathJax the actual location of your configuration file. .. _inline-config: Using in-line configuration options =================================== The second way to configure MathJax is through `in-line configuration`, which puts the configuration options within the web page itself. The use of in-line configuration with MathJax requires two separate `` This example includes the `tex2jax` preprocessor and configures it to use both the standard :term:`TeX` and :term:`LaTeX` math delimiters. It uses the `TeX` input processor and the `HTML-CSS` output processor, and forces the HTML-CSS processor to use the TeX fonts rather than other locally installed fonts (e.g., :term:`STIX` fonts). See the :ref:`configuration options ` section (or the comments in the ``config/default.js`` file) for more information about the configuration options that you can include in the :meth:`MathJax.Hub.Config()` call. This configuration does **not** load any pre-defined configuration file. Note that you can combine in-line configuration with file-based configuration; simply include ``text/x-mathjax-config`` scripts as above, but also include ``config=filename`` when you load the ``MathJax.js`` file. For example, the `tex2jax` preprocessor does **not** enable the TeX single-dollar in-line math delimiters by default. You can load one of the pre-defined configuration files that includes the TeX preprocessor, and use an in-line configuration block to enable the single-dollar signs, as in this example: .. code-block:: html .. _plainjs-config: Using plain JavaScript ====================== Starting with MathJax version 2.3, it is possible to set ``window.MathJax`` to a configuration object in any JavaScript code before MathJax's startup. MathJax will then use that object for its initial configuration. For instance the previous example becomes: .. code-block:: html Similarly to scripts with the custom type ``text/x-mathjax-config``, you can enter arbitrary code to execute during the configuration phase. You just need to put that code in an ``AuthorInit`` function: .. code-block:: html Note that this initialization code runs before the ``MathJax.Hub.queue`` is set up, so if you want to queue additional actions during the `AuthorInit` function, use .. code-block:: html .. _delayStartupUntil: Configuring MathJax after it is loaded ====================================== Because MathJax begins its configuration process immediately after it is loaded (so that it can start loading files as quickly as it can), the configuration blocks for MathJax must come before ``MathJax.js`` is loaded, so they will be available to MathJax when it starts up. There are situations, however, when you might want to put off configuring MathJax until later in the page. One such situation is when you have a site that loads MathJax as part of a theme or template, but want to be able to modify the configuration on specific pages of the site. To accomplish this, you need to ask MathJax to delay its startup configuration until some later time. MathJax uses the ``delayStartupUntil`` parameter to control the timing of the startup sequence. By default, it is set to ``none``, meaning there is no delay and MathJax starts configuration right away. You can set ``delayStartupUntil=onload`` in order to prevent MathJax from continuing its startup process until the page's onLoad handler fires. This allows MathJax to find the ``text/x-mathjax-config`` blocks that occur anywhere on the page, not just the ones that appear above the `` in your theme's header file, and .. code-block:: html in its footer, so that MathJax will delay setting up until the footer is reached, but will not have to wait until images and other files are loaded. In this way, if you have ``text/x-mathjax-config`` script tags within the main body of the document, MathJax will read and process those before continuing its startup. In this way you can use a default configuration that can be modified on a page-by-page basis. Note that :meth:`MathJax.Hub.Configured()` is not called by MathJax; you must make that call somewhere within the page yourself after the configuration blocks are set up. If you do not execute this function, MathJax will not process any of the math on the page. .. _queryString: Additional query string options =============================== MathJax will check the query string for several other parameters (beyond the ``config`` and ``delayStartupUntil`` parameter). - ``locale=...`` (e.g., ``locale=fr``) determines the localization for the MathJax Menu. - ``noContrib``disables the ``[Contrib]`` prefix path for loading :ref:`third-party extensions ` from the (retired) MathJax CDN. - ``noDOMContentEvent`` (obsolete) provided a work around for using the ``DOMContentLoaded`` event to start MathJax's processing phase - ``NoMathPlayer`` (obsolete) prevents MathJax from trying to use MathPlayer even if MathPlayer is available. Details of the MathJax configuration process ============================================ Since there are a number of different ways to configure MathJax, it is important to know how they interact. The configuration actions are the following: 1. Execute ``AuthorInit()`` from in-line ``MathJax = {...}``. 2. Process any configuration file explicitly specified as a script parameter via `config=`. 3. Perform author configuration from in-line ``MathJax = {...}`` 4. Process the in-line script body (deprecated), if present. 5. If delayed startup is requested, wait for the indicated signal. 6. Process ``text/x-mathjax-config`` config blocks. 7. Process any config files queued in the configuration's `config` array by earlier config code. Note that ``text/x-mathjax-config`` script blocks must either precede the ``MathJax.js`` script element, or you must request a delayed startup. Otherwise, blocks that follow the ``MathJax.js`` script element may or may not be available when MathJax runs, and browser-dependent erratic behavior will result. Similarly, ``window.MathJax`` must be created before ``MathJax.js`` is loaded. If you set the ``MathJax`` variable afterward, you will disable MathJax entirely! mathjax-docs-2.7+20171212/font-support.rst0000644000000000000000000000706513213762601014750 0ustar .. _font-support: ******************** MathJax Font Support ******************** MathJax currently supports the following fonts: * MathJax TeX (default) * STIX General * Asana Math * Neo Euler * Gyre Pagella * Gyre Termes * Latin Modern MathJax contains customized webfont versions of these fonts. In particular, these customized versions are split over several files to minimize the page load. Since browsers do not provide APIs to access font metrics, MathJax has to ship with the necessary font data; this font data is generated during development and cannot be generated on the fly. In addition, most fonts do not cover the relevant characters for mathematical layout. Finally, some fonts (e.g. Cambria Math) store important glyphs outside the Unicode range, making them inaccessible to JavaScript. These are the main reasons why MathJax is unable to support arbitrary fonts at this time. Font configuration ================== Page authors can configure their font preference for each :ref:`output format ` separately, see :ref:`HTML-CSS output processor ` and :ref:`SVG output processor `. MathJax will download the necessary webfonts and fontdata dynamically and only those files necessary for the content. For the HTML-CSS output, MathJax will download webfonts in the appropriate webfont format (depending on the client browser); for the SVG output, MathJax will download path data that corresponds to the fonts. The :ref:`HTML-CSS output processor ` will prefer locally installed copies of the webfonts to minimize page load. Page authors can set a preference via the ``availableFonts`` and ``preferredFont`` options and they can configure the webfont via the ``webFont`` option. Please note that except for STIX General, the usual distributions of the supported fonts do not work for technical reasons. You can download the webfonts from the `MathJax repository `_. The :ref:`SVG output processor ` will not use fonts directly but derived SVG path data to draw paths corresponding to characters. The page author can configure the font via the ``font`` option. There is currently no method for switching fonts after MathJax has loaded. Similarly, page users cannot change the font configuration at this time except by installing their preferred fonts locally. Character fallbacks =================== No font contains a suitable glyph for every character specified in the Unicode standard. When MathJax encounters a character the configured font does not support, it will fall back to other fonts in a variety of ways. First, MathJax enhances Unicode coverage of its default TeX fonts, e.g., combining two double integrals ``U+222C`` when a quadrupel integral ``U+2A0C`` is used. However, this cannot create every character specified in Unicode. Next, MathJax will run through a fallback chain within the configured fonts (e.g., upright Greek will be substituted with italic Greek). Finally, MathJax will ask the browser to provide the glyph from a system font. Since in that final case, MathJax will not have the necessary data on the glyph's bounding box, MathJax will guess these metrics; this can negatively affect layout. Adding new fonts ================ As mentioned, MathJax needs pre-generated font data to support a fonts. This font data can be generated using the `MathJax development tools `_. Font mixing =========== Mixing multiple fonts is currently not supported. We hope to add support in the future. mathjax-docs-2.7+20171212/images/0000755000000000000000000000000013213762601012773 5ustar mathjax-docs-2.7+20171212/images/mt_head.png0000644000000000000000000001707513213762601015114 0ustar PNG  IHDR ~>PLTEz+++++++Tz+zߝT+zߜU++ܝU+++yy+UUzz++zz++UTT¾ې:ff:ې:ffffې::ff:::::ېffېfCNؽېf:m"""u"Cum˱ٿ::NmC"m޹:Ҫ:ȶҹf::fNummffuƔ"CumNٔ::fuCNmNCٹ:ުf::Cf::fu:f̪fuCuٹʰffٻNm̹̭fNC"mf:fՐҹǽ씻̭ٞNm̭ʰ:wfwf鐹wՐʰՐf:w:fՐ:ȧfw:Ȑwf˿ؽiyIDATxAO1D "l489^^Z B!B!B!Bqw_<<S)-<.o˾}a¼Xx;#y}+7Ό'#2{T5}\t7.ys8p8H>;y* 1Hx3Tc+b*t t'$ڷ>L۰Ѯ!2(H$0wA"䬍 Br2_h9TcPFzں blaw#)aXBv`,֨EJuDodkؾ6a}fV6eFZmdLD 5RY#]A=!FJ#9aKc#uϑI6A=!FʠvóշvgmY5md$B9 ,uH y72r>WFA!g@SF~"OrzL6˘JߵllLtovu# XiLarC_Mm6soH2%E܊EHx-[(Hȷj@H D>Zo*e]tRj֛=G7 kS$/]hj H_p669wN;E?۴R[SRkI PSQQgʪsONٯ5[yFRdj<^p|ȇAvpߍ#Ƒ9E~vm}"c˼"kW *Iqa;b&FZ_ XFqtFN{!qAZ<n]݆?}J&0*R?nTFBPebzWTS_W ># K ο.^hpY#3Y\T~-abeW[3QYdtX?} C3^yvՔuyq<) _J&%v(rW}6#Ͽ7԰9`k?3| $$J@|^*AG\jցNn\~=|㫛xuNeDL k'3~JهtϲveYP[W8 \rRr%o 4n` u:=8ٗءdNpz?ald2 Bq*#Kd<Kkсpo|F:LjcEG?t|1RGdZfPVPde䏂ɕg%nd0RV>sf=ݓ[Fzv2Y$;r=UezC%)iA xB`]|;c3ECF\iraU|?|F>>Ajf- &72R,d(6C5X}u2o#WL=,#$oTL8YE3طAM`\IWwG~"fIż>Yr#a,ù\:|oŒ g affd~|k4v{:Sj,Smީr,]q[^6'ntc^6̫Q:gk;:N[':{Y=wgV!"WԾ^>N0/iwSsZҪsGr~Y\nqg WϸsS9%E?v:=ʍO4npe<(rce(ك:]$xÊ{{#'Z6Ikp jʽs[#9$q T0G|R$}ƏOSn#5)uק_z)7gZ"?= &B8B5s5r3d3 eqӑ.b\ߠ¤tѾRH()#1)C̟}oapE^Nj#僊"QLޱ̔3 WׯQdvڧ;XU$VU'i6%D=*?[R$ڞH)QOH8ؠ&ݹFpup{_ b=U ^S>ԘG6+]q<U$loNѐ !op2~п3I.sCXc|+jHw~_,P+=:Yq-oސǻg-3Y~B1,VBaaȰPdXX(2,ĎUD٧h9F8#^ OxD&qb cu]׷ӶxY|dEFԔ 'O.nD Y-z}q ׭l\Vr2򑇍|Uĩ"qôfYsp}psd=!lv=U^ETIJŋ,q:ɸk1Pz#kڦ{YsOڅMs+:s^f"_LҪ ~`+2zj;"2'Ebtc&9ׇo 3h)gq,?^EO8DuHNj=Ur=\MrDW2>56?0M*b\G}פF|' H{RVON"#g)rc: i}Z>Zp})8@97ɖ`z?(tE/rt4+^$yE_FlBDA, ?HL_9=Ir\$bjlgU$y#(K}+;Lϑl[IPd/ (k\xgq"~&Gj\2>5(I+W8j}O ʑ穲v\4O|5GV!$L XW$\ )~RϹI\?WErEE*.ϊ-'S;2Rs:.ިTs^rE|*֯+3˺"?G&ӧ-}a~Q[l;?tk'H@wypH?߲(RP$ ψOظF7Wi8^E^}ͥ(rP>.=/0߲(Re(vQ>[v\'hJRqL֔sx>.=HNǢ߲(2 EҮX"kq5aǕl8~Eb!H˻<<"t.YAJPi+nW$w+~#98iyUQ$vg>1*~x\ɶ8W$wyXQ/0R歏\ıu ;fp_8|#^sǕ8 GaȰPdX(2,, E$?5 8t^8 y%2>%\gG7u\k"YBē`VGl =\ci͑|%\gn.&E.{D8I3Ro8t|!.q/|yռָH#LӪ?S/1k^Y9;<-nֶHxH?zy|l[b[?y);TOe[urǥ#۹ֹ#vGC2"loQ@Oudk$/SQ=f\o }c<ܹT~>#,q =4`sExo7*#[Ŗ֏z^kv1O-hwA%\'x^s癟Jp oqb (F;6,6"BaȰPdX(2à!Y1k٪kZ4)yɁ8GCXovf#-Τǎ-(o763KF#?^/X'gq*6<&~%qCg&I~d&í{j"$yɳ+:7xr\t W+e:YSIjx>rO?4Z{c/%< npuS>v>%orry񑽼pbT~c8=8@ q*S w-/7~Li\1d|rbFYOCDӫO:I~dԒFEE? RD*֬p gtD9n6zjy5Vkp8E8/o7A7Ȫ~)I~"ˌ"{yE)gBO.c8"޺"Sma^nFgRV\$njC9y_n.4"v$?2y]e&r/# H49Ѥq 芄J>kƕ)Okh3Ndyyyh\U$~H#7YNm>A^f,w?:D?Z烃]3gr (5nj1^x2_įD7E7yqve\@\˥(bW9@Q!:_Hc: 0 ~d.@&Ɲ0#ѽfaie{~^Ě6j=xYw?DFIS^7#gۑo3ҩRF?JM.DFY,o] 0./CI\huf葑F\%xnxi Sk `.[ ޗ"9H#q F:ժ:i@FTqV.Y#;#H#kRKbom1b$XG'#~et&4\eds! l 0Hyɦ)X2yF}U *˧U׮/$FDӦlm)a4mꔮzm$)1MK9{״H6mI\0Ls.D0Dh$> QWADSzs)K:NI%>4;Q3x#ٖf նD&XT;큺ajbƇ]<?^mX_t#EGHё"G<Ʒ8~ovBd @e^﯄eUs-" Q٢{yG tm쇾 oƁhy byxWV"& Gw֧O֑wېi~$o8Dz+~ϗCq%]n"'Ȉ G\X;f0 G]x8ٖI;~敎d|rՇ"蒭B nQcN=GH##\GmQqK4AD7nܶYWW$#O##\G<ƹ{2_o˕J}?‘NAwJ~Gjgr+8Hm 4?Ҝr莭( $sD67m;rLs (hm;w`x )SO!BfxQ]&$JX0*,>mܙ!1 Ԥ+ gٿ{Hf"O'UqT5L Ay03d;BBrqrz0fHo/:eqt߿_+F|խm24d*Op&bXlҎ`8ɽ!'"ǿ{)-,o]T*\8igwp[~NHo/VLڤ>Xg*,J|?9q5HS."o1Nǿ}[xP#25𨲧Jy$0&ǖu]U*c-k=c%h/\@6`,G;LsX#ADb J=R j+FC ~75 ΐ?"PxpF03_yl ./䡡wESήWV[f_95ȡS+m>[lo 2^[\r$1W5EhX $C*$0LpxOcZ<1עH?A_Y93j叺m>$*=Ս<7/=ČGe@Q'Y6UJϞ]$[BQ+gL^Pt^-UDK3٢gFJ`P J(Bçx`F;7Dwrg`m'bu7֪b{ߘuhξ:=+}ȳ{?n}f/ vFgyvwڿKKsn@$e9xY1G>l'"+Ԇ-_n޺7hKup``aJ*=qᝌ۫f]'ZعJ*N9I\V@L(fΣE`"ONn-V~_V_Z_lXXAT#н31Ýhv6N["7X-?إRdfY}!94NV8u+>=4] G!2kԯY< GZ̨fVÄv2p oHl/qSĬOYn3kFqHF;`9O=̡ǁc~. }u)⧈"~=6Ŀ+A g?K5k}/9 ?qYAB^V>b;~:N)ޱR"\x:8)cΡvD"k8")%~k$2meC, DXLS[Y?νi};`+~е{nIvď0<_za57(W'Np6!~SlS1 u£ ٹ̈8!vCWj!{j|:'C?rS 7~o 76 u^wGI9lxL{%yr;y'IlZs^]pl}wޣs^~hogy' kgurރ;S6'4~o 7s~oZ==ğ|߯wlZIE.O[]o `:;ƿu?ߏ~~t~o w|_g_j1_4OmKIqȐ+oYf8 z>$ۈq?G&7C y>5s=K{щ}+˳_Nf;{-2R/|?Hc m6 >x<@]$# z<2K!gI-cX?'{`G.Y&UV:=.+Ea_x{8Fo ~<DH JP) Q0UR *C/M`OI>k,;=iux89|X+ar'a}ˆ$"?/DX,8GͲN@(XP;IO4F0tY&iDJڶ/狹Ytsj:s0.][\韝~I=͝ÇʎmU,9毛Yۂt:_o4͆yp3Pҧ1d2Vzz߽x9g7,rĘe_* Xyi${g(aȱgZ$ܦJR g/"*H3"`}ՃFhgJZ:MobmXGS5WȒ)LWdC\K36/Mf@-t3_1]_C;SKxA:\V̋1ʮaS4ZjTqSn\Y] ay>% E-Ptc7]KfNUu+lkAlYny8bx{cw65K6CKs%ofbu[}Y\ҕjɆ*J7p7^T3mԒBNbRڀR;N'6D+{Є͵tUGbpۨ%xV:G2/ѹ -`,-9>TX].XU\ztu S.V .(pZZ]e%}͸(K<Z dɷMa=ľ\Ȇфems<9.+Ke t'ß&6CK~%"}Է?8-M"M-Pє/4d%.?4ASB[!_+xg@0%%)K\sp\m7sqj5!=rX\XȆJ0ܓo͵Zr$n%77ג7ٳ ZgU Ae 6~O ߄a֬g1$3EWlwSFݘWznTW_סٷM=^vnsHm,^zeRx)-43ԜۺZ xM6{8 X\xYh5e[ &,}ӊn!29Ť!ba0h'1{4T6dxA .?pTK-*S'dbAL2f1bh$l/Y4{IIWLj.[#hAjE-h06h|(D)w*ZAaؿ%[V3-QB<(>.b%‡l@ ~H˫0Vy٣DI#yS6M /@ uO$ wn 0<.KK..K.KK˾y-'Daĝc vsn^֖˦9&9眅!!arc XG.|o?M +3 SctyEkt2G&X"n?yeyɋ/*Yb f,}ڣ'O=AFŇ1AbĘzXeK^߈. C^H~*Yb ,U/@?ҫғ)lgdd\5`d:d鲲6Y:>)6?~fXXqtDϙ XZ$ڸ>4ҶvTmRj]o9Udlʇ9#g񱬄}XQrcKCHq}xa!J%7Ӓ8NHfPJ|Z}J_.x=?Eڋ*.a0c!']h*Y/-Y*gՁFKr$Gt. Sآ T݋8\aR,eI|r2(zn ?q g,Q}6OX::(}wݖ߅h.;{gD)]I.OɃ4e$ROSL6(@L \zU8{;1g)\!Բt0qQTq#Qȟ] lL.YUL'2 gݼ")KRG\. ,JxKѝeI^hbS6ۈ%K*Imfӟ@6>i@f)u׆K=^QT`~WK'⩺hf g0CL,l HS%,e.st"s*c˽IR6h<Jegnw9vnei;~w:݋Ҁ4fI" 0߃%8W x%8b骁tG,f)'9- U~Z%o*!?ʆqYAͮ$)b&c=RȬGNg?IolOA?g0q:*{AJj`iaS%h7{t, [?iHbUMlPdN|&$Q8'S MX2K%PH3@O+fa26KЂ2YzX,{:벲dV`ҲpW?'H;Ҹrd~*Y Ee7y@yGZ4wdA6ر]:/^k~GwԽJf;w0qI!@ITR E mm~ INn|v@K%h h h ZzZ*"=7yй,\uY1 ![KBoy3-),LKbO;-[2Ӓ̴4J6[2ҽim[2x:{1ywA>/ )(%03AōMZ{C*wdhKKۛ;?$d[{y費|^p3nFD$Oܽo5Yw<=.o GӳXz6d۠w:Ӿ%i3-x7!A\{ݓ0'T 8hu9EcȈX&N0]hΆ~+LFUZ\4/`iau N<`(TUjz;ޑ%#eSyf2c HΪwF&CLyh,ڑ%Tw2@z0d9Z@u\`4~cxKZF[oj薷lI m`Ն5KvVV.X:8:!  J$RaLe5XXE|@NpRW`wm0X dK\?KWOOv dN!U^td92 -2H@6v6wu;ʶ5j>ycA$cqZ9V!-1٘UZY4=YjNXBr{eT`g932CϬ0SQ12?:I%+9f柋*1J+`),Ŝr_Hg, ?e8'8!$-4o3`^|J4m얾4m4m얞4m4m얮p6}a<)|UB>D%PȢ%R ˛ϐ~:3{L;=ܜs˹wvrZZW1WceX0%eX%a cXx@S%a)'މ%a)'v2bO$n3: -z2h\gcK% Kq=|tZĕW?]řT]-j4KA=2yڸ0+[)Zbw`iU)><x󘝺vnj-\2vl?Ka=[)ekĒ(oz,[%\# X ꉗK~Œ6*f W3y!%W3󤪳q)O7Uc8yco13ޙ1%a cXư1,a,!$I,!KIXB,u-!B b!X kRo/Kj~zFrSM3޷RaRPOC=n`i6&K:5+,z|v!G,%zKtsoƨX jK.HքY_voGO<*4`K'f:M_g RxGRX?;/)hgs.KA* R[*%LtLhŽ;x!%4W3󧋫~֝hԞ?*x)/f|@K!XB:K!XB%`1 cX0%X0%aoa KOb06Av2/v:ܿy,mHWoqZ'>Gϒ͟]Zd?,#[`)0,3X/fFNW5ڛkK"V֬]nTh Fb zM1 cX k+?.ZUQyyl6qX8ۆSꎊ^5]ҠY kOS?Sa@3@],7c)KÏ,ŵKN5sXR^ S, 6~$`I+wQ؇K//_*v2ߛUzTxvKrH?+Ò݅=7]IU0a{ c1,a KcXNga cX0ej#`IB%` !KBP,X[B`),X%Y?|<W7o/`i}sVC=T%4\,yf$>=&Z3bn͵ 'bv#\c0,j!Xk+?._%F1غ  6PwTqEӆ)6 VQ`Ps=KP`)_%wZ%-۴ĒxZ7 RP?wG^ʠc Kam,i$$ok6ϝ6^ЩLݱmq4w>ro (KFAO ҅0Y k/·oNnoNa;1sx(, 4Yՠڽ|YrKS6,iN:|@%-LpXkfOL.(uv5eh1r{K6OúrKXXK/{TR0^y`r#Ǽ'6,a K0%a cXk#`IB%` !KBP,X[B`),X,_uw GϚ׿6vԟ`/RԠznq`KI?Ke(U_Mc^_*F } RX$,6?Zcsz} 7ĕ+!X jgE1K$ԜxrnwS0ו`Ye KŽ%P1f!X j󟐥cj:dIIjy Kam$/食?pB07@KʳC풏|y}زPx񞸒P|B%` !XB` !XB%`1 cX0ư1,a K1,=E%%YN.n[3,sYLdzѳnh,aX kg_&}^,ŵ_WʲYը ձ]+/Ob Kqm^Id /.&@nUŕs cXk/Mا@ԭjmkBKqmQj gITf%#Kqm|4݅?v9O^xpܫhkkϣ}/w'"VgX,a{.^TCbfP-!/aØĝ@ކ+ KcX0cX0%aw.%` !]'IENDB`mathjax-docs-2.7+20171212/images/wp_menu.png0000644000000000000000000000666613213762601015171 0ustar PNG  IHDRDۗ }IDATx욃%/z`m#cm۶mۺk֗te|tΜ>[nuE+v_xALP"&"jEp9 o̩S6nܨBٵv͚51cNkE1cΟ?7J1B]Â|]Į v+]!vWZҭ!;}QfffBBD=zt;xILL)g9[.AdoG],((Sn0 v[ .A`#Yﲃŗݞ^bRboPS(2.A5v9PCe"#(Ap FѠz;7"] 8-C 3: Ϟ=F,(pg]3[BrfV>bbA%\/=|Ru˟r5TÔݵkצMCZ&W^Zjm۶ZfM<!߲eˬ,l޼T֭۠Aq끨!]Ė#fB/8}>4Cz-]nڥxrmzo2ygȑiii<; wwѹsgCׯ ${ي+ɓ'*Ϗ+W&L@Lmy^1j bVL/8[{̐M[Ûi*3}gÇի\2W,+;pȴK ԛİq`d߼y<1:vl3:u&DF\vyF@Jc1DÜXcԷ@~GwX۵tl7 zIGOvzC& ;et$ĉ+VئM/N:Ւc Lǎ#(>>jժyXry$Y9q^YPLͥKg >Y=zoPv|`4zsΆ7L ԛC)3PXMδhtR29sԩH/QRc=8_߿F eRl/g)^x{١KF )aВ/()pY__yioPNڵؤIK\nΙl{| rׯse Wb2K В/(p De7!vㅨnݸ`8ۍ g1BTPvclW.A@~b 40, }P}74fw@ (&jTZ PHT٣{ו!N 2'4빹iA얤;ܠ]BKKhwyqTvڅENWڽ:izAUx_ߒzdT+0NhmcيY/+mKcI!mڵ+QWh/U#-۶,T3Eivu΅+Bz^iڵd!\ڳ XS.]Bv .]Bv ڥ]ڥ#.Qꟲþ ؆ǺKbL'i CjrDcN`لa$tr̘ΦŨEzBuL @~?3% 5Q?}XXf ]v}C*WiV+Z.qlw9yCNu=Ivk,JEc;"aN30OT 8|p,<,ߎepծhvE]ՊWjW+ڕvDEַn8vsY`v $Ϫ]-GN" ݽ;FXBr$G9jݻ]R8ʥTH`kϒ#ɖ[ {JLwɡeϻݧw|fY{\Hat"?Awv C6 y(9|wk9qlݻ݌w>KFNn޾vE]Ѯv]ѮhW+jW_qϩ]Vu4]Ҭԧ!l|]8c})azcc+RarsF^Vs^ԋ_qX˄WmY{Ŏ}pefBbGZq*'`^<݋,vO"bӃ{̽bGUb]jW+vE]iEtfWP#}v8>흁rQyP@HpkDШ*&/H eAL=vfԎB!z 85~,hqy)]FpvuJ%bhac\c/^lT=nB õhs"@bhʭz}Jr`0@q%Q@ D{{@w,~n,d2  J"`KOatt:E#2}E"<)&+L)~|=y]nd=!!;憔n*V X":ɠX.ʣ:&ݛ5[l|v *]|>KvY\[X[ZHBܕH\Nn: -w)°]r##>c g/`LRoᖡNgo$c>Z^E0+|#H>oz]Gb2]'TABl/Q*lfń$3dq onUszMJhͯȭcǸGQp:n4f뺽^o8N&tjlЌ#yBt V=_gy=qJ骔J*^nM-IENDB`mathjax-docs-2.7+20171212/images/wp_templates.png0000644000000000000000000000471613213762601016215 0ustar PNG  IHDR IDATx@ENsܥ2GI,a}>zD{`.7sy|<xJÃhj;c+WCZ ?%4݇@P R]c=. yxБfW%jTiBL<0GVNƢ!m~аJ T`V{i=Kn:w!m ,BxVAHt/Cv+|Bt],rtDþ~*O!P_=Kn_C:?{ 7mƬv-V1ayչm脱)c6ba~z#b~0 歁Wh!OGg <5e\¦G <෽3c gsX .pA"V 1!@`"I6D"7J~+շo:2Mul?qh}>{Z!ǩ(>gOqGqǮY 6镳l(q`ڬ]hz6Ќi${r@~|rXx]r8Qr8}БDW0fqa Xa/ɛ `~PtvʂTmjq 1fL3`D888oϏ/'\sUjL?JV83MQW_IIn@+Lv 8A)֣A?мheG>]Up@|WR( ^1}Uj~!#s}iF$WAb _YUcTH+ >Qh;*\9>xyw} UzZ?>ԪFU}s i88nā6q7>nd+Kv>kŝg?āǕs@ӗmrɍw7vWznrr.h<`˳N&/I&;?Nz{Np]lT؞eCXz-1=y=sdL$],sdpu;8+Ek{Gn_w.!-c? i9d;W'imC4FFs|S_x@z08(I$_%)9zԋ.bF̮Z:/>3?IɈ|~{q@Xͦ/Kyj({??h/#'snvfr*'" >y^{eV7:=c8'C8ߺwA$V88885uYrW PSdA˿>7  9蜼v9++2å`8wp&6a%hJX#?~vCq6TXvi|U\l;jJ/V,P0 (BV%_7|ur;Z[DdKO|4 ̕e`gC>*B-129[1/_r68wۇٮPdcoxjۃO|4(wx\?iLc̫ lVҁ K66s^ ~1q--hUEW%+r Mq āDHāDHs@L8Ƚ$A7}&Sr p}B !G€>(p|u&85\$<zPOsϢvE`wB>xV+Ń$B[Lrje$>L_g;@"$@"$@"xn[IENDB`mathjax-docs-2.7+20171212/index.rst0000644000000000000000000000473413213762601013377 0ustar ##################### MathJax Documentation ##################### MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. .. toctree:: :caption: Basic Usage :maxdepth: 1 What is MathJax? Getting Started with MathJax Installing and Testing MathJax Loading and Configuring MathJax Combined MathJax Configurations .. toctree:: :maxdepth: 1 MathJax TeX and LaTeX Support MathJax MathML Support MathJax AsciiMath Support MathJax Output Formats MathJax Font Support .. toctree:: :maxdepth: 1 MathJax Localization MathJax Safe-mode .. toctree:: :maxdepth: 1 The MathJax Community .. toctree:: :caption: Configuration options :maxdepth: 1 Configuration options .. toctree:: :caption: Advanced topics :name: advanced-topics :maxdepth: 1 The MathJax Processing Model The MathJax Startup Sequence Synchronizing Your Code with MathJax Loading MathJax Dynamically Modifying Math on the Page Obtaining the MathML for an Expression Writing MathJax Extensions Debugging Tips MathJax on NodeJS .. toctree:: :caption: The MathJax API :maxdepth: 1 Details of the MathJax API .. toctree:: :caption: Miscellanea :maxdepth: 1 Accessibility features Browser Compatibility EPUB3 Reading Systems MathJax Badges and Logo Articles and Presentations Using MathJax in Web Platforms MathJax FAQ MathJax in Use .. toctree:: :caption: Upgrading MathJax :maxdepth: 2 Upgrading MathJax .. toctree:: :caption: Reference Pages :maxdepth: 1 HTML snippets CSS style objects Localization strings Glossary * :ref:`Search ` -------- This version of the documentation was built |today|. mathjax-docs-2.7+20171212/installation.rst0000644000000000000000000003720413213762601014767 0ustar .. _installation: ****************************** Installing and Testing MathJax ****************************** The easiest way to use MathJax is to link directly to the MathJax distributed network service (see :ref:`Using the MathJax CDN `). In that case, there is no need to install MathJax yourself, and you can begin using MathJax right away; skip this document on installation and go directly to :ref:`Configuring MathJax `. MathJax can be loaded from a public web server or privately from your hard drive or other local media. To use MathJax in either way, you will need to obtain a copy of MathJax. There are three ways to do this: via ``git``, ``svn``, or via a pre-packaged archive. We recommend ``git`` or ``svn``, as it is easier to keep your installation up to date with these tools. .. _getting-mathjax-zip: Obtaining MathJax via an archive ================================ Release versions of MathJax are available in archive files from the `MathJax GitHub page `_ (via the "zip" button, or the "downloads" tab), where you can download the archive that you need. **Current Version**: `MathJax-2.7 `_ (33.0MB) Consult the :ref:`change log ` for what’s new in version 2.7. For previous versions, see the `release page on GitHub `_ or for quick access - `MathJax-2.6 `_ (34.3MB) - `MathJax-2.5 `_ (33.0MB) - `MathJax-2.4 `_ (32.6MB) - `MathJax-2.3 `_ (32.9MB) - `MathJax-2.2 `_ (17.0MB) - `MathJax-2.1 `_ (17.1MB) - `MathJax-2.0 `_ (17.6MB) - `MathJax-1.1a `_ (15.4MB) - `MathJax-1.1 `_ (16.4MB) - ``MathJax v1.0.1a`` - To install MathJax v1.0.1a, you must download two files: `MathJax-v1.0.1a.zip `__ and `MathJax-Font-Update.zip `__. First install the `MathJax-v1.01a.zip` distribution. Then replace the ``MathJax/fonts/HTML-CSS/TeX/otf`` directory in the resulting MathJax installation with the `otf` directory contained in the ``MathJax-Font-Update.zip`` archive. You should download the archive of the branch corresponding to the version you need then simply unzip it. Once the MathJax directory is unpacked, you should move it to the desired location on your server (or your hard disk, if you are using it locally rather then through a web server). One natural location is to put it at the top level of your web server's hierarchy. That would let you refer to the main MathJax file as ``/MathJax/MathJax.js`` from within any page on your server. From the `MathJax GitHub download link `_, you can also select the ``Download .tar.gz`` or ``Download .zip`` buttons to get a copy of the current development version of MathJax that contains all the latest changes and bug-fixes. If a packaged release receives any important updates, then those updates will be part of the `branch` for that version. The link to the ``.zip`` file in the download list will be the original release version, not the patched version. To obtain the patched version, use the `Branches` drop down menu (at the far left of the menus within the page) to select the release branch that you want (for example ``v2.1-latest``), and then use the "zip" button just above it to get the latest patched version of that release. .. _getting-mathjax-git: Obtaining MathJax via Git ========================= The easiest way to get MathJax and keep it up to date is to use the `Git `_ version control system to access our `GitHub repository `_. Use the command .. code-block:: sh git clone https://github.com/mathjax/MathJax.git MathJax to obtain and set up a copy of MathJax. (Note that there is no longer a ``fonts.zip`` file, as there was in v1.0, and that the ``fonts`` directory is now part of the repository itself.) Whenever you want to update MathJax, you can now use .. code-block:: sh cd MathJax git remote show origin to check if there are updates to MathJax (this will print several lines of data, but the last line should tell you if your copy is up to date or out of date). If MathJax needs updating, use .. code-block:: sh cd MathJax git pull origin to update your copy of MathJax to the current release version. If you keep MathJax updated in this way, you will be sure that you have the latest bug fixes and new features as they become available. This gets you the current development copy of MathJax, which is the version that contains all the latest changes to MathJax. Although we try to make sure this version is a stable and usable version of MathJax, it is under active development, and at times it may be less stable than the "release" version. If you prefer to use the most stable version (that may not include all the latest patches and features), you will want to get one of the tagged releases. Use .. code-block:: sh cd MathJax git tag -l to see all tagged versions, and use .. code-block:: sh cd MathJax git checkout to checkout the indicated version of MathJax, where ```` is the name of the tagged version you want to use. When you want to upgrade to a new release, you will need to repeat this for the latest release tag. Each of the main releases also has a branch in which critical updates are applied (we try hard not to patch the stable releases, but sometimes there is a crucial change that needs to be made). If you want to use the patched version of a release, then check out the branch rather than the tag. Use .. code-block:: sh cd MathJax git branch to get a list of the available branches. There are separate branches for the main releases, but with ``-latest`` appended. These contain all the patches for that particular release. You can check out one of the branches just as you would a tagged copy. For example, the branch for the ``v2.1`` tagged release is ``v2.1-latest``. To get this release, use .. code-block:: sh cd MathJax git checkout v2.1-latest and to update it when changes occur, use .. code-block:: sh cd MathJax git pull origin v2.1-latest .. _getting-mathjax-svn: Obtaining MathJax via SVN ========================= If you are more comfortable with the `subversion `_ source control system, you may want to use GitHub's ``svn`` service to obtain MathJax. If you want to get the latest revision using ``svn``, use the command .. code-block:: sh svn checkout http://github.com/mathjax/MathJax/trunk MathJax to obtain and set up a copy of MathJax. (Note that there is no longer a ``fonts.zip`` file as of v1.1, and that the ``fonts`` directory is now part of the repository itself.) Whenever you want to update MathJax, you can now use .. code-block:: sh cd MathJax svn status -u to check if there are updates to MathJax. If MathJax needs updating, use .. code-block:: sh cd MathJax svn update to update your copy of MathJax to the current release version. If you keep MathJax updated in this way, you will be sure that you have the latest bug fixes and new features as they become available. This gets you the current development copy of MathJax, which is the version that contains all the latest changes to MathJax. Although we try to make sure this version is a stable and usable version of MathJax, it is under active development, and at times it may be less stable than the "release" version. If you prefer to use one of the tagged releases instead, then use .. code-block:: sh svn checkout https://github.com/mathjax/MathJax/branches/[name] MathJax where ``[name]`` is replaced by the name of the branch you want to check out; e.g., ``2.1-latest``. The branch names can be found on the `GitHub MathJax page `_ under the `branches `_ tab. Obtaining MathJax via npm ========================= Starting with version 2.6, it is possible to use `npm `_ to install MathJax. Assuming ``npm`` is installed on your system, just execute the following command: .. code-block:: sh npm install mathjax .. note:: The distribution on ``npm`` does not contain the PNG fonts Obtaining MathJax via Composer ============================== Starting with version 2.5, it is possible to use `Composer `_ to install MathJax. See the `Composer documentation `_ to get started. Obtaining MathJax via Bower =========================== Starting with version 2.3, it is possible to use `Bower `_ to install MathJax. Assuming Bower is installed on your system, just execute the following command: .. code-block:: sh bower install MathJax For a slim copy without PNG fonts use .. code-block:: sh bower install components/MathJax Testing your installation ========================= Use the HTML files in the ``test`` directory to see if your installation is working properly:: test/ index.html # Tests default configuration index-images.html # Tests image-font fallback display sample.html # Sample page with lots of pretty equations examples.html # Page with links to all sample pages Open these files in your browser to see that they appear to be working properly. If you have installed MathJax on a server, use the web address for those files rather than opening them locally. When you view the ``index.html`` file, you should see (after a few moments) a message that MathJax appears to be working. If not, you should check that the files have been transferred to the server completely, and that the permissions allow the server to access the files and folders that are part of the MathJax directory (be sure to verify the MathJax folder's permissions as well). Checking the server logs may help locate problems with the installation. .. _cross-domain-linking: Notes about shared installations ================================ Typically, you want to have MathJax installed on the same server as your web pages that use MathJax. There are times, however, when that may be impractical, or when you want to use a MathJax installation at a different site. For example, a departmental server at ``www.math.yourcollege.edu`` might like to use a college-wide installation at ``www.yourcollege.edu`` rather than installing a separate copy on the departmental machine. MathJax can certainly be loaded from another server, but there is one important caveat --- Firefox's and IE9's same-origin security policy for cross-domain scripting. Firefox's interpretation of the same-origin policy is more strict than most other browsers, and it affects how fonts are loaded with the `@font-face` CSS directive. MathJax uses this directive to load web-based math fonts into a page when the user doesn't have them installed locally on their own computer. Firefox's security policy, however, only allows this when the fonts come from the same server as the web page itself, so if you load MathJax (and hence its web fonts) from a different server, Firefox won't be able to access those web fonts. In this case, MathJax will pause while waiting for the font to download (which will never happen); it will time out after about 5 seconds and switch to image fonts as a fallback. Similarly, IE9 has a similar same-origin policy in its `IE9 standards mode`, so it exhibits this same behavior. There is a solution to this, however, if you manage the server where MathJax is installed, and if that server is running the `Apache web server `_. In the remote server's ``MathJax/fonts/`` folder, create a file called ``.htaccess`` that contains the following lines: :: Header set Access-Control-Allow-Origin "*" and make sure the permissions allow the server to read this file. (The file's name starts with a period, which causes it to be an "invisible" file on unix-based operating systems. Some systems, particularly those with graphical user interfaces, may not allow you to create such files, so you might need to use the command-line interface to accomplish this.) This file should make it possible for pages at other sites to load MathJax from this server in such a way that Firefox and IE9 will be able to download the web-based fonts. If you want to restrict the sites that can access the web fonts, change the ``Access-Control-Allow-Origin`` line to something like:: Header set Access-Control-Allow-Origin "http://www.math.yourcollege.edu" so that only pages at ``www.math.yourcollege.edu`` will be able to download the fonts from this site. See the open font library discussion of `web-font linking `_ for more details. .. _ff-local-fonts: Firefox and local fonts ======================= Firefox's same-origin security policy affects its ability to load web-based fonts, as described above. This has implications not only to cross-domain loading of MathJax, but also to using MathJax locally from your hard disk. Firefox's interpretation of the same-origin policy for local files is that the "same domain" for a page is the directory where that page exists, or any of its subdirectories. So if you use MathJax in a page with a ``file://`` URL, and if MathJax is loaded from a directory other than the one containing the original page, then MathJax will not be able to access the web-based fonts in Firefox. In that case, MathJax will fall back on image fonts to display the mathematics. In order for Firefox to be able to load the fonts properly for a local file, your MathJax installation must be in a subdirectory of the one containing the page that uses MathJax. This is an unfortunate restriction, but it is a limitiation imposed by Firefox's security model that MathJax can not circumvent. Currently, this is not a problem for other browsers. One solution to this problem is to install the MathJax fonts locally, so that Firefox will not have to use web-based fonts in the first place. To do that, either install the `STIX fonts `_, or copy the fonts from ``MathJax/fonts/HTML-CSS/TeX/otf`` into your systems fonts directory and restart your browser. .. _ie9-local-fonts-solution: IE9 and remote fonts ==================== IE9's same-origin policy affects its ability to load web-based fonts, as described above. This has implications not ony to cross-domain loading of MathJax, but also to the case where you view a local page (with a ``file://`` URL) that accesses MathJax from a remote site such as the MathJax CDN service. In this case, IE9 does **not** honor the ``Access-Control-Allow-Origin`` setting of the remote server (as it would if the web page came from an ``http://`` URL), and so it **never** allows the font to be accessed. One solution to this problem is to install the MathJax fonts locally so that MathJax doesn't have to use web-based fonts in the first place. Your best bet is to install the `STIX fonts`_ on your system (see the `MathJax fonts help page `_ for details). mathjax-docs-2.7+20171212/localization.rst0000644000000000000000000000405613213762601014755 0ustar .. _localization: ******************** MathJax Localization ******************** As of version 2.2, MathJax's user interface (including its contextual menu, its help and about dialog boxes, and its warning messages) can all be localized to appear in languages other than English. For the available language options, see the `TranslateWiki.net interface `_. The language used by MathJax can be selected using the MathJax contextual menu. It includes a `Language` submenu that lists the available languages; selecting one will change the MathJax user interface to use that language. .. The list includes those languages that are provided by MathJax, but third party developers may produce translations that have not yet been incorporated into an official MathJax release. If you know the location of such a translation, you can use the `Load from URL...` item at the bottom of the language menu to provide a URL for the data file for that language (this will be supplied by the third party). Page authors can select a default language for MathJax so that, for example, a page that is written in French will have MathJax's user interface also in French. To do this, add ``&locale=XX`` after the configuration file in the `` will load MathJax using the French language. Users can still override this setting using the `Language` submenu of the MathJax contextual menu. This submenu can be disabled, however, using the :ref:`MathMenu configuration options `. If you want to help in the translation process, please visit the `TranslateWiki.net interface `_. The page `localization.html `_ is a convenient way to check the different translations. mathjax-docs-2.7+20171212/mathjax.rst0000644000000000000000000000377713213762601013732 0ustar **************** What is MathJax? **************** MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. It was designed with the goal of consolidating the recent advances in web technologies into a single, definitive, math-on-the-web platform supporting the major browsers and operating systems, including those on mobile devices. It requires no setup on the part of the user (no plugins to download or software to install), so the page author can write web documents that include mathematics and be confident that users will be able to view it naturally and easily. One simply includes MathJax and some mathematics in a web page, and MathJax does the rest. MathJax uses web-based fonts (in those browsers that support it) to produce high-quality typesetting that scales and prints at full resolution (unlike mathematics included as images). MathJax can be used with screen readers, providing accessibility for the visually impaired. With MathJax, mathematics is text-based rather than image-based, and so it is available for search engines, meaning that your equations can be searchable, just like the text of your pages. MathJax allows page authors to write formulas using TeX and LaTeX notation, `MathML `_, a World Wide Web Consortium standard for representing mathematics in XML format, or `AsciiMath `_ notation. MathJax will even convert TeX notation into MathML, so that it can be rendered more quickly by those browsers that support MathML natively, or so that you can copy and paste it into other programs. MathJax is modular, so it loads components only when necessary, and can be extended to include new capabilities as needed. MathJax is highly configurable, allowing authors to customize it for the special requirements of their web sites. Finally, MathJax has a rich application programming interface (API) that can be used to make the mathematics on your web pages interactive and dynamic. mathjax-docs-2.7+20171212/mathml.rst0000644000000000000000000001435613213762601013553 0ustar .. _MathML-support: ********************** MathJax MathML Support ********************** The support for :term:`MathML` in MathJax comes in three parts: the `mml2jax` preprocessor, the `MathML` input processor, and the `NativeMML` output processor. The first of these looks for ```` tags within your document and marks them for later processing by MathJax. The second converts the MathML to the internal format used by MathJax, and the third turns the internal format into MathML within the page so that it can be displayed by the browser's native MathML support. Because of MathJax's modular design, you do not need to use all three of these components. For example, you could use the `tex2jax` preprocessor and the TeX input processor, but the NativeMML output processor, so that your mathematics is entered in TeX format, but displayed as MathML. Or you could use the `mml2jax` preprocessor and MathML input processor with the HTML-CSS output processor to make MathML available in browsers that don't have native MathML support. It is also possible to have MathJax select the output processor for you so that MathML is used in those browsers that support it well enough, while HTML-CSS is used for those that don't. See the :ref:`combined configurations ` section for details and examples. Of course it is also possible to use all three components together. It may seem strange to go through an internal format just to return to MathML in the end, but this is actually what makes it possible to view MathML within an HTML4 page (rather than an XHTML page), in particular in older browsers, without the complications of handling special MIME-types for the document, or any of the other setup issues that make using native MathML difficult. MathJax handles the setup and properly marks the mathematics so that the browser will render it as MathML. In addition, MathJax provides its contextual menu for the MathML, which lets the user zoom the mathematics for easier reading, get and copy the source markup, and so on, so there is added value to using MathJax even with a pure MathML workflow. MathML in HTML pages ==================== For MathML that is handled via the preprocessor, you should not use named MathML entities, but rather use numeric entities like ``√`` or unicode characters embedded in the page itself. The reason is that entities are replaced by the browser before MathJax runs, and some browsers report errors for unknown entities. For browsers that are not MathML-aware, that will cause errors to be displayed for the MathML entities. While that might not occur in the browser you are using to compose your pages, it can happen with other browsers, so you should avoid the named entities whenever possible. If you must use named entities, you may need to declare them in the `DOCTYPE` declaration by hand. When you use MathML in an HTML4 document rather than an XHTML one (MathJax will work with both), you should not use the "self-closing" form for tags with no content, but should use separate open and close tags. That is, use .. code-block:: html rather than ````. This is because HTML (prior to HTML5) does not have self-closing tags, and some browsers will get the nesting of tags wrong if you attempt to use them. For example, with ````, since there is no closing tag, the rest of the mathematics will become the content of the ```` tag; but since ```` should have no content, the rest of the mathematics will not be displayed. This is a common error that should be avoided. Modern browsers that support HTML5 should be able to handle self-closing tags, but older browsers have problems with them, so if you want your mathematics to be visible to the widest audience, do not use the self-closing form in HTML documents. Supported MathML commands ========================= MathJax supports the `MathML3.0 `_ mathematics tags, with some limitations. The MathML support is still under active development, so some tags are not yet implemented, and some features are not fully developed, but are coming. The deficiencies include: - No support for alignment groups in tables. - Not all attributes are supported for tables. E.g., ``columnspan`` and ``rowspan`` are not implemented yet. - Experimental support for the elementary math tags: ``mstack``, ``mlongdiv``, ``msgroup``, ``msrow``, ``mscarries``, and ``mscarry``. (Via the ``mml3`` extension, see below.) - Experimental support for bidirectional mathematics. (Via the ``mml3`` extension, see below.) See the `results of the MathML3.0 test suite `_ for details. .. _content-mathml: Content MathML ============== To use Content MathML in your documents, simply include ``"content-mathml.js"`` in the ``extensions`` array of your MathML configuration block. For example .. code-block:: html Note that this script tag must come *before* the script that loads ``MathJax.js`` itself. For more information, see :doc:`options/extensions/Content-MathML`. .. _experimental-mathml: Experimental mml3 extension =========================== To activate experimental features in your documents, simply include ``"mml3.js"`` in the ``extensions`` array of your MathML configuration block. For example .. code-block:: html Note that this script tag must come *before* the script that loads ``MathJax.js`` itself. For more information, see :doc:`options/extensions/MML3`. Semantics and Annotations ========================= Starting with MathJax version 2.3, some popular annotation formats like TeX, Maple, or Content MathML that are often included in the MathML source via the ``semantics`` element are accessible from the ``"Show Math As"`` menu. See the `MathML Annotation Framework `_ and the :ref:`configure-MathMenu` documentation for details. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/misc/���������������������������������������������������������������������0000755�0000000�0000000�00000000000�13213762601�012461� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/misc/accessibility-features.rst�������������������������������������������0000644�0000000�0000000�00000027160�13213762601�017664� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _accessibility-features: ********************************** Accessibility Features ********************************** MathJax's mission is to provide the best tools for mathematics on the web. Naturally, this means for everyone and thus accessibility is an important concern for us. .. _mathjax-ui-a11y: MathJax User Interface ---------------------- The MathJax user interface consists of the :ref:`MathJax Menu ` and the various MathJax Processing Messages, cf :ref:`the core configuration `. The user interface is localized to over 20 languages and many more partial localizations thanks to the fantastic support of `the community at TranslateWiki.net `__. The MathJax Menu also follows WCAG 2.0 guidelines. Each MathJax fragment is included in the tab order; the menu can be triggered via the space or menu key; and navigation in the menu is possible using the arrow keys. MathJax Accessibility Extensions -------------------------------- The :ref:`MathJax Accessibility extensions ` provide several tools and features that enable universal rendering of mathematics on the web. They enhance rendering both visually and aurally. In particular: - An innovative responsive rendering of mathematical content through collapsing and exploration of subexpressions. - An aural rendering tool providing on-the-fly speech-text for mathematical content and its subexpressions using various rule sets. - An exploration tool, allowing for meaningful exploration of mathematical content including multiple highlighting features and synchronized aural rendering. The Accessibility Extensions support the widest selection of browsers, operating systems, and assistive technologies as they only require support for well-supported web standards such as WAI-ARIA, in particular labels and live regions. .. note:: We strongly suggest to use the MathJax Accessibility extensions to provide the best possible experience for all users. .. _screenreader-support: Legacy Support via AssistiveMML.js ---------------------------------- Some screenreaders support MathML, MathJax's internal format. Screenreaders like ChromeVox, JAWS (on IE), and Texthelp support MathJax directly while other screenreaders can benefit from the :ref:`AssistiveMML extension `. The ``AssistiveMML`` extension embeds visually hidden MathML alongside MathJax's visual rendering while hiding the visual rendering from assistive technology (AT) such as screenreaders. This allows most MathML-enabled screenreaders to read out the underlying mathematics. It's important to note that Presentation MathML is usually not expressive enough to voice it which is why screenreaders have to rely on heuristics to analyze the MathML semantically. The quality of MathML support in screenreaders varies greatly, with different levels of MathML feature support, different speech rule sets, and different voicing technologies. The expected result for MathJax given the current state of technology is roughly the following: * the visually-hidden MathML is read out correctly by AT (i.e., not just the character strings but, e.g., ```` leads to "fraction"; this will vary with the MathML support of the screenreader). * the visual rendering is not read out by AT * the MathJax Menu triggers AT to say "clickable" before each math element. * This allows keyboard users to enter the MathJax Menu via space or menu key. * the visually hidden MathML does not get an outline (usually placed at an odd location due to the target of the outline being visually hidden). * except in iOS VoiceOver, where this allows to hook into VoiceOver's exploration features. Support Matrix (AssistiveMML.js) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Below is a summary of results for MathML enabled screenreaders and the legacy AssistiveMML extension, based on tests as well as user reports. .. raw:: html
Screenreader Browser OS Usable? Bugs
ChromeVox Chrome any +1 no bugs
NVDA any WinXP DNA MathPlayer 4 does not support WinXP
NVDA Chrome any DNA Chrome issues prevent MathML support by NVDA
NVDA Firefox Win7 +1 no bugs
NVDA Firefox Win8.1 +1 no bugs
NVDA Firefox Win10 +1 no bugs
NVDA MS Edge Win10 DNA Edge issues prevent MathML support by NVDA
NVDA IE11 Win8.1 +1 no bugs
NVDA IE10 Win7 +1 no bugs
NVDA IE9 Win7 +1 no bugs
JAWS any WinXP DNA JAWS 15 was the last version to support Windows XP but MathML support in JAWS starts with JAWS 16
JAWS Chrome any DNA JAWS only supports IE and Firefox
JAWS Firefox Win8.1 +1 no bugs
JAWS Firefox Win7 +1 no bugs
JAWS Firefox Win10 +1 no bugs
JAWS MS Edge Win10 DNA JAWS only supports IE and Firefox
JAWS IE11 Win8.1 +1 no bugs
JAWS IE10 Win7 +1 no bugs
JAWS IE9 Win7 +1 no bugs
VoiceOver Safari OSX +1 see notes below
VoiceOver Chrome OSX DNA Chrome and VoiceOver issues prevent MathML support in this combination.
VoiceOver Firefox OSX DNA Chrome and Firefox issues prevent MathML support in this combination.
Orca Firefox Ubuntu 15.10 +1 no bugs
Orca Web Ubuntu 15.10 DNA Chrome issues prevent MathML support by ORCA
Orca Chrome(ium) Ubuntu 15.10 DNA Chrome issues prevent MathML support by ORCA
Notes on Apple VoiceOver ^^^^^^^^^^^^^^^^^^^^^^^^ * **VoiceOver** on OSX * *Safari*. The visually-hidden MathML is read out and gets an outline. Visual rendering is ignored correctly. VoiceOver somtimes drops parts of the equation due to its partial MathML support. * *Chrome*. The visually-hidden MathML is detected but VoiceOver does not read it correctly (only e.g., "4 items detected; math"; this seems like a VO bug); an outline is added. Visual rendering is ignored correctly. * *Firefox*. The visually-hidden MathML is only read as string of contained characters; an outline is added. Visual rendering is ignored correctly. * **VoiceOver** on iOS * The "slide two fingers from top to read screen" method will read the visually-hidden MathML. Visual rendering is ignored correctly. * Manual exploration. * Exploration by swiping left/right will read the visually-hidden MathML. Visual rendering is ignored correctly. * Tapping on an equation does not work due to the visually-hidden MathML being placed in a 1px box. Notes on MathPlayer 4 and Internet Explorer 11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Design Science suggests to always use IE's Enterprise mode for MathPlayer in IE11, `see their documentation `__. However, it seems that this is only required for MathPlayer's visual rendering to work and this additionally requires the MathPlayer BrowserHelperAddon to be active in IE. Unfortunately, the MathPlayer BrowserHelperAddon can lead to crashes. E.g., if you switch MathJax's output to the NativeMML output, MathPlayer will crash IE 11; you'll have to clear the MathJax cookie to reset things. Also, in a plain MathML sample (without MathJax), clicking on the MathPlayer rendering will crash IE11. Using IE's Enterprise mode should work with NVDA and the AssistiveMML extension but they don't seem to work with NVDA and plain MathML pages. We suggest you do not switch on IE's Enterprise mode on pages using MathJax and we also have to strongly suggest **not** to use the BrowserHelperAddon with MathJax on IE 11. mathjax-docs-2.7+20171212/misc/articles.rst0000644000000000000000000000662413213762601015031 0ustar .. _articles: ********************************** Articles and Presentations ********************************** Articles ======== - `Towards Universal Rendering in MathJax (W4A 2016) `__ by Davide Cervone, Peter Krautzberger, Volker Sorge, *MathJax*, *2016* - `Towards ARIA Standards for Mathematical Markup (DEIMS 2016) `__ by Davide Cervone, Peter Krautzberger, Volker Sorge, *MathJax*, *2016* - `Employing Semantic Analysis for Enhanced Accessibility Features in MathJax (ADS, CCNC 2016) `__ by Davide Cervone, Peter Krautzberger, Volker Sorge, *MathJax*, *2016* - `Whitepaper: Towards MathJax v3.0 `__ by Peter Krautzberger, Davide Cervone, Volker Sorge, *MathJax*, *2015* - `Towards Meaningful Visual Abstraction of Mathematical Notation (MathUI, CICM 2015) `__ by Davide Cervone, Peter Krautzberger, Volker Sorge, *MathJax*, *2016* - `MathML forges on `__ by Peter Krautzberger, *MathJax*, *2014* - `MathJax: A Platform for Mathematics on the Web", Notices of the AMS `__ by Davide Cervone, *MathJax*, *2012* - `Accessible Pages with MathJax `__ by Neil Soiffer *Design Science, Inc.*, *2010* - `Mathematics E-learning Community Benefits from MathJax `__ by Hylke Koers, *MathJax*, *2010* Presentations ============= - `Barrierereie Mathematik im Netz (in German) `__ by Peter Krautzberger, *MathJax*, *FernUni Hagen, Global Accessibility Awareness Day, 2016* - `Evolving Math Web Standards from a Usability Perspective `__ by Peter Krautzberger, Davide Cervone, Volker Sorge, *MathJax*, *2016 Joint Mathematics Meetings in Seattle* - `MathJax -- beautiful mathematics on the web `__ by Peter Krautzberger, *MathJax*, *2014* - `MathML: math made for the web and beyond `__ by Peter Krautzberger, *MathJax*, *2013* - `MathJax: The Past and the Future `__ by `Davide P. Cervone `__ *2013 Joint Mathematics Meetings in San Diego* - `MathJax from an Author's Point of View `__ by `Davide P. Cervone `__ *2013 Joint Mathematics Meetings in San Diego* - `MathJax: a JavaScript-based engine for including TeX and MathML in HTML `__ by `Davide P. Cervone `__ *2010 Joint Mathematics Meetings in San Francisco* - `MathType, Math Markup, and the Goal of Cut and Paste `__ by Robert Miner *2010 Joint Mathematics Meetings in San Francisco* mathjax-docs-2.7+20171212/misc/badges.rst0000644000000000000000000001462613213762601014451 0ustar .. _mathjax-badges: ********************************** MathJax Badges ********************************** We are proud of the work we have done on MathJax, and we hope you are proud to use it. If you would like to show your support for the MathJax project, please consider including one of our “Powered by MathJax” web badges on your pages that use it. The MathJax Badges ================== .. raw:: html
Badge HTML to Use

Powered by MathJax
<a href="https://www.mathjax.org">
          <img title="Powered by MathJax"
          src="https://www.mathjax.org/badge/badge.gif"
          border="0" alt="Powered by MathJax" />
      </a>

Powered by MathJax
<a href="https://www.mathjax.org">
          <img title="Powered by MathJax"
          src="https://www.mathjax.org/badge/badge-square.png"
          border="0" alt="Powered by MathJax" />
      </a>

Powered by MathJax
<a href="https://www.mathjax.org">
          <img title="Powered by MathJax"
          src="https://www.mathjax.org/badge/badge-square-2.png"
          border="0" alt="Powered by MathJax" />
      </a>

Powered by MathJax
<a href="https://www.mathjax.org">
          <img title="Powered by MathJax"
          src="https://www.mathjax.org/badge/badge-square-3.png"
          border="0" alt="Powered by MathJax" />
      </a>
Thanks to our friends at OER Glue for designing the last two badges. The MathJax Logo ================ .. raw:: html

Powered by MathJax
<a href="https://www.mathjax.org">
	  <img title="Powered by MathJax"
	  src="https://www.mathjax.org/badge/mj_logo.png"
	  border="0" alt="Powered by MathJax" />
      </a>
Alternative versions ==================== While we do not allow the modification of the badges or the logo, we are open to requests for different versions. - An `SVG version `__ of the square badge is available. - Smaller versions of the main logo are available - `96x20 `__ - `60x20 `__ - `60x12 `__ - `60x12 `__ (gif) Rules ===== We are committed to maintaining the highest standards of excellence for MathJax, and part of that is avoiding confusion and misleading impressions; therefore, if you do use our badge or logo, we ask that you observe these simple rules (for the fine print, see below): Things You Can Do ~~~~~~~~~~~~~~~~~ - use the MathJax Logo or Badges in marketing, and other publicity materials related to MathJax; - distribute unchanged MathJax products (code, development tools, documentation) as long as you distribute them without charge; - describe your own software as "based on MathJax technology", or "incorporating MathJax source code” if your software includes modified MathJax products; - link to MathJax’s website(s) by using the logos and badges we provide; - use MathJax's word marks in describing and advertising your services or products relating to a MathJax product, so long as you don't do anything that might mislead customers. For example, it's OK if your website says, "Customization services for MathJax available here”; and - make t-shirts, desktop wallpaper, or baseball caps though only for yourself and your friends (meaning people from whom you don't receive anything of value in return). Things You Cannot Do ~~~~~~~~~~~~~~~~~~~~ - alter our logo or badges in any way - use our logo or badge online without including the link to the MathJax home page - place our logo or badges in such close proximity to other content that it is indistinguishable - make our logo or badges the most distinctive or prominent feature on your website, printed material or other content - use our logo or badges in a way that suggests any type of association or partnership with MathJax or approval, sponsorship or endorsement by MathJax (unless allowed via a license from us) - use our logo or badges in a way that is harmful, deceptive, obscene or otherwise objectionable to the average person - use our logo or badges on websites or other places containing content associated with hate speech, pornography, gambling or illegal activities - use our logo or badges in, or in connection with, content that disparages us or sullies our reputation And now the fine print: ~~~~~~~~~~~~~~~~~~~~~~~ *The words and logotype “MathJax,” the MathJax badges, and any combination of the foregoing, whether integrated into a larger whole or standing alone, are MathJax’s trademarks. You are authorized to use our trademarks under the terms and conditions above, and only on the further condition that you download the trademarks directly from our website. MathJax retains full, unfettered, and sole discretion to revoke this trademark license for any reason whatsoever or for no specified reason.* mathjax-docs-2.7+20171212/misc/browser-compatibility.rst0000644000000000000000000001731513213762601017554 0ustar .. _browser-compatibility: ********************************** Browser Compatibility ********************************** Extensive browser support is an important goal for MathJax. At the same time, MathJax does require a certain minimum level of browser functionality. Our extensive `MathJax test suite `__ tests every MathJax release for regressions on all major browsers. Please comment in the `MathJax User Group `__ or `file issues on GitHub `__ if you notice inaccuracies or problems. It usually helps to add screenshots for which we suggest services such as `browsershots.org `_, `saucelabs.com `_, or `browserstack.com `_. --------------- HTML-CSS Output --------------- The HTML-CSS Output supports Internet Explorer 6 (and above) as well as all modern browsers (Firefox 3+, Safari 2+, Chrome 0.2+). ----------------- CommonHTML Output ----------------- The CommonHTML Output supports Internet Explorer 8 (and above) as well as all modern browsers. ---------- SVG Output ---------- The SVG Output supports Internet Explorer 9 (and above) as well as all modern browsers. -------------- Legacy Results -------------- The following list describes the browsers that were originally tested with MathJax's HTML-CSS output. +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Browser | Versions | Notes | +=====================================================================================+=========================================+===========================================================================================================+ | Internet Explorer | 6.0 and later (Windows) | In MathJax v2.0+, IE8 and IE9 run faster in their IE8 and IE9 standards mode than in IE7 emulation mode. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Firefox | 3.0 and later (Windows, MacOS, Linux) | Firefox 2.0 is not supported. Firefox before 3.5 uses image fonts. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Chrome | 0.3 and later (Windows, MacOS, Linux) | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Safari | 2.0 and later (MacOSX, Windows) | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Opera | 9.5 and later (Windows, MacOS, Linux) | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | iPad/iPhone/iTouch | All iOS versions | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Android stock browser | v2.1 and later | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | BlackBerry | OS 6 and later | | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Symbian | Supported | Tested on Symbian3 emulator. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | Konqueror | 4.x and later (Linux) | Not tested with older versions. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | `Gecko browsers `_ | | Not systematically tested, but should be like Firefox. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | `WebKit browsers `_| | Not systematically tested, but should be like Safari. | +-------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ mathjax-docs-2.7+20171212/misc/epub.rst0000644000000000000000000003157613213762601014162 0ustar .. _epub3-readers: ********************************** EPUB3 Reading systems overview ********************************** With `EPUB3 `_, MathML has become part of the EPUB standard. All EPUB3 reading systems rely on regular browser engines to render EPUB content. This means they face the same (lack of) MathML support as browsers do. Some EPUB reading systems leverage MathJax to provide MathML support without having to wait for browser engines to catch up. For general information on EPUB 3 support, check `Epubtest.org `_. MathML support on EPUB3 reading systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following table collects know information on EPUB reading systems and their MathML support. Please help us keep this table up-to-date! +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | Name | MathML support | Platform | +=====================================================================================+===================================================================================+====================================================+ | `Adobe Digital Editions `_ | on Mac via Safari, on Windows via MathJax | Windows, Mac | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Aldiko `_ | no | Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Azardi Desktop `_ | via Gecko | Windows, Mac, Linux | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `AzardiOnline `_ | via MathJax | web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Bluefire reader `_ | on iOS via mobile Safari | iOS, Android, web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `booki.sh `_ | browser-dependent | web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Bureau van Dijk Reader `_ | via MathJax | web-based, Android, iOS, Windows8 | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Cainteoir `_ | no | Linux | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Calibre `_ | via MathJax | Windows, Mac, Linux | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Coolreader `_ | no | Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Dolphin Easy Reader `_ | via `MathPlayer `_ | Windows | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `epub.js `_ | via MathJax | web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `EPUBReader `_ | via Gecko | Firefox add-on | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `FBreader `_ | no | Android, Linux, Windows, Mac | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Go Read `_ | via MathJax | Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Gyan reader `_ | via MathJax | Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `iBooks `_ | via mobile Safari | iOS, Mac | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `IDEAL reader `_ | via MathJax | Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Ingram VitalSource Bookshelf `_ | via MathJax | Windows, Mac, iOS, Android, web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Kobo Reader `_ | mobile Safari on iOS | Windows, Mac, iOS, Android, Blackberry, web-based | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Lektz `_ | no | Android, iOS, Windows | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Lucifox `_ | via Gecko | Firefox Add-on | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Mantano Reader `_ | no | Android, iOS | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `MegaReader `_ | no | iOS | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Nook Apps `_ | no | Windows, iOS, Android | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ | `Readium `_ | iOS: via mobile Safari, web-based: via MathJax | SDK | +-------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+----------------------------------------------------+ mathjax-docs-2.7+20171212/misc/faq.rst0000644000000000000000000004537013213762601013773 0ustar .. _FAQ: ********************************** MathJax Frequently Asked Questions ********************************** Which license is MathJax distributed under? ------------------------------------------- MathJax is distributed under the `Apache License, Version 2.0 `__. Will MathJax make my page load slower even if there's no math? -------------------------------------------------------------- MathJax loads components only when needed so there is a big difference between what is loaded on a page without mathematics and one that does include mathematics. On a page with no mathematics, loading MathJax requires two files: MathJax.js and a configuration file. If taken from the MathJax CDN, the actual (compressed) data transferred for MathJax.js will be about 14.4KB. The configuration file can vary greatly in size depending on what is included; minimal configurations can be as small as 3.7KB, reasonable configurations vary between 25KB and 40KB -- bringing us to a total of 18KB to 55KB, i.e., roughly a small to medium sized image. To learn more about configuring MathJax, see :ref:`our documentation `. Mathematics is not rendering properly in IE. How do I fix that? --------------------------------------------------------------- First, please open the MathJax homepage at `www.mathjax.org `__ in IE to see if that loads correctly. If it does, this indicates that there may be something wrong with the webpage you were trying to view initially. If appropriate, upgrade the website to `the latest version of MathJax `__. If the MathJax homepage does not display mathematics properly, there may be an issue with your security settings in Internet Explorer. Please check the following settings: - "Active Scripting" under the Scripting section should be enabled, as it allows JavaScript to run. - "Run ActiveX controls and Plugins" should be enabled (or prompted) in the "ActiveX Controls and Plugins" section. - "Script ActiveX controls marked safe for scripting" needs to be enabled (or prompted) in the same "ActiveX Controls and Plugins" section. Note that it requires a restart of IE if you change this setting. - "Font Download" has to be enabled (or prompted) in the "Downloads" section. This is required for MathJax to use web-based fonts for optimal viewing experience. You may need to select Custom Level security to make these changes. If you have verified that the above settings are correct, tried clearing your cache and restarting IE, and are still experiencing problems with displaying mathematics on www.mathjax.org, we would appreciate it if you reported the problem to the MathJax User Group so we can look into it. Please follow the `guidelines for reporting problems <#problem-report>`__ described below. Some of my mathematics is too large or too small. How do I get it right? ------------------------------------------------------------------------ MathJax renders mathematics dynamically so that formulas and symbols are nicely integrated into the surrounding text - with matching font size, margins, and baseline. So, in other words: it should look right. If your mathematics is too large or too small in comparison to its surroundings, you may be using the incorrect typesetting style. Following LaTeX conventions, MathJax supports two typesetting styles: inline and paragraph (or "display") equations. For inline equations, MathJax tries hard to maintain the inter-line spacing. This means things like fractions and roots are vertically compressed, and smaller fonts are used. Paragraph equations are shown as a separate paragraph and can be displayed with more space and slightly larger fonts. The standard delimiters for inline equations are ``\(...\)``, while for paragraph equations they are ``$$...$$`` or ``\[...\]``, but they can be customized. For how to configure MathJax to scale all mathematics relative to the surrounding text, check our documentation for :ref:`the HTML output ` and :ref:`the SVG output `. How do I access the MathJax CDN using a https secure connection? ---------------------------------------------------------------- The MathJax CDN can be accessed via ``https``. We advise to always use ``https``. For more information, see :ref:`our documentation `. My mathematics is private. Is it safe to use MathJax? ----------------------------------------------------- Yes. MathJax is JavaScript code that is run entirely within the browser of the user, and so your site's actual content never leaves the browser while MathJax is rendering. If you are using MathJax on the CDN, it interacts with a web server to get font data but this is all put together in the browser of the reader. In case you have concerns about cross-site scripting, you can access the MathJax CDN service using the secure ``https`` protocol to prevent tampering with the code between the CDN and a browser. Or, if you prefer, you can also install MathJax on your own web server. MathJax does not reference script codes on other websites. The code is, of course, open source which means that you can `review it and inspect its integrity `__. Does MathJax support Presentation and/or Content MathML? -------------------------------------------------------- MathML comes in two types: Presentation MathML, which describes what an equation looks like, and Content MathML, which describes what an equation means. By default, MathJax works with Presentation MathML and offers an extension for Content MathML, see :ref:`the documentation on MathML support `. You can also convert your Content MathML expressions to Presentation MathML using xslt, see for example David Carlisle's `web-xslt collection `__. A more detailed explanation of the difference between Content and Presentation MathML can be found in the module `"Presentation MathML Versus Content MathML" `__ at cnx.org. How do I create mathematical expressions for display with MathJax? ------------------------------------------------------------------ MathJax is a method to display mathematics. It is not an authoring environment, and so you will need another program to create mathematical expressions. The most common languages for mathematics on the computer are (La)TeX and MathML, and there are many authoring tools for these languages. MathJax is compatible with both MathML and (La)TeX. LaTeX code is essentially plain text, and so you do not need a special program to write LaTeX code (although complete authoring environments exist). If you are not familiar with LaTeX, you will need some determination to learn and master the language due to its specialized nature and rich vocabulary of symbols. There are various good tutorials on the net, and there is not a one-size-fits-all best one. A good starting point is the `TeX User Group `__, or have a look at the `LaTeX Wiki book `__. `MathML `__ is an XML-based web format for mathematical expressions. MathML3, the latest version, has been an official W3C recommendation since October 2010. MathML is widely supported by Computer Algebra Systems and can be created with a choice of authoring tools, including Microsoft Office with the `MathType `__ equation editor. A list of software the supports MathML may be found in `The W3C MathML software list `__. I ran into a problem with MathJax. How do I report it? ------------------------------------------------------ If you come across a problem with MathJax, please report it so that the development team and other users are aware and can look into it. It is important that you report your problem following the steps outlined here because this will help us to rapidly establish the nature of the problem and work towards a solution effectively. If you have are experiencing a problem, please follow these steps: - Have you cleared your browser cache, quit your browser, and restarted it? If not, please do so first and check if the problem persists. `These instructions `__ tell you how to clear your cache on the major browsers. - Have you turned of other extensions and plugins in your browser, and restarted it? - Have a look at the math rendering examples on `www.mathjax.org `__ to see if you experience problems there as well. This might help you to determine the nature of your problem. - If possible, check whether the problem has been solved in the latest MathJax release, cf. :ref:`the installation instructions `. - Search through the `MathJax User Group `__ to see if anyone else has come across the problem before. - Found a real and new problem? Please report it to the `MathJax User Group `__ including the following information: - A detailed description of the problem. What exactly is not working as you expected? What do you see? - The MathJax version you are working with, your operating system, and full browser information including all version information. - If at all possible, a pointer to a webpage that is publicly available and exhibits the problem. This makes sure that we can reproduce the problem and test possible solutions. The MathJax font folder is too big. Is there any way to compress it? -------------------------------------------------------------------- No, there is no simple way to make the fonts folder smaller. We have tried to make the fonts folder as small as possible, but in order to render math on some older browsers, you need image fonts, which take up most of the space. This is because you need an individual image file for each character in each font in each of a dozen different sizes, and each file must be at least the block size of the hard drive it is stored on (usually 4 kb). With nearly 30,000 separate image files, this adds up to a lot. Some users have suggested using a "sprite font" that has all the characters in a single image, from which MathJax could show only the particular character it wants. This is a nice idea, but it does not work well in practice (at least not if you want it to work reliably across multiple browsers). Since the image fonts are intended as a last resort for browsers whose functionality is not well behaved, relying on fancy CSS tricks to clip large images is not going to be a viable strategy. This approach also has performance and printing problems. The single-glyph-per-file approach has proven to be the only truly reliable and maintainable approach that we have found. If you want to disable image fonts altogether, however, in order to save space, you can. **Note:** If you disable image fonts, MathJax might not work on some users' browsers. With image fonts disabled, users must either have the MathJax or STIX fonts on their computer or their browser must support the @font-face CSS directive. This means IE6+, Chrome, Safari 3.1+, Firefox 3.5+, and Opera 10+, or other browsers based on their rendering engines. On earlier browsers (without local fonts) or if webfonts are blocked , MathJax will not be able to render math reliably (though it will try its best). To disable image fonts, edit the MathJax config file at ``[MathJax]/config/MathJax.js`` or the custom config inside your template's `` either just before the ```` tag in your theme file, or at the end of the file if it contains no ````. Keep in mind that this will enable MathJax for your current theme/template only. If you change themes or update your theme, you will have to repeat these steps. We strongly suggest to use a plugin or help the community of your favorite software by writing a plugin. mathjax-docs-2.7+20171212/options/0000755000000000000000000000000013213762601013221 5ustar mathjax-docs-2.7+20171212/options/ThirdParty.rst0000644000000000000000000000441413213762601016050 0ustar .. _ThirdParty: *********************************** Third-party Extensions *********************************** MathJax can load extensions (and configurations) from arbitrary locations. This allows authors and developers to easily integrate custom code. Custom extension path configuration ---------------------------------------- Usually, third-party extensions have to be specified with their full paths (and matching ``loadComplete`` calls); this limits portability. To simplify this process, the MathJax configuration can include (possibly multiple) third-party locations for easier reference. To specify the URL, set ``MathJax.Ajax.config.path["Extra"]`` in your configuration file, for example, .. code-block:: javascript or equivalently, .. code-block:: javascript Configuring this path will allow you to load extensions using the ``[Extra]`` prefix. To continue the example, the following configuration would then load ``http://my.extra.com/mathjax/extra/spiffy.js``. .. code-block:: javascript MathJax.Hub.Config({ extensions: ["[Extra]/spiffy.js"] }); Note that the extension's ``loadComplete`` call needs to match this path, i.e., ``spiffy.js`` should end with .. code-block:: javascript MathJax.Ajax.loadComplete("[Extra]/spiffy.js"); MathJax Third-Party extension repository ---------------------------------------- We collect a list of third-party extensions on Github at `github.com/mathjax/MathJax-third-party-extensions `_. This repository allows developers to publicize their custom extensions easily. .. note:: The mirrored copy on the MathJax CDN at `cdn.mathjax.org/mathjax/contrib/ `_ has been retired alongside the MathJax CDN. .. note:: You can disable the ``[Contrib]`` path by loading MathJax with ``noContrib`` in the query string, e.g., ``MathJax.js?config=...&noContrib``mathjax-docs-2.7+20171212/options/extensions/0000755000000000000000000000000013213762601015420 5ustar mathjax-docs-2.7+20171212/options/extensions/CHTML-preview.rst0000644000000000000000000000041113213762601020474 0ustar .. _configure-CHTML-preview: ***************************** The CHTML-preview extension ***************************** .. warning:: This extension has been deprecated. For backward compatibility, the CHTML-preview extension loads :ref:`configure-fast-preview`. mathjax-docs-2.7+20171212/options/extensions/Content-MathML.rst0000644000000000000000000000224113213762601020703 0ustar .. _configure-Content-MathML: **************************** The Content MathML extension **************************** The options below control the operation of the Content MathML extension that is run when you include ``"MathML/content-mathml.js"`` in the `extension` array of your configuration. They are listed with their default values. To set any of these options, include a ``Content-MathML`` section in your :meth:`MathJax.Hub.Config()` call. .. code-block:: javascript MathJax.Hub.Config({ "content-mathml": { collapsePlusMinus: true, cistyles: { vector: 'bold-italic', matrix: 'bold-upright' }, symbols: { gamma: '\u03B3' } } }); These options allow the following. .. describe:: collapsePlusMinus: true, Specifies whether a Plus followed by a Minus is collapsed, e.g., `a+(-b)` simplified to `a-b`. .. describe:: cistyles: {...} Specifies which mathvariant to use with corresponding type attribute. .. describe:: symbols: {...} Specifies symbol names to translate to characters. Further customization is possible by modifying its functions on the fly.mathjax-docs-2.7+20171212/options/extensions/MML3.rst0000644000000000000000000000106513213762601016664 0ustar .. _configure-mml3: ****************** The MML3 extension ****************** The **experimental** MML3 extension is run when you include ``mml3.js`` in the ``extension`` array of the MathML section of your :meth:`MathJax.Hub.Config()` call. For example, .. code-block:: javascript MathJax.Hub.Config({ MathML: { extensions: ["mml3.js"] } }); The extension provides experimental support for the so-called elementary math elements as well as experimental support for bidirectional math. The extension has no configuration options. mathjax-docs-2.7+20171212/options/extensions/a11y-extensions.rst0000644000000000000000000000667713213762601021142 0ustar .. _a11y-extensions: **************************** The Accessibility extensions **************************** MathJax maintains a set of extensions for providing advanced accessibility features. These extensions are an official part of MathJax but are stored in a separate code repository. The full documentation is available `on GitHub `_ and we summarize the options below. Each accessibility extension can be loaded using the ``[a11y]`` path variable. The following extensions have configuration options. accessibility-menu.js --------------------- The standard approach is to only load the accessibility menu extension which provides opt-ins for end-users via the MathJax menu. .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... extensions: ["[a11y]/accessibility-menu.js"] }); The accessibility menu extension can then be controlled in the configuration block for the MathJax menu, e.g., .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... menuSettings: { collapsible: false, autocollapse: false, explorer: false } }); .. note:: The accessibility menu is part of all :ref:`combined configurations `. explorer.js ----------- The Explorer extension provides exploration tools for sub-expressions. It is the largest piece of the accessibility extensions, controlling highlighting, navigation and voicing. .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... explorer: { walker: 'syntactic', // none, syntactic, semantic highlight: 'none', // none, hover, flame background: 'blue', // blue, red, green, yellow, cyan, magenta, white, black foreground: 'black', // black, white, magenta, cyan, yellow, green, red, blue speech: true, // true, false generation: 'lazy', // eager, mixed, lazy subtitle: true, // true, false ruleset: 'mathspeak-default' // mathspeak-default, mathspeak-brief, mathspeak-sbrief, chromevox-default, chromevox-short, chromevox-alternative } }); auto-collapse.js ---------------- This extension will automatically collapse sub-expressions to allow the resulting equation to fit in the viewport width and will react to changes in viewport width. It will automatically load ``collapsible.js`` (see below). .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... "auto-collapse": { disabled: false; } }); collapsible.js -------------- This extension generates a complexity metric and inserts elements that allow the expressions to be collapsed by the user by clicking on the expression based on that metric. The extension only offers a configuration option to disable it. .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... collapsible: { disabled: false; } }); semantic-enrich.js ------------------ This extension coordinates the creation and embedding of semantic information generated by the enrichment process within the MathJax output for use by the other extensions. The extension only offers a configuration option to disable it. .. code-block:: javascript MathJax.Hub.Config({ // ...your configuration options... "semantic-enrich": { disabled: false; } }); mathjax-docs-2.7+20171212/options/extensions/assistive-mml.rst0000644000000000000000000000252613213762601020754 0ustar .. _assistive-mml: ****************************** The AssistiveMML.js extension ****************************** The options below control the operation of the `AssistiveMML` extension that is run when you include ``"AssistiveMML.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``AssistiveMML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ "AssistiveMML": { disabled: false, styles: { ".MJX_Assistive_MathML": { position:"absolute!important", clip: (HUB.Browser.isMSIE && (document.documentMode||0) < 8 ? "rect(1px 1px 1px 1px)" : "rect(1px, 1px, 1px, 1px)"), padding: "1px 0 0 0!important", border: "0!important", height: "1px!important", width: "1px!important", overflow: "hidden!important", display:"block!important" } } } }) would enable the extension and defines :ref:`CSS Style Objects ` to define CSS applied to the MathML content embedded in the page. See also :ref:`Screenreader support `. .. note:: We strongly recommend using the more advanced :ref:`Accessibility Extensions ` instead. mathjax-docs-2.7+20171212/options/extensions/fast-preview.rst0000644000000000000000000000501213213762601020564 0ustar .. _configure-fast-preview: ***************************** The fast-preview extension ***************************** The options below control the operation of the `fast-preview` extension that is run when you include ``"fast-preview.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``fast-preview`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ "fast-preview": { Chunks: {EqnChunk: 10000, EqnChunkFactor: 1, EqnChunkDelay: 0}, color: "inherit!important", updateTime: 30, updateDelay: 6, messageStyle: "none", disabled: false } }); would ask for the PreviewHTML output to run as a preview (`disabled: false`), force inheritance of the surrounding text color, and set the `updateTime` and `updateDelay` to low values (30ms / 6ms) to speed up the preview pass. Furthermore, it configures the second pass to set the chunking (`Chunks`) to a reflow every 10,000 equations and disables the progress messages (`messageStyle`). This extension provides a two-pass rendering mode. A **first**, fast-but-rough rendering is genereated as a preview, using the :ref:`configure-PreviewHTML`, then a **second** pass using the configured output jax runs to update the preview output. This two-pass mode will provide the reader with a quick, decent rendering to start reading immediately, while silently updating that rendering with the high quality layout later. .. describe:: EqnChunk: 10000 EqnChunkFactor: 1 EqnChunkDelay: 0 These values control how "chunky" the **second** pass will be. For more information see :ref:`configure-HTML-CSS` and :ref:`configure-SVG`. .. describe:: color: "inherit!important" This value allows you to choose a text color for the **first** passs. .. describe:: updateTime: 30 updateDelay: 6 These values control how often the **second** pass will pause to allow user interaction (e.g., scrolling). .. describe:: messageStyle: "none" This value controls the verbosity of the processing messages during the the **second** pass; see :ref:`configure-hub` for more information. .. describe:: disabled:false This value enables or disables the preview mode. In particular, it allows overriding a combined configuration file, cf. :ref:`common-configurations`. The user can independently enable or disable the fast preview via the MathJax Menu. mathjax-docs-2.7+20171212/options/extensions/handle-floats.rst0000644000000000000000000000140313213762601020671 0ustar .. _configure-handle-floats: *************************** The handle-floats extension *************************** The floats extension for the HTML-CSS output is run when you include ``handle-floats.js`` in the ``extension`` array of the HTML-CSS section of your :meth:`MathJax.Hub.Config()` call. For example, .. code-block:: javascript MathJax.Hub.Config({ "HTML-CSS": { extensions: ["handle-floats.js"] } }); This extension allows HTML-CSS output to deal with floating elements better. In particular, when there are tags or equation numbers, these would overlap floating elements, but with this extension, the width of the line should properly correspond to the amount of space remaining. The extension has no configuration options. mathjax-docs-2.7+20171212/options/extensions/index.rst0000644000000000000000000000066213213762601017265 0ustar ################# Extension options ################# .. toctree:: :maxdepth: 1 The Accessibility Extensions options The AssistiveMML options The fast-preview options The Content MathML options The HTML-CSS floats extension The experimental MML3 extension The CHTML-preview options [Deprecated] mathjax-docs-2.7+20171212/options/hub.rst0000644000000000000000000003333413213762601014537 0ustar .. _configure-hub: ****************************** The Core Configuration Options ****************************** The options below control the MathJax Hub, and so determine the code behavior of MathJax. They are given with their default values. .. describe:: jax: ["input/TeX","output/HTML-CSS"] 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. .. describe:: extensions: [] A comma-separated list of extensions to load at startup. The default directory is ``MathJax/extensions``. The ``tex2jax`` and ``mml2jax`` preprocessors can be listed here, as well as a ``FontWarnings`` extension that you can use to inform your user that mathematics fonts are available that they can download to improve their experience of your site. .. describe:: config: [] A comma-separated list of configuration files to load when MathJax starts up, e.g., to define local macros, etc., and there is a sample config file named ``config/local/local.js``. The default directory is the `MathJax/config` directory. The ``MMLorHTML.js`` configuration is one such configuration file, and there are a number of other pre-defined configurations (see :ref:`Using a configuration file ` for more details). .. describe:: styleSheets: [] A comma-separated list of CSS stylesheet files to be loaded when MathJax starts up. The default directory is the `MathJax/config` directory. .. describe:: styles: {} CSS styles to be defined dynamically at startup time. These are in the form `selector:rules` (see :ref:`CSS Style Objects ` for complete details). .. describe:: preJax: null and postJax: null Patterns to remove from before and after math script tags. If you are not using one of the preprocessors, 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 redundant, and since a `` would display "[math]" in place of the math until MathJax is able to typeset it. See also the ``preJax`` and ``postJax`` comments above. .. describe:: showProcessingMessages: true This value controls whether the `Processing Math: nn%` messages 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). .. describe:: messageStyle: "normal" 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 or the percentage of the mathematics processed. .. describe:: displayAlign: "center" and displayIndent: "0em" 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. .. describe:: delayStartupUntil: "none" Normally MathJax will perform its startup 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 handler is called. If so, set this to ``"onload"``. You can also set this to ``"configured"``, in which case, MathJax will delay its startup until you explicitly call :meth:`MathJax.Hub.Configured()`. See :ref:`Configuring MathJax after it is loaded ` for more details. .. describe:: skipStartupTypeset: false 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 :meth:`MathJax.Hub.Typeset()` yourself by hand, set this value to ``true``. .. describe:: elements: [] This is a list of DOM 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, and during MathJax's initial typesetting run when it starts up. This lets you restrict the processing to particular containers rather than scanning the entire document for mathematics. If none are supplied, the complete document is processed. .. describe:: positionToHash: true Since typesetting usually changes the vertical dimensions of the page, if the URL contains an anchor position, then after the page is typeset, you may no longer be positioned at the correct position on the page. 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. .. describe:: showMathMenu: true showMathMenuMSIE: 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``, but the latter is now deprecated in favor of the MathJax contextual menu settings for MathPlayer (see below). If ``showMathMenu`` is ``true``, then right-clicking (on Windows or Linux) or control-clicking (on Mac OS X) will produce a MathJax menu that allows you to get the source of the mathematics in various formats, change the size of the mathematics relative to the surrounding text, get information about MathJax, and configure other MathJax settings. Set this to ``false`` to disable the menu. When ``true``, the ``MathMenu`` configuration block determines the operation of the menu. See :ref:`the MathMenu options ` for more details. 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. MathJax will still honor their values from their original positions, if they are set there. .. describe:: menuSettings: { ... } This block contains settings for the mathematics contextual menu that act as the defaults for the user's settings in that menu. The possible values are: .. describe:: zoom: "None" This indicates when typeset mathematics should be zoomed. It can be set to ``"None"``, ``"Hover"``, ``"Click"``, or ``"Double-Click"`` to set the zoom trigger. .. describe:: CTRL: false, ALT: false, CMD: false, Shift: false These values indicate which keys must be pressed in order for math zoom to be triggered. For example, if ``CTRL`` is set to ``true`` and ``zoom`` is ``"Click"``, then math will be zoomed only when the user control-clicks on mathematics (i.e., clicks while holding down the `CTRL` key). If more than one is ``true``, then all the indicated keys must be pressed for the zoom to occur. .. describe:: zscale: "200%" This is the zoom scaling factor, and it can be set to any of the values available in the `Zoom Factor` menu of the `Settings` submenu of the contextual menu. .. describe:: context: "MathJax" This controls what contextual menu will be presented when a right click (on a PC) or CTRL-click (on the Mac) occurs over a typeset equation. When set to ``"MathJax"``, the MathJax contextual menu will appear; when set to ``"Browser"``, the browser's contextual menu will be used. For example, in Internet Explorer with the MathPlayer plugin, if this is set to ``"Browser"``, you will get the MathPlayer contextual menu rather than the MathJax menu. .. describe:: texHints: true This controls whether the "Show Math as" menu item includes special class names that help MathJax to typeset the mathematics that was produced by the TeX input jax. If these are included, then you can take the output from "Show Math as" and put it into a page that uses MathJax's MathML input jax and expect to get the same results as the original TeX. (Without this, there may be some spacing differences.) .. describe:: inTabOrder: true This controls whether math elements should be included in the tabindex. If set to ``true``, MathJax will add `tabindex=0`to the output. If set to ``false``, it will add ``tabindex="-1"``. Developers are **strongly discouraged** from initially disabling this (by means of configuration) as it will render the menu inaccessible. .. describe:: semantics: false This controls whether the "Show Math as ⇒ MathML Code" menu item includes the TeX or AsciiMath input as annotations. If these are included, then you can take the output from "Show Math as ⇒ MathML" and put it into a page that uses MathJax's MathML input jax and allow users to access the original input via "Show Math as ⇒ Annotation". There are also settings for ``format``, ``renderer``, ``font``, ``mpContext``, and ``mpMouse``, but these are maintained by MathJax and should not be set by the page author. .. describe:: errorSettings: { ... } This block contains settings that control how MathJax responds to unexpected errors while processing mathematical equations. Rather than simply crash, MathJax can report an error and go on. The options you can set include: .. describe:: message: ["[Math Processing Error]"] This is an HTML snippet that will be inserted at the location of the mathematics for any formula that causes MathJax to produce an internal error (i.e., an error in the MathJax code itself). See the :ref:`description of HTML snippets ` for details on how to represent HTML code in this way. .. describe:: style: {color:"#CC0000", "font-style":"italic"} This is the CSS style description to use for the error messages produced by internal MathJax errors. See the section on :ref:`CSS style objects ` for details on how these are specified in JavaScript. .. describe:: ignoreMMLattributes: { ... } This block contains ``attributeName: boolean`` pairs that control which attributes should **not** be preserved from the original MathML. E.g., ``id:true`` will be ignored, while ``id:false`` will preserve all ids even if other criteria would normally prevent some ids from being copied to the output; use false carefully. .. describe:: root: "" This controls which URL base MathJax uses to load its components. By default, it is empty and filled in during the initialization process with the base URL from where ``MathJax.js`` was loaded. .. describe:: v1.0-compatible: true This controls whether MathJax issues the warning about not having an explicit configuration in the event that the `jax` array is empty after configuration is complete. If you really intend that array to be empty, set this flag to ``false``. Note that setting this to false does **not** cause a default configuration file to be loaded. mathjax-docs-2.7+20171212/options/index.rst0000644000000000000000000000460513213762601015067 0ustar .. _configuration: ********************* Configuration Objects ********************* The various components of MathJax, including its input and output processors, its preprocessors, its extensions, and the MathJax core, all can be configured through the ``config/default.js`` file, or via a :meth:`MathJax.Hub.Config()` call (indeed, if you look closely, you will see that ``config/default.js`` is itself one big call to :meth:`MathJax.Hub.Config()`). Anything that is in ``config/default.js`` can be included in-line to configure MathJax. The structure that you pass to :meth:`MathJax.Hub.Config()` is a JavaScript object that includes `name:value` pairs giving the names of parameters and their values, with pairs separated by commas. Be careful not to include a comma after the last value, however, as some browsers (namely Internet Explorer) will fail to process the configuration if you do. The MathJax components, like the TeX input processor, have their own sections in the configuration object labeled by the component name, and using an object as its value. That object is itself a configuration object made up of `name:value` pairs that give the configuration options for the component. For example, .. code-block:: javascript MathJax.Hub.Config({ showProcessingMessages: false, jax: ["input/TeX", "output/HTML-CSS"], TeX: { TagSide: "left", Macros: { RR: '{\\bf R}', bold: ['{\\bf #1}',1] } } }); is a configuration that includes two settings for the MathJax Hub (one for `showProcessingMessages` and one for the `jax` array), and a configuration object for the TeX input processor. The latter includes a setting for the TeX input processor's `TagSide` option (to set tags on the left rather than the right) and a setting for `Macros`, which defines new TeX macros (in this case, two macros, one called ``\RR`` that produces a bold "R", and one called ``\bold`` that puts is argument in bold face). The ``config/default.js`` file is another example that shows nearly all the configuration options for all of MathJax's components. .. toctree:: :maxdepth: 1 The core options Preprocessor options Input processor options Output processor options Extension options Other options Third-party extensions mathjax-docs-2.7+20171212/options/input-processors/0000755000000000000000000000000013213762601016560 5ustar mathjax-docs-2.7+20171212/options/input-processors/AsciiMath.rst0000644000000000000000000000356213213762601021162 0ustar .. _configure-AsciiMath: ***************************** The AsciiMath input processor ***************************** The options below control the operation of the AsciiMath input processor that is run when you include ``"input/AsciiMath"`` in the `jax` array of your configuration or load a combined configuration file that includes the AsciiMath input jax. They are listed with their default values. To set any of these options, include a ``AsciiMath`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ AsciiMath: { fixphi: true, useMathMLspacing: true, displaystyle: false, decimalsign: "." } }); would set the ``displaystyle`` configuration option so that the limits for operators like summation symbols will appear next to them rather than above and below. .. describe:: fixphi: true Determines whether MathJax will switch the Unicode values for ``phi`` and ``varphii``. If set to ``true`` MathJax will use the TeX mapping, otherwise the Unicode mapping. .. describe:: useMathMLspacing: true Determines whether MathJax will use MathML spacing. Set to ``false`` to get TeX-like spacing. .. describe:: displaystyle: true Determines whether operators like summation symbols will have their limits above and below the operators (true) or to their right (false). The former is how they would appear in displayed equations that appear on their own lines, while the latter is better suited to in-line equations so that they don't interfere with the line spacing so much. .. describe:: decimalsign: "." This is the character to be used for decimal points in numbers. if you change this to ``","``, then you need to be careful about entering points or intervals. E.g., use ``(1, 2)`` rather than ``(1,2)`` in that case. mathjax-docs-2.7+20171212/options/input-processors/MathML.rst0000644000000000000000000000156413213762601020442 0ustar .. _configure-MathML: ************************** The MathML input processor ************************** The options below control the operation of the MathML input processor that is run when you include ``"input/MathML"`` in the `jax` array of your configuration or load a combined configuration file that includes the MathML input jax. They are listed with their default values. To set any of these options, include a ``MathML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MathML: { useMathMLspacing: true } }); would set the ``useMathMLspacing`` option so that the MathML rules for spacing would be used (rather than TeX spacing rules). .. describe:: useMathMLspacing: false Specifies whether to use TeX spacing or MathML spacing when the `HTML-CSS` output jax is used. mathjax-docs-2.7+20171212/options/input-processors/TeX.rst0000644000000000000000000001151013213762601020010 0ustar .. _configure-TeX: *********************** The TeX input processor *********************** The options below control the operation of the TeX input processor that is run when you include ``"input/TeX"`` in the `jax` array of your configuration or load a combined configuration file that includes the TeX input jax. They are listed with their default values. To set any of these options, include a ``TeX`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ TeX: { Macros: { RR: '{\\bf R}', bold: ['{\\bf #1}', 1] } } }); would set the ``Macros`` configuration option to cause two new macros to be defined within the TeX input processor. .. describe:: TagSide: "right" This specifies the side on which ``\tag{}`` macros will place the tags. Set it to ``"left"`` to place the tags on the left-hand side. .. describe:: TagIndent: ".8em" This is the amount of indentation (from the right or left) for the tags produced by the ``\tag{}`` macro. .. describe:: MultLineWidth: "85%" The width to use for the `multline` environment that is part of the ``AMSmath`` extension. This width gives room for tags at either side of the equation, but if you are displaying mathematics in a small area or a thin column of text, you might need to change the value to leave sufficient margin for tags. .. describe:: equationNumbers: {} This object controls the automatic equation numbering and the equation referencing. It contains the following values: .. describe:: autoNumber: "none" This controls whether equations are numbered and how. By default it is set to ``"none"`` to be compatible with earlier versions of MathJax where auto-numbering was not performed (so pages will not change their appearance). You can change this to ``"AMS"`` for equations numbered as the `AMSmath` package would do, or ``"all"`` to get an equation number for every displayed equation. .. describe:: formatNumber: function (n) {return n} A function that tells MathJax what tag to use for equation number ``n``. This could be used to have the equations labeled by a sequence of symbols rather than numbers, or to use section and subsection numbers instead. .. describe:: formatTag: function (n) {return '('+n+')'} A function that tells MathJax how to format an equation number for displaying as a tag for an equation. This is what appears in the margin of a tagged or numbered equation. .. describe:: formatID: function {return 'mjx-eqn-'+String(n).replace(/[:'"<>&]/g,"")} A function that rells MathJax what ID to use as an anchor for the equation (so that it can be used in URL references). .. describe:: formatURL: function (id) {return '#'+escape(id)} A function that takes an equation ID and returns the URL to link to it. .. describe:: useLabelIds: true This controls whether element ID's use the ``\label`` name or the equation number. When ``true``, use the label, when ``false``, use the equation number. See the `MathJax examples page `_ for some examples of equation numbering. .. describe:: Macros: {} This lists macros to define before the TeX input processor begins. These are `name:value` pairs where the `name` gives the name of the TeX macro to be defined, and `value` gives the replacement text for the macro. The `value` can be an array of the form `[value,n]`, where `value` is the replacement text and `n` is the number of parameters for the macro. Note that since the `value` is a javascript string, backslashes in the replacement text must be doubled to prevent them from acting as javascript escape characters. For example, .. code-block:: javascript Macros: { RR: '{\\bf R}', bold: ['{\\bf #1}', 1] } would ask the TeX processor to define two new macros: ``\RR``, which produces a bold-face "R", and ``\bold{...}``, which takes one parameter and sets it in the bold-face font. .. describe:: MAXMACROS: 10000 Because a definition of the form ``\def\x{\x} \x`` would cause MathJax to loop infinitely, the `MAXMACROS` constant will limit the number of macro substitutions allowed in any expression processed by MathJax. .. describe:: MAXBUFFER: 5*1024 Because a definition of the form ``\def\x{\x aaa} \x`` would loop infinitely, and at the same time stack up lots of a's in MathJax's equation buffer, the `MAXBUFFER` constant is used to limit the size of the string being processed by MathJax. It is set to 5KB, which should be sufficient for any reasonable equation. mathjax-docs-2.7+20171212/options/input-processors/index.rst0000644000000000000000000000037013213762601020421 0ustar ####################### Input processor options ####################### .. toctree:: :maxdepth: 1 The TeX input processor options The MathML input processor options The AsciiMath input processor options mathjax-docs-2.7+20171212/options/other/0000755000000000000000000000000013213762601014342 5ustar mathjax-docs-2.7+20171212/options/other/FontWarnings.rst0000644000000000000000000001213613213762601017516 0ustar .. _configure-FontWarnings: ************************** The FontWarnings extension ************************** The options below control the operation of the `FontWarnings` extension that is run when you include ``"FontWarnings.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``FontWarnings`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ FontWarnings: { fadeoutTime: 2*1000 } }); would set the ``fadeoutTime`` option to 2000 milliseconds (2 seconds). .. describe:: messageStyle: { ... } This sets the CSS styles to be used for the font warning message window. See the ``extensions/FontWarnings.js`` file for details of what are set by default. See the :ref:`CSS style objects ` for details about how to specify CSS styles via javascript objects. .. describe:: Message: { ... } This block contains HTML snippets to be used for the various messages that the FontWarning extension can produce. There are three messages that you can redefine to suit your needs: .. describe:: webFont: [ ... ] The message used for when MathJax uses web-based fonts (rather than local fonts installed on the user's system). .. describe:: imageFonts: [ ... ] The message used for when MathJax must use image fonts rather than local or web-based fonts (for those browsers that don't handle the ``@font-face`` CSS directive). .. describe:: noFonts: [ ... ] The message used when MathJax is unable to find any font to use (i.e., neither local nor web-based nor image-based fonts are available). Any message that is set to ``null`` rather than an HTML snippet array will not be presented to the user, so you can set, for example, the ``webFont`` message to ``null`` in order to have the ``imageFonts`` and ``noFonts`` messages, but no message if MathJax uses web-based fonts. See the description of :ref:`HTML snippets ` for details about how to describe the messages using HTML snippets. Note that in addition to the usual rules for defining such snippets, the FontWarnings snippets can include references to pre-defined snippets (that represent elements common to all three messages). These are defined below in the ``HTML`` block, and are referenced using ``["name"]`` within the snippet, where `name` is the name of one of the snippets defined in the ``HTML`` configuration block. For example .. code-block:: javascript Message: { noFonts: [ ["closeBox"], "MathJax is unable to locate a font to use to display ", "its mathematics, and image fonts are not available, so it ", "is falling back on generic unicode characters in hopes that ", "your browser will be able to display them. Some characters ", "may not show up properly, or possibly not at all.", ["fonts"], ["webfonts"] ] } refers to the ``closeBox``, ``fonts`` and ``webfonts`` snippets declared in the ``HTML`` section. .. describe:: HTML: { ... } This object defines HTML snippets that are common to more than one message in the ``Message`` section above. They can be included in other HTML snippets by by using ``["name"]`` in an HTML snippet, where `name` refers to the name of the snippet in the ``HTML`` block. The pre-defined snippets are: .. describe:: closeBox The HTML for the close box in the FontWarning message. .. describe:: webfonts The HTML for a paragraph suggesting an upgrade to a more modern browser that supports web fonts. .. describe:: fonts HTML that includes links to the MathJax and STIX font download pages. .. describe:: STIXfonts HTML that gives the download link for the STIX fonts only. (Used in place of `fonts` when the `HTML-CSS` option for `availableFonts` only includes the :term:`STIX` fonts.) .. describe:: TeXfonts HTML that gives the download link for the MathJax TeX fonts only. (Used in place of `fonts` when the `HTML-CSS` option for `availableFonts` only includes the `TeX` fonts.) You can add your own pre-defined HTML snippets to this object, or override the ones that are there with your own text. .. describe:: removeAfter: 12*1000 This is the amount of time to show the FontWarning message, in milliseconds. The default is 12 seconds. Setting this value to zero means that the message will not fade out (the user must close it manually). .. describe:: fadeoutSteps: 10 This is the number of steps to take while fading out the FontWarning message. More steps make for a smoother fade-out. Set to zero to cause the message to be removed without fading. .. describe:: fadeoutTime: 1.5*1000 This is the time used to perform the fade-out, in milliseconds. The default is 1.5 seconds. mathjax-docs-2.7+20171212/options/other/MatchWebFonts.rst0000644000000000000000000000426613213762601017610 0ustar .. _configure-MatchWebFonts: ***************************** The Match Web Fonts extension ***************************** The options below control the operation of the `MatchWebFonts` extension that is run when you include ``"MatchWebFonts.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``MatchWebFonts`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MatchWebFonts: { matchFor: { "HTML-CSS": true, NativeMML: false, SVG: false }, fontCheckDelay: 2000, fontCheckTimeout: 30 * 1000 } }); would ask to apply font size matching for the `HTML-CSS` output mode but not for the `NativeMML` or `SVG` modes. It would also tell the extension to wait 2 seconds before starting to look for web font arrivals, and to continue checking for 30 seconds. This extension is designed for pages that have mathematics within text that is displayed using webfonts, and works around a basic problem of webfonts -- a missing API. Webfonts often don't appear until after a delay, and the browser will substitute another font until then; unfortunately there is no signal for when the font becomes available. Since the arrival of the webfonts can significantly change ex and em sizes (and MathJax checks these to match them with its own font size), this extension will check for changes of em and ex sizes (indicating the arrival of webfonts) and rerender equations if necessary. .. describe:: matchFor: { ... } This block controls whether to apply font size matching for each output mode. .. describe:: "HTML-CSS": "true" Whether to match the font size for the `HTML-CSS` output. .. describe:: NativeMML: "true" Whether to match the font size for the `NativeMML` output. .. describe:: SVG: "true" Whether to match the font size for the `SVG` output. .. describe:: fontCheckDelay: 500 Initial delay before the first check for web fonts (in milliseconds). .. describe:: fontCheckTimeout: 15 * 1000 How long to keep looking for fonts (in milliseconds). mathjax-docs-2.7+20171212/options/other/MathEvents.rst0000644000000000000000000000216713213762601017160 0ustar .. _configure-MathEvents: ************************ The MathEvents extension ************************ The options below control the operation of the MathEvents component that allows handles mouse and menu events attached to mathematics that is typeset by MathJax. They are listed with their default values. To set any of these options, include a ``MathEvents`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MathEvents: { hover: 400 } }); would set the required delay for hovering over a math element to 400 milliseconds. .. describe:: hover: 500 This value is the time (in milliseconds) that a user must hold the mouse still over a math element before it is considered to be hovering over the math. .. describe:: styles: {} This is a list of CSS declarations for styling the zoomed mathematics. See the definitions in ``extensions/MathEvents.js`` for details of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. mathjax-docs-2.7+20171212/options/other/MathMenu.rst0000644000000000000000000001035313213762601016614 0ustar .. _configure-MathMenu: ********************** The MathMenu extension ********************** The options below control the operation of the contextual menu that is available on mathematics that is typeset by MathJax. They are listed with their default values. To set any of these options, include a ``MathMenu`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MathMenu: { delay: 600 } }); would set the ``delay`` option to 600 milliseconds. .. describe:: delay: 150 This is the hover delay for the display (in milliseconds) for submenus in the contextual menu: when the mouse is over a submenu label for this long, the menu will appear. (The submenu also will appear if you click on its label.) .. describe:: showRenderer: true This controls whether the "Math Renderer" item will be displayed in the "Math Settings" submenu of the MathJax contextual menu. It allows the user to change between the `HTML-CSS`, `NativeMML`, and `SVG` output processors for the mathematics on the page. Set to ``false`` to prevent this menu item from showing. .. describe:: showFontMenu: false This controls whether the "Font Preference" item will be displayed in the "Math Settings" submenu of the MathJax contextual menu. This submenu lets the user select what font to use in the mathematics produced by the `HTML-CSS` output processor. Note that changing the selection in the font menu will cause the page to reload. Set to ``false`` to prevent this menu item from showing. .. describe:: showLocale: true This controls whether the "Language" item will be displayed in the MathJax contextual menu. This submenu allows the user to select the language to use for the MathJax user interface, including the contextual menu, the about and help dialogs, the message box at the lower left, and any warning messages produced by MathJax. Set this to ``false`` to prevent this menu item from showing. This will force the user to use the language you have set for MathJax. .. describe:: showMathPlayer: true This controls whether the "MathPlayer" item will be displayed in the "Math Settings" submenu of the MathJax contextual menu. This submenu lets the user select what events should be passed on to the `MathPlayer plugin `_, when it is present. Mouse events can be passed on (so that clicks will be processed by MathPlayer rather than MathJax), and menu events can be passed on (to allow the user access to the MathPlayer menu). Set to ``false`` to prevent this menu item from showing. .. describe:: showContext: false This controls whether the "Contextual Menu" item will be displayed in the "Math Settings" submenu of the MathJax contextual menu. It allows the user to decide whether the MathJax menu or the browser's default contextual menu will be shown when the context menu click occurs over mathematics typeset by MathJax. Set to ``false`` to prevent this menu item from showing. .. describe:: semanticsAnnotations: { ... } These are the settings for the Annotation submenu of the "Show Math As" menu. If the ```` root element 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. For example, ``"TeX": ["TeX", "LaTeX", "application/x-tex"]`` will map an annotation with an encoding of ``"TeX"``, ``"LaTeX"``, or ``"application/x-tex"`` to the ``"TeX"`` menu. .. describe:: windowSettings: { ... } These are the settings for the ``window.open()`` call that creates 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. .. describe:: styles: {} This is a list of CSS declarations for styling the menu components. See the definitions in ``extensions/MathMenu.js`` for details of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/other/MathZoom.rst������������������������������������������������0000644�0000000�0000000�00000003101�13213762601�016625� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-MathZoom: ********************** The MathZoom extension ********************** The options below control the operation of the Math-Zoom feature that allows users to see an enlarged version of the mathematics when they click or hover over typeset mathematics. They are listed with their default values. To set any of these options, include a ``MathZoom`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MathZoom: { styles: { "#MathJax_Zoom": { "background-color": "#0000F0" } } } }); would set the background color of the Zoom box to a very light blue. Mathematics is zoomed when the user "triggers" the zoom by an action, either clicking on the mathematics, double-clicking on it, or holding the mouse still over it (i.e., "hovering"). Which trigger is used is set by the user via the math contextual menu (or by the author using the ``menuSettings`` configuration section of the `core configuration options `). .. describe:: delay: 500 This value is now stored as the ``hover`` parameter in the :ref:`MathEvents ` configuration options, and will have no effect if given here. .. describe:: styles: {} This is a list of CSS declarations for styling the zoomed mathematics. See the definitions in ``extensions/MathZoom.js`` for details of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/other/Safe.rst����������������������������������������������������0000644�0000000�0000000�00000014460�13213762601�015757� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-Safe: ****************** The Safe extension ****************** The options below control the operation of the `Safe` extension that is run when you include ``"Safe.js"`` in the `extensions` array of your configuration, or include ``Safe`` in the ``config=`` options when you load ``MathJax.js``. They are listed with their default values. To set any of these options, include a ``Safe`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ Safe: { allow: { URLs: "safe", classes: "safe", cssIDs: "safe", styles: "safe", fontsize: "all", require: "safe" } } }); would set the ``fontsize`` option to ``"all"``, and the others to ``"safe"`` (these are described below). The Safe extension affects both the TeX input and MathML input jax. .. describe:: allow: { ... } This block contains the flags that control what the Safe extension will allow, and what it will block. The flags can be set to ``"all"``, ``"none"``, or ``"safe"``. When set to ``"all"``, no filtering is done for these values (this gives MathJax's default behavior). When set to ``"none"``, these values are always filtered out. When set to ``"safe"``, then only some values are allowed, as described below. .. describe:: URLs: "safe" When set to ``"safe"`` only URL's with protocols that are listed in the ``safeProtocols`` property (see below) are allowed as targets of ``href`` attributes or the ``\href`` macro. By default, these are ``http://``, ``https://``, and ``file://`` URL's. .. describe:: classes: "safe" When set to ``"safe"``, only class names that begin with ``MJX-`` and contain only letters, numbers, or the characters ``-``, ``_``, or ``.`` are allowed. .. describe:: cssIDs: "safe" When set to ``"safe"``, only ID's that begin with ``MJX-`` and contain only letters, numbers, or the characters ``-``, ``_``, or ``.`` are allowed. .. describe:: styles: "safe" When set to ``"safe"``, only styles taken from a predefined set of styles are allowed to be given. These are listed in the ``safeStyles`` property (see below). .. describe:: require: "safe" When set to ``"safe"``, only the extensions listed in the ``safeRequire`` property (see below) are allowed to be loaded by the ``\require{}`` macro. .. describe:: fontsize: "all" When set to ``"safe"``, MathJax will try to limit the font size to sizes between those given by the ``sizeMin`` and ``sizeMax`` properties. These are .7 and 1.44 by default, which means sizes between ``\scriptsize`` and ``\large`` are allowed. This also filters MathML ``fontsize``, ``mathsize``, and ``scriptminsize`` attributes, but here, ``"safe"`` acts as ``"none"``, since they are given in sizes with units, and the actual size of the units is not determined at input time (it is part of the output processing). In addition, the ``scriptlevel`` attribute is restricted to non-negative values (so scripts can't be made larger), and the ``scriptsizemultiplier`` is restricted to being no larger than 1, and no less than .6. .. describe:: sizeMin: .7 This is the minimum font size (in em's) that the TeX input jax will allow when ``fontsize`` is set to ``"safe"`` above. The default is the size of ``\scriptsize``. Values less than this are set to this value. .. describe:: sizeMax: 1.44 This is the maximum font size (in em's) that the TeX input jax will allow when ``fontsize`` is set to ``"safe"`` above. The default is the size of ``\large``. Values larger than this are set to this value. .. describe:: safeProtocols: {...} This is an object that lists the protocols that can be used in ``href`` attributes and the ``\href`` macro when ``URLs`` is set to ``"safe"`` above. The default is .. code-block:: javascript safeProtocols: { http: true, https: true, file: true, javascript: false } Note that if a protocol doesn't appear in the list, it is assumed to be ``false``, so technically, ``javascript`` need not have been listed, but it is given to make it explicit that it should not be allowed. .. describe:: safeStyles: {...} This is an object that lists the style properties that can be used in MathML ``style`` attributes and the ``\style`` and ``\bbox`` macros when ``styles`` is set to ``"safe"`` in the ``allowed`` property above. The default is .. code-block:: javascript safeStyles: { color: true, backgroundColor: true, border: true, cursor: true, margin: true, padding: true, textShadow: true, fontFamily: true, fontSize: true, fontStyle: true, fontWeight: true, opacity: true, outline: true } Any style property that doesn't appear on this list is not allowed to be entered and will be removed (silently) from the style definition. .. describe:: safeRequire: {...} This is an object that lists the TeX extensions that can be loaded via the ``\require{}`` macro when ``require`` is set to ``"safe"`` in the ``allowed`` property above. The default is .. code-block:: javascript safeRequire: { action: true, amscd: true, amsmath: true, amssymbols: true, autobold: false, "autoload-all": false, bbox: true, begingroup: true, boldsymbol: true, cancel: true, color: true, enclose: true, extpfeil: true, HTML: true, mathchoice: true, mhchem: true, newcommand: true, noErrors: false, noUndefined: false, unicode: true, verb: true } These configuration options give you a lot of control over what actions MathJax is allowed to take. It is also possible override the individual filtering functions in order to customize the filtering even further, should that be needed. See the code for the details of the function names and their definitions. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/other/index.rst���������������������������������������������������0000644�0000000�0000000�00000000460�13213762601�016203� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############# Other options ############# .. toctree:: :maxdepth: 1 The MathMenu options The MathZoom options The MathEvents options The FontWarnings options The Safe options The MatchWebFonts options ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/output-processors/������������������������������������������������0000755�0000000�0000000�00000000000�13213762601�016761� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/output-processors/CommonHTML.rst����������������������������������0000644�0000000�0000000�00000005464�13213762601�021441� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-CommonHTML: ******************************* The CommonHTML output processor ******************************* The options below control the operation of the CommonHTML output processor that is run when you include ``"output/CommonHTML"`` in the `jax` array of your configuration or load a combined configuration file that includes the CommonHTML output jax. They are listed with their default values. To set any of these options, include an ``CommonHTML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ CommonHTML: { scale: 120 } }); would set the ``scale`` option to 120%. .. describe:: scale: 100 The scaling factor (as a percentage) of math with respect to the surrounding text. The `CommonHTML` output processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics. .. describe:: minScaleAdjust: 50 This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small. .. describe:: mtextFontInherit: false This setting controls whether ```` elements will be typeset using the math fonts or the font of the surrounding text. When ``false``, the font for ``mathvariant="normal"`` will be used; when ``true``, the font will be inherited from the surrounding paragraph. .. describe:: linebreaks: {} This is an object that configures automatic linebreaking in the CommonHTML output. In order to be backward compatible with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line breaks if you want automatic ones. The object contains the following values: .. describe:: automatic: false This controls the automatic breaking of expressions: when ``false``, only ``linebreak="newline"`` is processed; when ``true``, line breaks are inserted automatically in long expressions. .. describe:: width: "container" 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. mathjax-docs-2.7+20171212/options/output-processors/HTML-CSS.rst0000644000000000000000000002106213213762601020706 0ustar .. _configure-HTML-CSS: ***************************** The HTML-CSS output processor ***************************** The options below control the operation of the HTML-CSS output processor that is run when you include ``"output/HTML-CSS"`` in the `jax` array of your configuration or load a combined configuration file that includes the HTML-CSS output jax. They are listed with their default values. To set any of these options, include a ``"HTML-CSS"`` section in your :meth:`MathJax.Hub.Config()` call. Note that, because of the dash, you need to enclose the name in quotes. For example .. code-block:: javascript MathJax.Hub.Config({ "HTML-CSS": { preferredFont: "STIX" } }); would set the ``preferredFont`` option to the :term:`STIX` fonts. .. describe:: scale: 100 The scaling factor (as a percentage) of math with respect to the surrounding text. The `HTML-CSS` output processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics. .. describe:: minScaleAdjust: 50 This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small. .. describe:: availableFonts: ["STIX","TeX"] 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 :term:`STIX` fonts, or set it to an empty list, `[]`, if you want to force MathJax to use web-based or image fonts. .. describe:: preferredFont: "TeX" Which font to prefer out of the ``availableFonts`` list, when more than one is available on the user's computer. Set it to ``null`` if you want MathJax to use web-based or image fonts. .. describe:: webFont: "TeX" This is the web-based font to use when none of the fonts listed above are available on the user's computer. The possible values are ``TeX``, ``STIX-Web``, ``Asana-Math``, ``Neo-Euler``, ``Gyre-Pagella``, ``Gyre-Termes`` and ``Latin-Modern``. Note that not all mathematical characters are available in all fonts (e.g., Neo-Euler does not include italic characters), so some mathematics may work better in some fonts than in others. The ``STIX-Web`` font is the most complete. These fonts are stored in the ``fonts/HTML-CSS`` folder in the MathJax directory. Set this to ``null`` to disable web fonts. .. describe:: imageFont: "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 (they are stored in the ``fonts/HTML-CSS`` directory). Set this to ``null`` if you want to prevent the use of image fonts (e.g., you have deleted or 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. .. describe:: undefinedFamily: "STIXGeneral, 'Arial Unicode MS', serif" 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 web 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. .. describe:: mtextFontInherit: false This setting controls whether ```` elements will be typeset using the math fonts or the font of the surrounding text. When ``false``, the font for ``mathvariant="normal"`` will be used; when ``true``, the font will be inherited from the surrounding paragraph. .. describe:: EqnChunk: 50 EqnChunkFactor: 1.5 EqnChunkDelay: 100 These values control how "chunky" the display of mathematical expressions will be; that is, how often the equations will be updated as they are processed. ``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. .. describe:: matchFontHeight: true This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of the surrounding text. See the :ref:`MatchWebFonts options ` for finer control, especially if you are using Web fonts. .. describe:: linebreaks: {} This is an object that configures automatic linebreaking in the HTML-CSS output. In order to be backward compatible with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line breaks if you want automatic ones. The object contains the following values: .. describe:: automatic: false This controls the automatic breaking of expressions: when ``false``, only ``linebreak="newline"`` is processed; when ``true``, line breaks are inserted automatically in long expressions. .. describe:: width: "container" 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. .. describe:: styles: {} This is a list of CSS declarations for styling the HTML-CSS output. See the definitions in ``jax/output/HTML-CSS/config.js`` for some examples of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. .. describe:: showMathMenu: true This value has been moved to the core configuration block, since it applies to all output jax, but it will still be honored (for now) if it is set here. See the :ref:`Core configuration options ` for more details. .. describe:: tooltip: { ... } This sets the configuration options for ```` elements with ``actiontype="tooltip"``. (See also the ``#MathJax_Tooltip`` style setting in ``jax/output/HTML-CSS/config.js``, which can be overridden using the ``styles`` option above.) The ``tooltip`` section can contain the following options: .. describe:: delayPost: 600 The delay (in milliseconds) before the tooltip is posted after the mouse is moved over the ``maction`` element. .. describe:: delayClear: 600 The delay (in milliseconds) before the tooltop is cleared after the mouse moves out of the ``maction`` element. .. describe:: offsetX: 10 offsetY: 5 These are the offset from the mouse position (in pixels) where the tooltip will be placed. .. describe:: noReflows: true This value determines if the HTML-CSS output makes additional measurements during layout for better layout quality, in particular with respect to unknown Unicode characters. As these measurements require reflow setting this to ``false`` will reduce performance but can help resolve layout issues. mathjax-docs-2.7+20171212/options/output-processors/MMLorHTML.rst0000644000000000000000000000466413213762601021200 0ustar .. _configure-MMLorHTML: ************************************************ The MMLorHTML configuration options (Deprecated) ************************************************ .. warning:: This extension has been deprecated in MathJax v2.6. The options below control the operation of the MMLorHTML configuration file that is run when you include ``"MMLorHTML.js"`` in the `config` array of your configuration, or when you use one of the combined configuration files that ends with ``_HTMLorMML``. They are listed with their default values. To set any of these options, include a ``MMLorHTML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ MMLorHTML: { prefer: { Opera: "MML" } } }); would set the ``prefer`` option so that the Opera browser would prefer MathML to HTML-CSS output (while leaving the settings for other browsers unchanged). Note that if you use the ``MMLorHTML.js`` configuration file, you should **not** specify an output processor in the `jax` array of your configuration; `MMLorHTML` will fill that in for you. .. describe:: prefer: { MSIE: "MML", Firefox: "HTML", Safari: "HTML", Chrome: "HTML", Opera: "HTML", other: "HTML" } This lets you set the preferred renderer on a browser-by-browser basis. You set the browser to either ``"MML"`` or ``"HTML"`` depending on whether you want to use the `NativeMML` or `HTML-CSS` output processor. Note that although Opera and Safari do process some MathML natively, their support is not sufficient to handle the more complicated output generated by MathJax, so their settings are ``"HTML"`` by default. Although Firefox does support a large subset of MathJax, it does not implement all the features needed by MathJax, and so it is also set to ``"HTML"`` by default (this is new in v2.0). Note that users can still use the MathJax contextual menu to select a different renderer after the default one has been chosen by ``MMLorHTML.js``. MathJax produces MathML that models the underlying mathematics as best it can, rather than using complicated hacks to improve output for a particular MathML implementation. When you make the choice to use the NativeMML output processor, you are making a trade-off: gaining speed at the expense of quality and reliability, a decision that should not be taken lightly. mathjax-docs-2.7+20171212/options/output-processors/NativeMML.rst0000644000000000000000000000441413213762601021312 0ustar .. _configure-NativeMML: ****************************** The NativeMML output processor ****************************** The options below control the operation of the NativeMML output processor that is run when you include ``"output/NativeMML"`` in the `jax` array of your configuration or load a combined configuration file taht includes the NativeMML output jax. They are listed with their default values. To set any of these options, include a ``NativeMML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ NativeMML: { scale: 105 } }); would set the ``scale`` option to 105 percent. .. describe:: scale: 100 The scaling factor (as a percentage) of math with respect to the surrounding text. The `NativeMML` output processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics. .. describe:: minScaleAdjust: 50 This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small. .. describe:: matchFontHeight: true This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of the surrounding text. See the :ref:`MatchWebFonts options ` for finer control, especially if you are using Web fonts. .. describe:: showMathMath: true showMathMenuMSIE: true These values have been moved to the core configuration block, since it applies to all output jax, but they will still be honored (for now) if it is set here. See the :ref:`Core configuration options ` for more details. .. describe:: styles: {} This is a list of CSS declarations for styling the NativeMML output. See the definitions in ``jax/output/NativeMML/config.js`` for some examples of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. mathjax-docs-2.7+20171212/options/output-processors/PlainSource.rst0000644000000000000000000000256413213762601021746 0ustar .. _configure-PlainSource: ******************************** The PlainSource output processor ******************************** The PlainSource output processor displays plain text input when possible. I.e., it will display the raw input data from TeX or Asciimath input, embedded TeX or AsciiMath annotations from MathML input, and MathML if neither annotation format is found. The options below control the operation of the PlainSource output processor that is run when you include ``"output/PlainSource"`` in the `jax` array of your configuration. They are listed with their default values. To set any of these options, include an ``PlainSource`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ PlainSource: { styles: { ".MathJax_PlainSource_Display": { "text-align": "center", margin: ".75em 0px", "white-space":"pre" } } } }); would configure some CSS properties of the resulting HTML markup. .. describe:: styles: {} This is a list of CSS declarations for styling the PlainSource output. See the definitions in ``jax/output/SVG/config.js`` for some examples of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. mathjax-docs-2.7+20171212/options/output-processors/PreviewHTML.rst0000644000000000000000000000547713213762601021636 0ustar .. _configure-PreviewHTML: ******************************** The PreviewHTML output processor ******************************** The options below control the operation of the PreviewHTML output processor that is run when you include ``"output/PreviewHTML"`` in the `jax` array of your configuration or load a combined configuration file that includes the PreviewHTML output jax. They are listed with their default values. To set any of these options, include an ``PreviewHTML`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ PreviewHTML: { scale: 120 } }); would set the ``scale`` option to 120%. .. describe:: scale: 100 The scaling factor (as a percentage) of math with respect to the surrounding text. The `PreviewHTML` output processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics. .. describe:: minScaleAdjust: 50 This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small. .. describe:: mtextFontInherit: false This setting controls whether ```` elements will be typeset using the math fonts or the font of the surrounding text. When ``false``, the font for ``mathvariant="normal"`` will be used; when ``true``, the font will be inherited from the surrounding paragraph. .. describe:: linebreaks: {} This is an object that configures automatic linebreaking in the PreviewHTML output. In order to be backward compatible with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line breaks if you want automatic ones. The object contains the following values: .. describe:: automatic: false This controls the automatic breaking of expressions: when ``false``, only ``linebreak="newline"`` is processed; when ``true``, line breaks are inserted automatically in long expressions. .. describe:: width: "container" 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. mathjax-docs-2.7+20171212/options/output-processors/SVG.rst0000644000000000000000000001652613213762601020164 0ustar .. _configure-SVG: ************************ The SVG output processor ************************ The options below control the operation of the SVG output processor that is run when you include ``"output/SVG"`` in the `jax` array of your configuration or load a combined configuration file that includes the SVG output jax. They are listed with their default values. To set any of these options, include an ``SVG`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ SVG: { scale: 120 } }); would set the ``scale`` option to 120%. .. describe:: scale: 100 The scaling factor (as a percentage) of math with respect to the surrounding text. The `SVG` output processor tries to match the ex-size of the mathematics with that of the text where it is placed, but you may want to adjust the results using this scaling factor. The user can also adjust this value using the contextual menu item associated with the typeset mathematics. .. describe:: minScaleAdjust: 50 This gives a minimum scale (as a percent) for the scaling used by MathJax to match the equation to the surrounding text. This will prevent MathJax from making the mathematics too small. .. describe:: font: "TeX" This is the font to use for rendering the mathematics. The possible values are ``TeX``, ``STIX-Web``, ``Asana-Math``, ``Neo-Euler``, ``Gyre-Pagella``, ``Gyre-Termes`` and ``Latin-Modern``. Note that not all mathematical characters are available in all fonts (e.g., Neo-Euler does not include italic characters), so some mathematics may work better in some fonts than in others. The ``STIX-Web`` font is the most complete. .. describe:: blacker: 1 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, but remember that not all displays will act the same, so a value that is good for you may not be good for everyone. .. describe:: undefinedFamily: "STIXGeneral, 'Arial Unicode MS', serif" This is the font-family CSS value used for characters that are not in the selected font (e.g., this is where to look for characters not included in the MathJax TeX 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. .. describe:: mtextFontInherit: false This setting controls whether ```` elements will be typeset using the math fonts or the font of the surrounding text. When ``false``, the font for ``mathvariant="normal"`` will be used; when ``true``, the font will be inherited from the surrounding paragraph. .. describe:: addMMLclasses: false This controls whether the MathML structure is retained and CSS classes are added to mark the original MathML elements (as in the output from the `HTML-CSS` output jax). 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. .. describe:: useFontCache: true This controls whether the SVG output uses ```` elements to re-use font paths rather than repeat paths every time. If ``useGlobalCache`` (see below) is set to ``false``, this will still reduce duplication of paths while keeping each SVG self-contained. .. describe:: useGlobalCache: true When set to ``true`` the SVG Output stores paths (corresponding to "fonts" in the SVG output) in a global SVG object using ```` elements so that it can re-use them in all equations via ```` elements (much like a font file allows re-use of characters across the document). While set to ``true`` by default, it will have no effect if ``useFontCache`` is set to ``false``. .. describe:: EqnChunk: 50 EqnChunkFactor: 1.5 EqnChunkDelay: 100 These values control how "chunky" the display of mathematical expressions will be; that is, how often the equations will be updated as they are processed. ``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. .. describe:: matchFontHeight: true This option indicates whether MathJax should try to adjust the x-height of equations to match the x-height of the surrounding text. See the :ref:`MatchWebFonts options ` for finer control, especially if you are using Web fonts. .. describe:: linebreaks: {} This is an object that configures automatic linebreaking in the SVG output. In order to be backward compatible with earlier versions of MathJax, only explicit line breaks are performed by default, so you must enable line breaks if you want automatic ones. The object contains the following values: .. describe:: automatic: false This controls the automatic breaking of expressions: when ``false``, only ``linebreak="newline"`` is processed; when ``true``, line breaks are inserted automatically in long expressions. .. describe:: width: "container" 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. .. describe:: styles: {} This is a list of CSS declarations for styling the SVG output. See the definitions in ``jax/output/SVG/config.js`` for some examples of what are defined by default. See :ref:`CSS Style Objects ` for details on how to specify CSS style in a JavaScript object. .. describe:: tooltip: { ... } This sets the configuration options for ```` elements with ``actiontype="tooltip"``. (See also the ``#MathJax_Tooltip`` style setting in ``jax/output/SVG/config.js``, which can be overridden using the ``styles`` option above.) The ``tooltip`` section can contain the following options: .. describe:: delayPost: 600 The delay (in milliseconds) before the tooltip is posted after the mouse is moved over the ``maction`` element. .. describe:: delayClear: 600 The delay (in milliseconds) before the tooltop is cleared after the mouse moves out of the ``maction`` element. .. describe:: offsetX: 10 offsetY: 5 These are the offset from the mouse position (in pixels) where the tooltip will be placed. mathjax-docs-2.7+20171212/options/output-processors/index.rst0000644000000000000000000000076213213762601020627 0ustar ######################## Output processor options ######################## .. toctree:: :maxdepth: 1 The CommonHTML output processor options The HTML-CSS output processor options The NativeMML output processor options The SVG output processor options The PreviewHTML output processor options The PlainSource output processor options The MMLorHTML configuration options [Deprecated] ��������������mathjax-docs-2.7+20171212/options/preprocessors/����������������������������������������������������0000755�0000000�0000000�00000000000�13213762601�016132� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/preprocessors/asciimath2jax.rst�����������������������������������0000644�0000000�0000000�00000011407�13213762601�021416� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-asciimath2jax: ****************************** The asciimath2jax Preprocessor ****************************** The options below control the operation of the `asciimath2jax` preprocessor that is run when you include ``"asciimath2jax.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``asciimath2jax`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ asciimath2jax: { delimiters: [['`','`'], ['$','$']] } }); would set the ASCIIMath delimiters for the `asciimath2jax` preprocessor to include dollar signs as well as back-ticks. .. describe:: delimiters: [['`','`']] Array of pairs of strings that are to be used as math delimiters. The first in each pair is the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. For example, .. code-block:: javascript delimiters: [ ['$','$'], ['`','`'] ] would cause `asciimath2jax` to look for ``$...$`` and ```...``` as delimiters for inline mathematics. (Note that the single dollar signs are not enabled by default because they are used too frequently in normal text, so if you want to use them for math delimiters, you must specify them explicitly.) Note that the delimiters can't look like HTML tags (i.e., can't include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as your math delimiters. .. describe:: preview: "AsciiMath" This controls whether `asciimath2jax` inserts ``MathJax_Preview`` spans to make a preview available, and what preview to use, when it locates in-line or display mathematics in the page. The default is ``"AsciiMath"``, which means use the ASCIIMath code as the preview (which will be visible until it is processed by MathJax). Set to ``"none"`` to prevent 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. Examples: .. code-block:: javascript preview: ["[math]"], // insert the text "[math]" as the preview .. code-block:: javascript preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview See the :ref:`description of HTML snippets ` for details on how to represent HTML code in this way. .. describe:: skipTags: ["script","noscript","style","textarea","pre","code"] 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. .. describe:: ignoreClass: "asciimath2jax_ignore" 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 inserted into one that requires your pattern to match a complete word, so setting ``ignoreClass: "class2"`` would cause it to match an element with ``class="class1 class2 class3"`` but not ``class="myclass2"``. Note that you can assign several classes by separating them by the vertical line character (``|``). For instance, with ``ignoreClass: "class1|class2"`` any element assigned a class of either ``class1`` or ``class2`` will be skipped. .. describe:: processClass: "asciimath2jax_process" This is the class name used to mark elements whose contents *should* be processed by `asciimath2jax`. This is used to restart processing within tags that have been marked as ignored via the ``ignoreClass`` or to cause a tag that appears in the ``skipTags`` list to be processed rather than skipped. Note that this is a regular expression, and so you need to be sure to quote any `regexp` special characters. The pattern is inserted into one that requires your pattern to match a complete word, so setting ``processClass: "class2"`` would cause it to match an element with ``class="class1 class2 class3"`` but not ``class="myclass2"``. Note that you can assign several classes by separating them by the vertical line character (``|``). For instance, with ``processClass: "class1|class2"`` any element assigned a class of either ``class1`` or ``class2`` will have its contents processed. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/preprocessors/index.rst�������������������������������������������0000644�0000000�0000000�00000000455�13213762601�017777� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#################### Preprocessor options #################### .. toctree:: :maxdepth: 1 The tex2jax preprocessor options The mml2jax preprocessor options The asciimath2jax preprocessor options The jsMath2jax preprocessor options �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/preprocessors/jsMath2jax.rst��������������������������������������0000644�0000000�0000000�00000003104�13213762601�020675� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-jsMath2jax: *************************** The jsMath2jax Preprocessor *************************** The options below control the operation of the `jsMath2jax` preprocessor that is run when you include ``"jsMath2jax.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``jsMath2jax`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ jsMath2jax: { preview: "none" } }); would set the ``preview`` parameter to ``"none"``. .. describe:: preview: "TeX" This controls whether `jsMath2jax` inserts ``MathJax_Preview`` spans to make a preview available, and what preview to use, when it locates in-line or display mathematics in the page. The default is ``"TeX"``, which means use the TeX code as the preview (which will be visible until it is processed by MathJax). Set to ``"none"`` to prevent 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. Examples: .. code-block:: javascript preview: ["[math]"], // insert the text "[math]" as the preview .. code-block:: javascript preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview See the :ref:`description of HTML snippets ` for details on how to represent HTML code in this way. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/preprocessors/mml2jax.rst�����������������������������������������0000644�0000000�0000000�00000003670�13213762601�020244� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-mml2jax: ************************ The mml2jax Preprocessor ************************ The options below control the operation of the `mml2jax` preprocessor that is run when you include ``"mml2jax.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``mml2jax`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ mml2jax: { preview: "mathml" } }); would set the ``preview`` parameter to ``"mathml"``. .. describe:: preview: "mathml" This controls whether `mml2jax` inserts ``MathJax_Preview`` spans to make a preview available, and what preview to use, when it locates mathematics on the page. Possible values are: ``"mathml"``, ``"alttext"``, , ``"altimg"``, ``"none"``, or an HTML snippet. The default is ``"mathml"``, in which case MathJax keeps the content of 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 ``"altimg"`` to use an image described by the ``altimg*`` attributes of the ```` element. 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). Examples: .. code-block:: javascript preview: ["[math]"], // insert the text "[math]" as the preview .. code-block:: javascript preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview See the :ref:`description of HTML snippets ` for details on how to represent HTML code in this way. ������������������������������������������������������������������������mathjax-docs-2.7+20171212/options/preprocessors/tex2jax.rst�����������������������������������������0000644�0000000�0000000�00000015134�13213762601�020255� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-tex2jax: ************************ The tex2jax Preprocessor ************************ The options below control the operation of the `tex2jax` preprocessor that is run when you include ``"tex2jax.js"`` in the `extensions` array of your configuration. They are listed with their default values. To set any of these options, include a ``tex2jax`` section in your :meth:`MathJax.Hub.Config()` call. For example .. code-block:: javascript MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ['\\(','\\)'] ] } }); would set the ``inlineMath`` delimiters for the `tex2jax` preprocessor. .. describe:: inlineMath: [['\\\(','\\\)']] Array of pairs of strings that are to be used as in-line math delimiters. The first in each pair is the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. For example, .. code-block:: javascript inlineMath: [ ['$','$'], ['\\(','\\)'] ] would cause `tex2jax` to look for ``$...$`` and ``\(...\)`` as delimiters for inline mathematics. (Note that the single dollar signs are not enabled by default because they are used too frequently in normal text, so if you want to use them for math delimiters, you must specify them explicitly.) Note that the delimiters can't look like HTML tags (i.e., can't include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as your math delimiters. .. describe:: displayMath: [ ['$$','$$'], ['\\\[','\\\]'] ] Array of pairs of strings that are to be used as delimiters for displayed equations. The first in each pair is the initial delimiter and the second is the terminal delimiter. You can have as many pairs as you want. Note that the delimiters can't look like HTML tags (i.e., can't include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. You can only include text, not tags, as your math delimiters. .. describe:: balanceBraces: true, This value determines whether `tex2jax` requires braces to be balanced within math delimiters (which allows for nested dollar signs). Set to ``false`` to get pre-v2.0 compatibility. When ``true``, .. code-block:: latex $y = x^2 \hbox{ when $x > 2$}$. will be properly handled as a single expression. When ``false``, it would be interpreted as two separate expressions, each with improperly balanced braces. .. describe:: processEscapes: false When set to ``true``, you may use ``\$`` to represent a literal dollar sign, rather than using it as a math delimiter. When ``false``, ``\$`` will not be altered, and the dollar sign may be considered part of a math delimiter. Typically this is set to ``true`` if you enable the ``$ ... $`` in-line delimiters, so you can type ``\$`` and `tex2jax` will convert it to a regular dollar sign in the rendered document. .. describe:: processRefs: true When set to ``true``, MathJax will process ``\ref{...}`` outside of math mode. .. describe:: processEnvironments: true When ``true``, `tex2jax` looks not only for the in-line and display math delimiters, but also for LaTeX environments (``\begin{something}...\end{something}``) and marks them for processing by MathJax. When ``false``, LaTeX environments will not be processed outside of math mode. .. describe:: preview: "TeX" This controls whether `tex2jax` inserts ``MathJax_Preview`` spans to make a preview available, and what preview to use, when it locates in-line or display mathematics in the page. The default is ``"TeX"``, which means use the TeX code as the preview (which will be visible until it is processed by MathJax). Set to ``"none"`` to prevent 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. Examples: .. code-block:: javascript preview: ["[math]"], // insert the text "[math]" as the preview .. code-block:: javascript preview: [["img",{src: "/images/mypic.jpg"}]], // insert an image as the preview See the :ref:`description of HTML snippets ` for details on how to represent HTML code in this way. .. describe:: skipTags: ["script","noscript","style","textarea","pre","code"] 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. .. describe:: ignoreClass: "tex2jax_ignore" 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 inserted into one that requires your pattern to match a complete word, so setting ``ignoreClass: "class2"`` would cause it to match an element with ``class="class1 class2 class3"`` but not ``class="myclass2"``. Note that you can assign several classes by separating them by the vertical line character (``|``). For instance, with ``ignoreClass: "class1|class2"`` any element assigned a class of either ``class1`` or ``class2`` will be skipped. .. describe:: processClass: "tex2jax_process" This is the class name used to mark elements whose contents *should* be processed by `tex2jax`. This is used to restart processing within tags that have been marked as ignored via the ``ignoreClass`` or to cause a tag that appears in the ``skipTags`` list to be processed rather than skipped. Note that this is a regular expression, and so you need to be sure to quote any `regexp` special characters. The pattern is inserted into one that requires your pattern to match a complete word, so setting ``processClass: "class2"`` would cause it to match an element with ``class="class1 class2 class3"`` but not ``class="myclass2"``. Note that you can assign several classes by separating them by the vertical line character (``|``). For instance, with ``processClass: "class1|class2"`` any element assigned a class of either ``class1`` or ``class2`` will have its contents processed. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.7+20171212/output.rst����������������������������������������������������������������0000644�0000000�0000000�00000040202�13213762601�013616� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _output-formats: ********************** MathJax Output Formats ********************** MathJax Output Components ========================= Currently, MathJax can render math in three ways: - Using HTML-with-CSS to lay out the mathematics, - Using :term:`SVG` to lay out the mathematics, or - Using a browser's native MathML support. These are implemented by the `CommonHTML`, `HTML-CSS`, and `PreviewHTML` output processors, the `SVG` output processor, and the `NativeMML` output processor respectively. In addition, the `PlainSource` output is a convenience and accessibility output, rendering the source as plain text. If you are using one of the combined configuration files, then this will select one of these output processors for you. If the config file ends in ``_CHTML``, then it is the CommonHTML output processor, if it ends in ``_HTML``, then it is the HTML-CSS output processor, and if it ends in ``_SVG`` then the SVG output processor will be used. If it ends in ``_HTMLorMML``, HTML-CSS output will be used except on Internet Explorer 9 or below with the MathPlayer plugin; cf. :ref:`mml-or-html`. If you are performing your own in-line or file-based configuration, you select which one you want to use by including either ``"output/CommonHTML"``, ``"output/SVG"``, or ``"output/NativeMML"`` in the `jax` array of your MathJax configuration. For example .. code-block:: javascript jax: ["input/TeX","output/CommonHTML"] would specify TeX input and CommonHTML output for the mathematics in your document. The **CommonHTML output processor** produces high-quality output in all modern browsers, with results that are consistent across browsers and operating systems. This is MathJax's primary output mode since MathJax v2.6. Its major advantage is its quality, consistency, and speed as well as support for server-side generation. Its browser supports starts with IE9 and equivalent browsers and it degrades gracefully on older browsers. The CommonHTML output uses web-based fonts so that users don't have to have math fonts installed on their computers. It currently only supports MathJax's default TeX fonts. The **HTML-CSS output processor** produces high-quality output in all browsers, with results that are consistent across browsers and operating systems. This was MathJax's primary output mode prior to MathJax v2.6. Its major advantage is its quality and consistency on legacy browsers starting with IE6. The HTML-CSS output uses web-based fonts so that users don't have to have math fonts installed on their computers but can use locally installed fonts instead. The **SVG output processor** uses `Scalable Vector Graphics` to render the mathematics on the page. SVG is supported in all the major browsers and most mobile devices; note, however, that Internet Explorer prior to IE9 does not support SVG, and IE9 only does in "IE9 standards mode", nor its emulation modes for earlier versions. The SVG output mode is high quality and slightly faster than HTML-CSS, and it does not suffer from some of the font-related issues that HTML-CSS does, so prints well in all browsers. Since it uses SVG data instead of font files, it is not affected by user based web-font blocking. The disadvantages of this mode are the following: first, it does not take advantage of locally installed fonts, and so only has access to the characters in its (pseudo) web-based fonts, and second, its variable-width tables become fixed size once they are typeset, and don't rescale if the window size changes (for example). Since equation numbers are handled through variable-width tables, that means equation numbers may not stay at the edge of the window if it is resized. The **NativeMML output processor** uses the browser's internal MathML support (if any) to render the mathematics. Currently, Firefox has native support for MathML, and IE has the `MathPlayer plugin `_ for rendering MathML. Opera has some built-in support for MathML that works well with simple equations, but fails with more complex formulas, so we don't recommend using the NativeMML output processor with Opera. Safari has some support for MathML since version 5.1, but the quality is not as high as either Firefox's implementation or IE with MathPlayer. Chrome, Konqueror, and most other browsers don't support MathML natively, but this may change in the future, since MathML is part of the HTML5 specification. The advantage of the NativeMML output processor is its speed, since native MathML support is usually faster than converting to HTML-with-CSS and SVG The disadvantage is that you are dependent on the browser's MathML implementation for your rendering, and these vary in quality of output and completeness of implementation. MathJax relies on features that are not available in some renderers (for example, Firefox's MathML support does not implement the features needed for labeled equations). While MathJax's NativeMML output processor works around various limitations of Firefox/Gecko and Safari/WebKit, the results using the NativeMML output processor may have spacing or other rendering problems that are outside of MathJax's control. The **PreviewHTML output processor** produces fast but low-quality output in all modern browsers. It is designed to serve as a fast preview mode as its layout quality is nowhere near the quality of the CommonHTML, HTML-CSS, and SVG output processors. Its major advantage is its speed. Its browser supports starts with IE8. It uses locally installed Times-like fonts and does not load any webfonts. The **PlainSource output processor** injects the plain text source of the equations instead; if the input is MathML, the output processor will prefer TeX and AsciiMath notation (in that order) if it is available in ```` elements. This output is a convenience output for users who prefer raw source, e.g., users who need to copy&paste larger document fragments and users of assistive technologies. .. _automatic-linebreaking: Automatic Line Breaking ======================= The CommonHTML, HTML-CSS, and SVG output processors implement (most of) the MathML3 automatic line-breaking specification. (The NativeMML output processor relies on the browser's native MathML support to handle line breaking when it is used.) Since line-breaking takes extra processing and so can slow down the mathematical output, it is off by default, but you can enable it by adding, e.g., .. code-block:: html to your page just before the `` .. _ie-emulation-modes: Internet Explorer Emulation modes ================================= Internet Explorer provides so-called emulation modes for backward compatibility to its legacy versions. These emulation modes have been deprecated since Internet Explorer 11, cf. `Microsoft documentation `_. MathJax is fastest when in the standards mode of each IE version, so it is best to force the highest mode possible. That can be accomplished by adding .. code-block:: html at the top of the ```` section of your HTML documents. .. note:: This line must come at the beginning of the ````, before any stylesheets, scripts, or other content are loaded. In early versions, we recommended forcing IE8 and IE9 into IE7-emulation mode in order to get better performance. That is no longer necessary. .. _html-css-extensions: mathjax-docs-2.7+20171212/reference/0000755000000000000000000000000013213762601013464 5ustar mathjax-docs-2.7+20171212/reference/CSS-styles.rst0000644000000000000000000000563313213762601016176 0ustar .. _css-style-objects: ***************** CSS Style Objects ***************** Many MathJax components allow you to specify CSS styles that control the look of the elements they create. These are described using `CSS style objects`, which are JavaScript objects that represent standard CSS declarations. The main CSS style object is a collection of `name:value` pairs where the `name` is the CSS selector that is being defined, and the `value` is an object that gives the style for that selector. Most often, the selector will need to be enclosed in quotation marks, as it will contain special characters, so you would need to use ``"#myID"`` rather than just ``#myID`` and ``"ul li"`` rather than just ``ul li``. The value used to define the CSS style can either be a string containing the CSS definition, or a javascript object that is itself a collection of `name:value` pairs, where the `name` is the attribute being defined and `value` is the value that attribute should be given. Note that, since this is a JavaScript object, the pairs are separated by commas (not semi-colons) and the values are enclosed in quotation marks. If the name contains dashes, it should be enclosed in quotation marks as well. For example, ``jax/output/HTML-CSS/config.js`` includes the following declaration: .. code-block:: javascript styles: { ".MathJax_Display": { "text-align": "center", margin: "1em 0em" }, ".MathJax .merror": { "background-color": "#FFFF88", color: "#CC0000", border: "1px solid #CC0000", padding: "1px 3px", "font-style": "normal", "font-size": "90%" } } This defines two CSS styles, one for the selector ``.MathJax_Display``, which specifies its text alignment and margin settings, and a second for ``.MathJax .merror``, which specifies a background color, foreground color, border, and so on. You can add as many such definitions to a ``styles`` object as you wish. Note, however, that since this is a JavaScript object, the selectors must be unique (e.g., you can't use two definitions for ``"img"``, for example, as only the last one would be saved). If you need to use more than one entry for a single selector, you can add comments like ``/* 1 */`` and ``/* 2 */`` to the selector to make them unique. It is possible to include selectors like ``"@media print"``, in which case the value is a CSS style object. For example: .. code-block:: javascript styles: { "@media print": { ".MathJax .merror": { "background-color": "white", border: 0 } } } The various extensions and output processors include more examples of CSS style objects, so see the code for those files for additional samples. In particular, the ``extensions/MathMenu.js``, ``extensions/MathZoom.js``, ``extensions/FontWarnsing.js``, and ``jax/output/HTML-CSS/jax.js`` files include such definitions. mathjax-docs-2.7+20171212/reference/HTML-snippets.rst0000644000000000000000000000545713213762601016640 0ustar .. _html-snippets: ************************ Describing HTML snippets ************************ A number of MathJax configuration options allow you to specify an HTML snippet using a JavaScript object. This lets you include HTML in your configuration files even though they are not HTML files themselves. The format is fairly simple, but flexible enough to let you represent complicated HTML trees. An HTML snippet is an array consisting of a series of elements that format the HTML tree. Those elements are one of two things: either a string, which represents text to be included in the snippet, or an array, which represents an HTML tag to be included. In the latter case, the array consists of three items: a string that is the tag name (e.g., "img"), an optional object that gives attributes for the tag (as described below), and an optional HTML snippet array that gives the contents of the tag. When attributes are provided, they are given as `name:value` pairs, with the `name` giving the attribute name, and `value` giving its value. For example .. code-block:: javascript [["img",{src:"/images/mypic.jpg"}]] represents an HTML snippet that includes one element: an ```` tag with ``src`` set to ``/images/mypic.jpg``. That is, this is equivalent to .. code-block:: html Note that the snippet has two sets of square brackets. The outermost one is for the array that holds the snippet, and the innermost set is because the first (and only) element in the snippet is a tag, not text. Note that the code ``["img",{src:"/images/mypic.jpg"}]`` is invalid as an HTML snippet. It would represent a snippet that starts with "img" as text in the snippet (not a tag), but the second item is neither a string nor an array, and so is illegal. This is a common mistake that should be avoided. A more complex example is the following: .. code-block:: javascript [ "Please read the ", ["a",{href:"instructions.html"},["instructions"]], " carefully before proceeding" ] which is equivalent to .. code-block:: html please read the instructions carefully before proceeding. A final example shows how to set style attributes on an object: .. code-block:: javascript [["span", { id:"mySpan", style: {color:"red", "font-weight":"bold"} }, [" This is bold text shown in red "] ]] which is equivalent to .. code-block:: html This is bold text shown in red Since HTML snippets contain text that is displayed to users, it may be important to localize those strings to be in the language selected by the user. See the :ref:`Localization Strings ` documentation for details of how to accomplish that. mathjax-docs-2.7+20171212/reference/glossary.rst0000644000000000000000000000753613213762601016074 0ustar .. _glossary: ******** Glossary ******** .. if you add new entries, keep the alphabetical sorting! .. glossary:: AsciiMath A notation for mathematics that uses characters commonly available on all computer keyboards to represent the math in an algebra-like syntax that should be intuitive and easily read. .. seealso:: `AsciiMath home page `_ Callback A JavaScript function that is used to perform actions that must wait for other actions to complete before they are performed. Callback Queue MathJax uses `Queues` to synchronize its activity so that actions that operate asynchronously (like loading files) will be performed in the right order. :term:`Callback` functions are pushed onto the queue, and are performed in order, with MathJax handling the synchronization if operations need to wait for other actions to finish. Callback Signal A JavaScript object that acts as a mailbox for MathJax events. Like an event handler, but it also keeps a history of messages. Your code can register an "interest" in a signal, or can register a :term:`callback` to be called when a particular message is sent along the signal channel. HTML-CSS MathJax output form that relys only on HTML and CSS 2.1, allowing MathJax to remain compatible across all browsers. jax MathJax's input and output processors are called "jax", as is its internal format manager. The code for the jax are in the ``MathJax/jax`` directory. LaTeX LaTeX is a variant of :term:`TeX` that is now the dominant TeX style. .. seealso:: `LaTeX Wikipedia entry `_ Markdown A text format commonly used in blogs and wikis for creating web pages without the need for complicated markup notation. It is intended to be an easy-to-read and easy-to-write format that still gives you the ability to specify a rich text result (including things like bold, italics, bullet lists, and so on). .. seealso:: `Markdown home page `_ MathML An XML specification created to describe mathematical notations and capture both its structure and content. MathML is much more verbose than :term:`TeX`, but is much more machine-readable. .. seealso:: `MathML Wikipedia entry `_ STIX The Scientific and Technical Information Exchange font package. A comprehensive set of scientific glyphs. .. seealso:: `STIX project `_ SVG Acronym for `Scalable Vector Graphics`. SVG is a graphics format that allows images to be described as a collection of graphics objects (like lines, rectangles, etc) rather than as a bitmap of colored pixels. MathJax can use this format to display mathematics as an alternative to its HTML-CSS or NativeMML output. .. seealso:: `SVG Wikipedia entry `_ TeX A document markup language with robust math markup commands developed by Donald Knuth in the late 1970's, but still in extensive use today. It became the industry standard for typesetting of mathematics, and is one of the most common formats for mathematical journals, articles, and books. .. seealso:: `TeX Wikipedia entry `_ mathjax-docs-2.7+20171212/reference/localization-strings.rst0000644000000000000000000003000713213762601020375 0ustar .. _localization-strings: ******************** Localization Strings ******************** In MathJax v2.2 and later, the user interface can be localized to use languages other than English. This includes all information strings, menu items, warning messages, and so on. To make this possible, each string is given an ID that is used to obtain the localized version of the string. So the "File not found" message might have the ID ``NotFound``. The localization data for each language associates the ID ``NotFound`` with the proper translation of the English phrase "File not found". Some of MathJax's functions, like :meth:`MathJax.Message.Set()`, can accept localized strings as their parameters. To use a localized string in this case, use an array consisting of the ID followed by the English string (followed by any substitution arguments for the string, see below). For example, .. code-block:: javascript MathJax.Message.Set(["NotFound","File not found"]); would cause the "File not found" message to be displayed (in the currently selected language) in the MathJax message area at the bottom of left of the browser window. Note that :meth:`MathJax.Message.Set()` can still accept unlocalized strings, as it has traditionally: .. code-block:: javascript MathJax.Message.Set("File not found"); Here the message will always be in English, regardless of the selected language. The reason that the English string is also given (in addition to the ID), is because MathJax needs to have a fallback string to use in case the localization data doesn't translate that ID, or if the localization data has failed to load. Providing the English string in addition to the ID guarantees that a fallback is available. MathJax's localization system is documented more fully in the :ref:`Localization API ` documentation. Parameter Substitution ---------------------- Localized messages may need to include information, like file names, that are not known until the message is needed. In this case, the message string acts as a template and MathJax will insert the needed values into it at the appropriate places. To use such substitutions, you include the values in the localization string array following the English phrase, and use the special sequences ``%1``, ``%2``, etc., to refer to the parameters at the locations where they should appear in the message. For example, .. code-block:: javascript MathJax.Message.Set(["NotFound","File %1 not found",filename]); would cause the name stored in the variable ``filename`` to be inserted into the localized string at the location of the ``%1``. Note that the localized string could use the parameters in a different order from how they appear in English, so MathJax can handle languages where the word order is different. Although it would be rare to need more than 9 substitution parameters, you can use ``%10``, ``%11``, etc., to get the 10-th, 11-th, and so on. If you need a parameter to be followed directly by a number, use ``%{1}0`` (rather than ``%10``) to get the first parameter followed directly by a zero. A ``%`` followed by anything other than a number or a ``{`` generates just the character following the percent sign, so ``%%`` would produce a single ``%``, and ``%:`` would produce just ``:``. Plural forms ------------ Some languages handle plural forms differently from how English does. In English, there are two forms: the one used for a single item, and the one used for everything else. For example, you would say "You have one new message" for a single message, but "You have three new messages" of there were three messages (or two, or zero, or anything other than one). To handle plurals, you use a special "plural" directive within your message string. The format is .. code-block:: javascript %{plural:%n|text1|text2} where ``%n`` is the reference to the parameter (which should be a number) that controls which text to use. For English, there would be two texts, one (``text1``) for when the number is 1, and one (``text2``) for when it is anything else. Other languages may have more forms (e.g., Welsh has six different plural forms, a different one for 0 (zero), 1 (one), 2 (two), 3 (few), 6 (many), and anything else, so Welsh translation plural forms would have six different texts). The details of how to map the numeric value to the text strings is handled by the translation data for the selected language. As an example, you might use .. code-block:: javascript MathJax.Message.Set(["NewMessages","You have %1 new %{plural:%1|message|messages}",n]); where ``n`` is a variable holding the number of new messages. Alternatively, .. code-block:: javascript MathJax.Message.Set(["NewMessages","You have %{plural:%1|a new message|%1 new messages}",n]); shows how you can do substitution within the plural texts themselves. Note that the translation string may contain such constructs even if the original English one doesn't. For example .. code-block:: javascript MathJax.Message.Set(["alone","We are %1 in this family but alone in this World.",n]); could be translated into French by .. code-block:: javascript "Nous sommes %1 dans cette famille mais %{plural:%1|seul|seuls} en ce monde." Note that if one of the options for the plural forms requires a literal close brace, it can be quoted with a percent. For instance, .. code-block:: javascript %{plural:%1|One {only%}|Two {or more%}} would produce ``One {only}`` when the first argument is 1, and ``Two {or more}`` otherwise. If a message needs to include a literal string that looks like one of these selectors, the original ``%`` can be quoted. So ``%%{plural:%%1|A|B}`` would be the literal string ``%{plural:%1|A|B}``. Number forms ------------ Decimal numbers are represented differently in different languages. For example, 3.14159 is an English representation of an approximation to the mathematical constant pi, while in European countries, it would be written 3,14159. MathJax will convert a number to the proper format before inserting it into a localized string. For example .. code-block:: javascript MathJax.Message.Set(["pi","The value of pi is approximately %1",3.14159]); would show the value as ``3.14159`` in English, but ``3,14159`` if French is the selected language. ID's and Domains ---------------- Because MathJax consists of a number of separate components and can be extended by third party code, it is possible for two different components to want to use the same ID value for a string, leading to an ID name collision. To help avoid this, MathJax allows identifier *domains* that are used to isolate collections of identifiers for one component from those for another component. For example, each input jax has its own domain, as do many of the MathJax extensions. This means you only have to worry about collisions within your own domain, and so can more easily manage the uniqueness if the ID's in use. To use a domain with your ID, replace the ID with an array consisting of the domain and the ID. For example, the TeX input jax uses the domain ``TeX``, so .. code-block:: javascript MathJax.Message.Set([["TeX","MissingBrace"],"Missing Close Brace"]); would set the message to the translation associated with the ID ``MissingBrace`` in the ``TeX`` domain. Some functions that take localization strings automatically prepend the domain to the ID (if one isn't already given). For example, the :meth:`Error()` function of the TeX input jax uses the ``TeX`` domain if one isn't supplied, so .. code-block:: javascript TEX.Error(["MissingBrace","Missing Close Brace"]); will generate the ``MissingBrace`` error from the ``TeX`` domain without having to specify the ``TeX`` domain explicitly. HTML Snippets ------------- MathJax provides a means of specifiying HTML code in javascript called :ref:`HTML snippets `. These frequently include text that needs to be localized, so you can include localization strings (like those described above) within an HTML snippet in any location where you would normally have a regular text string. For example, the snippet .. code-block:: javascript [ "Follow this link: ", ["a",{href:"http://www.mathjax.org"},[ ["img",{src:"external.gif"}] ]] ] includes the text "Follow this link:" which should be localized. You can change it to a localization string to cause it to be translated to the selected langauge: .. code-block:: javascript [ ["FollowLink","Follow this link"],": ", ["a",{href:"http://www.mathjax.org"},[ ["img",{src:"external.gif"}] ]] ] (Here we use the ID ``FollowLink`` to obtain the translation). Note that you can include substitution parameters as usual: .. code-block:: javascript [ ["ClickMessages","Click for %1 new %{plural:%1|messsage|messages}",n],": ", ["a",{href:"messages.html"},[ ["img",{src:"external.gif"}] ]] ] It is even possible to substitute HTML snippets into a localized string (when it is within an HTML snippet): .. code-block:: javascript [ ["MathJaxLink","This is documented at the %1 website",[ ["a",{href:"http://docs.mathjax.org"},["MathJax]] ]] ] Note, however, that a better approach to this exampe is given in the next section. Since an HTML snippet might contain several strings that need to be localized, you may want to be able to specify the domain to use for *all* the strings within the snippet. Within a snippet, you can use an entry of the form ``[domain,snippet]`` to force the snippet to be processed with default domain ``domain``. E.g. .. code-block:: javascript [ ["TeX",[ ["ul",{},[ ["li",{},[["MissingBrace","Missing close brace"]]], ["li",{},[["ExtraBrace","Extra close brace"]]], ]] ]], ["MathML",[ ["ul",{},[ ["li",{},[["UnknownNode","Unknown node type: %1",type]]], ["li",{},[["BadAttribute","Illegal attribute: %1",attr]]], ]] ] ] would create two undordered lists, one with translations from the ``TeX`` domain, and one from the ``MathML`` domain. To summarize the format of an HTML snippet, it is an array with each entry being one of the following: * A text string, which becomes text in the resulting HTML; this is untranslated. * An array of the form ``["tag"]``, ``["tag",{properties}]``, or ``["tag",{properties},HTML-snippet]``, which becomes the given HTML tag, with the given properties, containing the given HTML-snippet as its children. * An array of the form ``[id,message]`` or ``[id,message,parameters]``, which is first translated, then parameter substitution performed, and the result added to the HTML (either as text or as HTML tags if the message included Markdown syntax). Note that the ``id`` can be either an id or an array ``[domain,id]``, and that the parameters could be HTML snippets themselves. * An array of the form ``[domain,HTML-snippet]``, which becomes the HTML-snippet with its localizations done from the given domain. Markdown Notation ----------------- HTML snippets allow you to create styled markup, like bold or italics, but this requires breaking the text up into smaller strings that fall in between HTML tags. That makes it hard to translate, since the strings are not full phrases. To make the creation of strings with bold, italics, and hyperlinks easier to localize, MathJax allows the strings within HTML snippets to be written in a limited Markdown syntax (*very* limited). You can use ``*bold*``, ``**italics**``, ``***bold-italics***``, ``[link-text](url)``, and ```code``` to obtain bold, italics, bold-italics, hyperlinks, and code blocks. For instance, the link example above could be more easily handled via .. code-block:: javascript [ ["MathJaxLink","This is documented at the [MathJax](%1) website", "http://docs.mathjax.org"] ] while .. code-block:: javascript [ ["Renderer","*Renderer*: lets you select the output renderer"] ] will produce the equivalent of ``Renderer: lets you select the output render`` in the appropriate language. mathjax-docs-2.7+20171212/safe-mode.rst0000644000000000000000000000565113213762601014127 0ustar .. _safe-mode: ***************** MathJax Safe-mode ***************** MathML includes the ability to include hyperlinks within your mathematics, and such links *could* be made to ``javascript:`` URL's. For example, the expression .. code-block:: xml Click Me would display the words "Click Me" that when clicked would generate an alert message in the browser. This is a powerful feature that provides authors the ability to tie actions to mathematical expressions. Similarly, MathJax provides an HTML extension for the TeX language that allows you to include hyperlinks in your TeX formulas: .. code-block:: latex $E \href{javascript:alert("Einstein says so!")}{=} mc^2$ Here the equal sign will be a link that pops up the message about Einstein. Both MathML and the HTML extension for TeX allow you to add CSS styles, classes, and id's to your math elements as well. These features can be used to produce interactive mathematical expressions to help your exposition, improve student learning, and so on. If you are using MathJax in a community setting, however, like a question-and-answer forum, a wiki, a blog with user comments, or other situations where your readers can enter mathematics, then your readers would be able to use such powerful tools to corrupt the page, or fool other readers into giving away sensitive information, or interrupt their reading experience in other ways. In such environments, you may want to limit these abilities so that your readers are protected form these kinds of malicious actions. (Authors who are writing pages that don't allow users to enter data on the site do not have to worry about such problems, as the only mathematical content will be their own. It is only when users can contribute to the page that you have to be careful.) MathJax provides a `Safe` extension to help you limit your contributors' powers. There are two ways to load it. The easiest is to add ``,Safe`` after the configuration file when you are loading ``MathJax.js``: .. code-block:: html This causes MathJax to load the ``TeX-AMS_HTML`` configuration file, and then the ``Safe`` configuration, which adds the Safe extension to your ``extensions`` array so that it will be loaded with the other extensions. Alternatively, if you are using in-line configuration, you could just include ``"Safe.js"`` in your ``extensions`` array directly: .. code-block:: html The Safe extension has a number of configuration options that let you fine-tune what is allowed and what is not. See the :ref:`Safe extension options ` for details. mathjax-docs-2.7+20171212/start.rst0000644000000000000000000004643213213762601013426 0ustar .. _getting-started: *************** Getting Started *************** MathJax allows you to include mathematics in your web pages, either using LaTeX, MathML, or AsciiMath notation, and the mathematics will be processed using JavaScript to produce HTML, SVG or MathML equations for viewing in any modern browser. There are two ways to access MathJax: the easiest way is to use the copy of MathJax available from a distributed network service such as ``cdnjs.com``, but you can also download and install a copy of MathJax on your own server, or use it locally on your hard disk (with no need for network access). All three of these are described below, with links to more detailed explanations. This page gives the quickest and easiest ways to get MathJax up and running on your web site, but you may want to read the details in order to customize the setup for your pages. .. _mathjax-CDN: Using a Content Delivery Network (CDN) ====================================== The easiest way to use MathJax is to link directly to a public installation available through a Content Distribution Network (CDN). When you use a CDN, there is no need to install MathJax yourself, and you can begin using MathJax right away. The CDN will automatically arrange for your readers to download MathJax files from a fast, nearby server. To use MathJax from a CDN, you need to do two things: 1. Link to MathJax in the web pages that are to include mathematics. 2. Put mathematics into your web pages so that MathJax can display it. There are many free CDN providers that provide copies of MathJax. Some provide "rolling releases", i.e., links that update to the latest available version upon release - `cdnjs.com `_ (recommended) - `jsdelivr.com `_ [rolling] - `unpkg.com `_ [rolling] - `rawgit.com `_ - `gitcdn.xyz `_ - `raw.githack.com `_ .. warning:: We retired our self-hosted CDN at `cdn.mathjax.org` in April, 2017. **We recommend** using `cdnjs.com `_ which uses the same provider. The use of ``cdn.mathjax.org`` was governed by its `terms of service `_. To jump start using `cdnjs`, you accomplish the first step by putting .. code-block:: html into the ```` block of your document. (It can also go in the ```` if necessary, but the head is to be preferred.) This will load the latest version of MathJax from the distributed server, and configure it to recognize mathematics in both TeX, MathML, and AsciiMath notation, and ask it to generate its output using HTML with CSS to display the mathematics. .. warning:: The ``TeX-MML-AM_CHTML`` configuration is one of the most general (and thus largest) combined configuration files. We list it here because it will quickly get you started using MathJax. It is probably not the most efficient configuration for your purposes and other :ref:`combined configuration files ` are available. You can also provide additional configuration parameters to tailor one of the combined configurations to your needs or use our development tools to generate your own combined configuration file. More details about the configuration process can be found in the :ref:`Loading and Configuring MathJax ` instructions. .. note:: To see how to enter mathematics in your web pages, see `Putting mathematics in a web page`_ below. .. _secure-cdn-access: Putting mathematics in a web page ================================= To put mathematics in your web page, you can use :term:`TeX` and :term:`LaTeX` notation, :term:`MathML` notation, :term:`AsciiMath` notation, or a combination of all three within the same page; the MathJax configuration tells MathJax which you want to use, and how you plan to indicate the mathematics when you are using TeX/LaTeX or AsciiMath notation. The configuration file used in the examples above tells MathJax to look for both TeX, AsciiMath, and MathML notation within your pages. Other configuration files tell MathJax to use only one of these input options or one of the other output options. These three formats are described in more detail below. .. _tex-and-latex-input: TeX and LaTeX input ------------------- Mathematics that is written in :term:`TeX` or :term:`LaTeX` format is indicated using *math delimiters* that surround the mathematics, telling MathJax what part of your page represents mathematics and what is normal text. There are two types of equations: ones that occur within a paragraph (in-line mathematics), and larger equations that appear separated from the rest of the text on lines by themselves (displayed mathematics). The default math delimiters are ``$$...$$`` and ``\[...\]`` for displayed mathematics, and ``\(...\)`` for in-line mathematics. Note in particular that the ``$...$`` in-line delimiters are **not** used by default. That is because dollar signs appear too often in non-mathematical settings, which could cause some text to be treated as mathematics unexpectedly. For example, with single-dollar delimiters, "... the cost is $2.50 for the first one, and $2.00 for each additional one ..." would cause the phrase "2.50 for the first one, and" to be treated as mathematics since it falls between dollar signs. For this reason, if you want to use single-dollars for in-line math mode, you must enable that explicitly in your configuration: .. code-block:: html See the ``config/default.js`` file, or the :ref:`tex2jax configuration options ` page, for additional configuration parameters that you can specify for the `tex2jax` preprocessor, which is the component of MathJax that identifies TeX notation within the page. See the :ref:`TeX and LaTeX ` page for more on MathJax's support for TeX, and in particular how to deal with single dollar signs in your text when you have enabled single dollar-sign delimiters. Here is a complete sample page containing TeX mathematics (also available in the `test/sample-tex.html `_ file): .. code-block:: html MathJax TeX Test Page When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ Since the TeX notation is part of the text of the page, there are some caveats that you must keep in mind when you enter your mathematics. In particular, you need to be careful about the use of less-than signs, since those are what the browser uses to indicate the start of a tag in HTML. Putting a space on both sides of the less-than sign should be sufficient, but see :ref:`TeX and LaTeX support ` for details. If you are using MathJax within a blog, wiki, or other content management system, the markup language used by that system may interfere with the TeX notation used by MathJax. For example, if your blog uses :term:`Markdown` notation for authoring your pages, the underscores used by TeX to indicate subscripts may be confused with the use of underscores by Markdown to indicate italics, and the two uses may prevent your mathematics from being displayed. See :ref:`TeX and LaTeX support ` for some suggestions about how to deal with the problem. There are a number of extensions for the TeX input processor that are loaded by combined configuration files which include ``TeX`` in their name (e.g., ``TeX-AMS_CHTML``). These include: - `TeX/AMSmath.js`, which defines the AMS math environments and macros, - `TeX/AMSsymbols.js`, which defines the macros for the symbols in the `msam10` and `msbm10` fonts, - `TeX/noErrors.js`, which shows the original TeX code rather than an error message when there is a problem processing the TeX, and - `TeX/noUndefined.js`, which prevents undefined macros from producing an error message, and instead shows the macro name in red. Other extensions may be loaded automatically when needed. .. note:: See :ref:`TeX and LaTeX support ` for details on the other TeX extensions that are available. .. _mathml-input: MathML input ------------ For mathematics written in :term:`MathML` notation, you mark your mathematics using standard ```` tags, where ```` represents displayed mathematics and ```` or just ```` represents in-line mathematics. Note that even on old browsers this will work in HTML files, not just XHTML files (MathJax works with both), and that the web page need not be served with any special MIME-type. However note that in HTML (as opposed to XHTML), you should **not** include a namespace prefix for your ```` tags; for example, you should not use ```` except in an XHTML file where you have tied the ``m`` namespace to the MathML DTD by adding the ``xmlns:m="http://www.w3.org/1998/Math/MathML"`` attribute to your file's ```` tag. Although it is not required, it is recommended that you include the ``xmlns="http://www.w3.org/1998/Math/MathML"`` attribute on all ```` tags in your document (and this is preferred to the use of a namespace prefix like ``m:`` above, since those are deprecated in HTML5) in order to make your MathML work in the widest range of situations. Here is a complete sample page containing MathML mathematics (also available in the `test/sample-mml.html `_ file): .. code-block:: html MathJax MathML Test Page

When a0 , there are two solutions to ax2 + bx + c = 0 and they are x = b ± b2 4ac 2a .

When entering MathML notation in an HTML page (rather than an XHTML page), you should **not** use self-closing tags, but should use explicit open and close tags for all your math elements. For example, you should use .. code-block:: html rather than ```` in an HTML document. If you use the self-closing form, some browsers will not build the math tree properly, and MathJax will receive a damaged math structure, which will not be rendered as the original notation would have been. Typically, this will cause parts of your expression to not be displayed. Unfortunately, there is nothing MathJax can do about that, since the browser has incorrectly interpreted the tags long before MathJax has a chance to work with them. The component of MathJax that recognizes MathML notation within the page is called the `mml2jax` extension, and it has only a few configuration options; see the ``config/default.js`` file or the :ref:`mml2jax configuration options ` page for more details. .. note:: See the :ref:`MathML ` page for more on MathJax's MathML support. .. _asciimath-input: AsciiMath input --------------- MathJax v2.0 introduced a new input format: :term:`AsciiMath` notation by incorporating `ASCIIMathML `_. By default, you mark mathematical expressions written in this form by surrounding them in "back-ticks", i.e., ```...```. Here is a complete sample page containing AsciiMath notation (also available in the `test/sample-asciimath.html `_ file): .. code-block:: html MathJax AsciiMath Test Page

When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are

`x = (-b +- sqrt(b^2-4ac))/(2a) .`

The component of MathJax that recognizes asciimath notation within the page is called the `asciimath2jax` extension, and it has only a few configuration options; see the ``config/default.js`` file or the :ref:`asciimath2jax configuration options ` page for more details. .. note:: See the :ref:`AsciiMath support ` page for more on MathJax's AsciiMath support. Installing Your Own Copy of MathJax =================================== We recommend using the CDN service if you can, but you can also install MathJax on your own server, or locally on your own hard disk. To do so you will need to do the following things: 1. Obtain a copy of MathJax and make it available on your server or hard disk. 2. Configure MathJax to suit the needs of your site. 3. Link MathJax into the web pages that are to include mathematics. 4. Put mathematics into your web pages so that MathJax can display it. Downloading and Installing MathJax ---------------------------------- The MathJax source code is `hosted on GitHub `_. To install MathJax on your own server, download `the latest distribution `_ and unpack the archive and place the resulting MathJax folder onto your web server at a convenient location where you can include it into your web pages. For example, making ``MathJax`` a top-level directory on your server would be one natural way to do this. That would let you refer to the main MathJax file via the URL ``/MathJax/MathJax.js`` from within any page on your server. Once you have MathJax set up on your server, you can test it using the files in the ``MathJax/test`` directory. If you are putting MathJax on a server, load them in your browser using their web addresses rather than opening them locally (i.e., use an ``http://`` URL rather than a ``file://`` URL). When you view the ``index.html`` file, after a few moments you should see a message indicating that MathJax appears to be working. If not, check that the files have been transferred to the server completely and that the permissions allow the server to access the files and folders that are part of the MathJax directory. (Be sure to verify the MathJax folder's permissions as well.) Check the server log files for any errors that pertain to the MathJax installation; this may help locate problems in the permission or locations of files. .. note:: For more details (such as version control access) see :ref:`the installation instructions `. Configuring your copy of MathJax -------------------------------- When you include MathJax into your web pages as described below, it will load the file ``config/TeX-MML-AM_CHTML.js`` (i.e., the file named ``TeX-MML-AM_CHTML.js`` in the ``config`` folder of the main ``MathJax`` folder). This file preloads all the most commonly-used components of MathJax, allowing it to process mathematics that is in the TeX or LaTeX format, AsciiMath format, or in MathML notation. It will produce output in HTML (with CSS) to render the mathematics. There are a number of other prebuilt configuration files that you can choose from as well, or you could use the ``config/default.js`` file and customize the settings yourself. .. note:: The combined configuration files are described more fully in :ref:`Common Configurations `, and the configuration options are described in :ref:`Configuration Options `. Linking your copy of MathJax into a web page -------------------------------------------- You can include MathJax in your web page by putting .. code-block:: html in your document's ```` block. Here, ``path-to-MathJax`` should be replaced by the URL for the main MathJax directory, so if you have put the ``MathJax`` directory at the top level of you server's web site, you could use .. code-block:: html to load MathJax in your page. For example, your page could look like .. code-block:: html ... ... .. note:: If you have installed MathJax on a server that is in a different domain from the one serving the page that loads MathJax, be sure to read the :ref:`Notes About Shared Servers ` for more details. In that case, you may wish to consider using MathJax via a :ref:`CDN ` rather than installing your own copy of MathJax. Where to go from here? ====================== If you have followed the instructions above, you should now have MathJax installed and configured on your web server, and you should be able to use it to write web pages that include mathematics. At this point, you can start making pages that contain mathematical content! You could also read more about the details of how to :ref:`customize MathJax `. If you are trying to use MathJax in blog or wiki software or in some other content-management system, you might want to read about :ref:`using MathJax in popular platforms `. If you are working on dynamic pages that include mathematics, you might want to read about the :ref:`MathJax Application Programming Interface ` (its API), so you know how to include mathematics in your interactive pages. If you are having trouble getting MathJax to work, you can read more about :ref:`installing MathJax `, or :ref:`loading and configuring MathJax `. Finally, if you have questions or comments, or want to help support MathJax, you could visit the :ref:`MathJax community forums ` or the :ref:`MathJax bug tracker `. mathjax-docs-2.7+20171212/tex.rst0000644000000000000000000017473013213762601013074 0ustar .. _TeX-support: ***************************** MathJax TeX and LaTeX Support ***************************** The support for :term:`TeX` and :term:`LaTeX` in MathJax consists of two parts: the `tex2jax` preprocessor, and the `TeX` input processor. The first of these looks for mathematics within your web page (indicated by math delimiters like ``$$...$$``) and marks the mathematics for later processing by MathJax. The TeX input processor is what converts the TeX notation into MathJax's internal format, where one of MathJax's output processors then displays it in the web page. The `tex2jax` preprocessor can be configured to look for whatever markers you want to use for your math delimiters. See the :ref:`tex2jax configuration options ` section for details on how to customize the action of `tex2jax`. The TeX input processor handles conversion of your mathematical notation into MathJax's internal format (which is essentially MathML), and so acts as a TeX to MathML converter. The TeX input processor has few configuration options (see the :ref:`TeX options ` section for details), but it can also be customized through the use of extensions that define additional functionality (see the :ref:`TeX and LaTeX extensions ` below). Differences =========== Since MathJax renders for the web and TeX is a print layout engine, there are natural limitations of which parts of TeX can be supported in a reasonable way. Accordingly, there are several differences between "real" TeX/LaTeX systems and MathJax's TeX Input. First and foremost, the TeX input processor implements **only** the math-mode macros of TeX and LaTeX, not the text-mode macros. MathJax expects that you will use standard HTML tags to handle formatting the text of your page; it only handles the mathematics. So, for example, MathJax does not implement ``\emph`` or ``\begin{enumerate}...\end{enumerate}`` or other text-mode macros or environments. You must use HTML to handle such formatting tasks. If you need a LaTeX-to-HTML converter, you should consider `other options `_. There are two exception to this rule. First, MathJax supports the `\ref` macro outside of math-mode. Second, MathJax supports some macros that add text within math-mode (such as `\text{}`) as well as `$...$` within such macros (to switch back into math-mode) and`\$` to escape. Second, some features in MathJax might be necessarily limited. For example, MathJax only implements a limited subset of the ``array`` environment's preamble, i.e., only the ``l``, ``r``, ``c``, and ``|`` characters alongside ``:`` for dashed lines; everything else is ignored. .. note:: If you are not familiar with :term:`TeX`/:term:`LaTeX`, a good starting point is the `LaTeX Wiki book `__. TeX and LaTeX math delimiters ============================= By default, the `tex2jax` preprocessor defines the LaTeX math delimiters, which are ``\(...\)`` for in-line math, and ``\[...\]`` for displayed equations. It also defines the TeX delimiters ``$$...$$`` for displayed equations, but it does **not** define ``$...$`` as in-line math delimiters. That is because dollar signs appear too often in non-mathematical settings, which could cause some text to be treated as mathematics unexpectedly. For example, with single-dollar delimiters, "... the cost is $2.50 for the first one, and $2.00 for each additional one ..." would cause the phrase "2.50 for the first one, and" to be treated as mathematics since it falls between dollar signs. For this reason, if you want to use single-dollars for in-line math mode, you must enable that explicitly in your configuration: .. code-block:: javascript MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true } }); Note that if you do this, you may want to also set ``processEscapes`` to ``true``, as in the example above, so that you can use ``\$`` to prevent a dollar sign from being treated as a math delimiter within the text of your web page. (Note that within TeX mathematics, ``\$`` always has this meaning; ``processEscapes`` only affects the treatment of the *opening* math delimiter.) Note that, as opposed to true LaTeX, MathJax processes all environments when wrapped inside math delimiters. By defaut, MathJax will also render all environments outside of delimiters; this can be controlled via the ``processEnvironments`` option in the :ref:`tex2jax configuration options `. See the ``config/default.js`` file, or the :ref:`tex2jax configuration options ` page, for additional configuration parameters that you can specify for the `tex2jax` preprocessor, which is the component of MathJax that identifies TeX notation within the page. TeX and LaTeX in HTML documents =============================== Keep in mind that your mathematics is part of an HTML document, so you need to be aware of the special characters used by HTML as part of its markup. There cannot be HTML tags within the math delimiters (other than ``
``) as TeX-formatted math does not include HTML tags. Also, since the mathematics is initially given as text on the page, you need to be careful that your mathematics doesn't look like HTML tags to the browser (which parses the page before MathJax gets to see it). In particular, that means that you have to be careful about things like less-than and greater-than signs (``<`` and ``>``), and ampersands (``&``), which have special meaning to the browsers. For example, .. code-block:: latex ... when $x`` in the document (typically the end of the next actual tag in the HTML file), and you may notice that you are missing part of the text of the document. In the example above, the "``we have ...``" will not be displayed because the browser thinks it is part of the tag starting at ```` using TeX-like syntax: .. code-block:: latex ... when $x \lt y$ we have ... Keep in mind that the browser interprets your text before MathJax does. Another source of difficulty is when MathJax is used in content management systems that have their own document processing commands that are interpreted before the HTML page is created. For example, many blogs and wikis use formats like :term:`Markdown` to allow you to create the content of you pages. In Markdown, the underscore is used to indicate italics, and this usage will conflict with MathJax's use of the underscore to indicate a subscript. Since Markdown is applied to the page first, it will convert your subscripts markers into italics (inserting ```` tags into your mathematics, which will cause MathJax to ignore the math). Such systems need to be told not to modify the mathematics that appears between math delimiters. That usually involves modifying the content-management system itself, which is beyond the means of most page authors. If you are lucky, someone else will already have done this for you, and you can find a MathJax plugin for your system on the :ref:`MathJax-In-Use ` page. If there is no plugin for your system, or if it doesn't handle the subtleties of isolating the mathematics from the other markup that it supports, then you may have to "trick" it into leaving your mathematics untouched. Most content-management systems provide some means of indicating text that should not be modified ("verbatim" text), often for giving code snippets for computer languages. You may be use that to enclose your mathematics so that the system leaves it unchanged and MathJax can process it. For example, in Markdown, the back-tick (`````) is used to mark verbatim text, so .. code-block:: latex ... we have `\(x_1 = 132\)` and `\(x_2 = 370\)` and so ... may be able to protect the underscores from being processed by Markdown. Some content-management systems use the backslash (``\``) as a special character for "escaping" other characters, but TeX uses this character to indicate a macro name. In such systems, you may have to double the backslashes in order to obtain a single backslash in your HTML page. For example, you may have to do .. code-block:: latex \\begin{array}{cc} a & b \\\\ c & c \\end{array} to get an array with the four entries *a*, *b*, *c*, and *d*. Note in particular that if you want ``\\`` you will have to double *both* backslashes, giving ``\\\\``. Finally, if you have enabled single dollar-signs as math delimiters, and you want to include a literal dollar sign in your web page (one that doesn't represent a math delimiter), you will need to prevent MathJax from using it as a math delimiter. If you also enable the ``processEscapes`` configuration parameter, then you can use ``\$`` in the text of your page to get a dollar sign (without the backslash) in the end. Alternatively, you use something like ``$`` to isolate the dollar sign so that MathJax will not use it as a delimiter. .. _tex-macros: Defining TeX macros =================== You can use the ``\def``, ``\newcommand``, ``\renewcommand``, ``\newenvironment``, ``\renewenvironment``, and ``\let`` commands to create your own macros and environments. Unlike actual TeX, however, in order for MathJax to process such definitions, they must be enclosed in math delimiters (since MathJax only processes macros in math-mode). For example .. code-block:: latex \( \def\RR{\bf R} \def\bold#1{\bf #1} \) would define ``\RR`` to produce a bold-faced "R", and ``\bold{...}`` to put its argument into bold face. Both definitions would be available throughout the rest of the page. You can include macro definitions in the `Macros` section of the `TeX` blocks of your configuration, but they must be represented as JavaScript objects. For example, the two macros above can be pre-defined in the configuration by .. code-block:: javascript MathJax.Hub.Config({ TeX: { Macros: { RR: "{\\bf R}", bold: ["{\\bf #1}",1], Abs: ['\\left\\lvert #2 \\right\\rvert_{\\text{#1}}', 2, ""] } } }); Here you give the macro as a `name:value` pair, where the `name` is the name of the control sequence (without the backslash) that you are defining, and `value` is either the replacement string for the macro (when there are no arguments) or an array consisting of the replacement string followed by the number of arguments for the macro and, optionally, default values for optional arguments. Note that the replacement string is given as a JavaScript string literal, and the backslash has special meaning in JavaScript strings. So to get an actual backslash in the string you must double it, as in the examples above. If you have many such definitions that you want to use on more than one page, you could put them into a configuration file that you can load along with the main configuration file. For example, you could create a file in ``MathJax/config/local`` called ``local.js`` that contains your macro definitions: .. code-block:: javascript MathJax.Hub.Config({ TeX: { Macros: { RR: "{\\bf R}", bold: ["{\\bf #1}",1] } } }); MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js"); and then load it along with your main configuration file on the script that loads ``MathJax.js``: .. code-block:: html If you are using the CDN, you can make a local configuration file on your own server, and load MathJax itself from the CDN and your configuration file from your server. See :ref:`Using a Local Configuration File with the CDN ` for details. .. _tex-eq-numbers: Automatic Equation Numbering ============================ New in MathJax v2.0 is the ability to have equations be numbered automatically. This functionality is turned off by default, so that pages don't change when you update from v1.1 to v2.0, but it is easy to configure MathJax to produce automatic equation numbers by adding: .. code-block:: html to your page just before the `` will load the `autobold` TeX extension in addition to those already included in the ``TeX-AMS_HTML`` configuration file. You can also load these extensions from within a math expression using the non-standard ``\require{extension}`` macro. For example .. code-block:: latex \(\require{color}\) would load the `color` extension into the page. This way you you can load extensions into pages that didn't load them in their configurations (and prevents you from having to load all the extensions into all pages even if they aren't used). It is also possible to create a macro that will autoload an extension when it is first used (under the assumption that the extension will redefine it to perform its true function). For example .. code-block:: html would declare the ``\cancel``, ``\bcancel``, ``\xcancel``, and ``\cancelto`` macros to load the `cancel` extension (where they are actually defined). Whichever is used first will cause the extension to be loaded, redefining all four to their proper values. Note that this may be better than loading the extension explicitly, since it avoids loading the extra file on pages where these macros are *not* used. The `sample autoloading macros `_ example page shows this in action. The `autoload-all` extension below defines such macros for *all* the extensions so that if you include it, MathJax will have access to all the macros it knows about. The main extensions are described below. .. note:: Additional third-party extensions are available through the :ref:`Third Party Extensions repository `. Action ------ The `action` extension gives you access to the MathML ```` element. It defines three new non-standard macros: .. describe:: \\mathtip{math}{tip} Use ``tip`` (in math mode) as tooltip for ``math``. .. describe:: \\texttip{math}{tip} Use ``tip`` (in text mode) as tooltip for ``math``. .. describe:: \\toggle{math1}{math2}...\\endtoggle Show ``math1``, and when clicked, show ``math2``, and so on. When the last one is clicked, go back to math1. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["action.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. AMSmath and AMSsymbols ---------------------- The `AMSmath` extension implements AMS math environments and macros, and the `AMSsymbols` extension implements macros for accessing the AMS symbol fonts. These are already included in the combined configuration files that load the TeX input processor. To use these extensions in your own configurations, add them to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["AMSmath.js", "AMSsymbols.js", ...] } See the list of control sequences at the end of this document for details about what commands are implemented in these extensions. If you are not using one of the combined configuration files, the `AMSmath` extension will be loaded automatically when you first use one of the math environments it defines, but you will have to load it explicitly if you want to use the other macros that it defines. The `AMSsymbols` extension is not loaded automatically, so you must include it explicitly if you want to use the macros it defines. Both extensions are included in all the combined configuration files that load the TeX input processor. AMScd ----- The `AMScd` extensions implements the `CD` environment for commutative diagrams. See the `AMScd guide `_ for more information on how to use the `CD` environment. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["AMScd.js"] } Alternatively, if the extension hasn't been loaded in the configuration, you can use ``\require{AMScd}`` to load it from within a TeX expression. Note that you only need to include this once on the page, not every time the `CD` environment is used. This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Autobold -------- The `autobold` extension adds ``\boldsymbol{...}`` around mathematics that appears in a section of an HTML page that is in bold. .. code-block:: javascript TeX: { extensions: ["autobold.js"] } This extension is **not** loaded by the combined configuration files. BBox ---- The `bbox` extension defines a new macro for adding background colors, borders, and padding to your math expressions. .. describe:: \\bbox[options]{math} puts a bounding box around ``math`` using the provided ``options``. The options can be one of the following: 1. A color name used for the background color. 2. A dimension (e.g., ``2px``) to be used as a padding around the mathematics (on all sides). 3. Style attributes to be applied to the mathematics (e.g., ``border:1px solid red``). 4. A combination of these separated by commas. Here are some examples: .. code-block:: latex \bbox[red]{x+y} % a red box behind x+y \bbox[2pt]{x+1} % an invisible box around x+y with 2pt of extra space \bbox[red,2pt]{x+1} % a red box around x+y with 2pt of extra space \bbox[5px,border:2px solid red] % a 2px red border around the math 5px away This extension is **not** included in any of the combined configurations, but it will be loaded automatically, so you do not need to include it in your `extensions` array. Begingroup ---------- The `begingroup` extension implements commands that provide a mechanism for localizing macro defintions so that they are not permanent. This is useful if you have a blog site, for example, and want to isolate changes that your readers make in their comments so that they don't affect later comments. It defines two new non-standard macros, ``\begingroup`` and ``\endgroup``, that are used to start and stop a local namespace for macros. Any macros that are defined between the ``\begingroup`` and ``\endgroup`` will be removed after the ``\endgroup`` is executed. For example, if you put ``\(\begingroup\)`` at the top of each reader's comments and ``\(\endgroup\)`` at the end, then any macros they define within their response will be removed after it is processed. In addition to these two macros, the `begingroup` extension defines the standard ``\global`` and ``\gdef`` control sequences from TeX. (The ``\let``, ``\def``, ``\newcommand``, and ``\newenvironment`` control sequences are already defined in the core TeX input jax.) To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["begingroup.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Cancel ------ The `cancel` extension defines the following macros: .. describe:: \\cancel{math} Strikeout ``math`` from lower left to upper right. .. describe:: \\bcancel{math} Strikeout ``math`` from upper left to lower right. .. describe:: \\xcancel{math} Strikeout ``math`` with an "X". .. describe:: \\cancelto{value}{math} Strikeout ``math`` with an arrow going to ``value``. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["cancel.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Color ----- The ``\color`` command in the core TeX input jax is not standard in that it takes the mathematics to be colored as one of its parameters, whereas the LaTeX ``\color`` command is a switch that changes the color of everything that follows it. The `color` extension changes the ``\color`` command to be compatible with the LaTeX implementation, and also defines ``\colorbox``, ``\fcolorbox``, and ``\definecolor``, as in the LaTeX color package. It defines the standard set of colors (Apricot, Aquamarine, Bittersweet, and so on), and provides the RGB and grey-scale color spaces in addition to named colors. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["color.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands, and have ``\color`` be compatible with LaTeX usage. Enclose ------- The `enclose` extension gives you access to the MathML ```` element for adding boxes, ovals, strikethroughs, and other marks over your mathematics. It defines the following non-standard macro: .. describe:: \\enclose{notation}[attributes]{math} Where ``notation`` is a comma-separated list of MathML ```` notations (e.g., ``circle``, ``left``, ``updiagonalstrike``, ``longdiv``, etc.), ``attributes`` are MathML attribute values allowed on the ```` element (e.g., ``mathcolor="red"``, ``mathbackground="yellow"``), and ``math`` is the mathematics to be enclosed. See the `MathML 3 specification `_ for more details on ````. For example .. code-block:: latex \enclose{circle}[mathcolor="red"]{x} \enclose{circle}[mathcolor="red"]{\color{black}{x}} \enclose{circle,box}{x} \enclose{circle}{\enclose{box}{x}} To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["enclose.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Extpfeil -------- The `extpfeil` extension adds more macros for producing extensible arrows, including ``\xtwoheadrightarrow``, ``\xtwoheadleftarrow``, ``\xmapsto``, ``\xlongequal``, ``\xtofrom``, and a non-standard ``\Newextarrow`` for creating your own extensible arrows. The latter has the form .. describe:: \\Newextarrow{\\cs}{lspace,rspace}{unicode-char} where ``\cs`` is the new control sequence name to be defined, ``lspace`` and ``rspace`` are integers representing the amount of space (in suitably small units) to use at the left and right of text that is placed above or below the arrow, and ``unicode-char`` is a number representing a unicode character position in either decimal or hexadecimal notation. For example .. code-block:: latex \Newextarrow{\xrightharpoonup}{5,10}{0x21C0} defines an extensible right harpoon with barb up. Note that MathJax knows how to stretch only a limited number of characters, so you may not actually get a stretchy character this way. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["extpfeil.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. HTML ---- The `HTML` extension gives you access to some HTML features like styles, classes, element ID's and clickable links. It defines the following non-standard macros: .. describe:: \\href{url}{math} Makes ``math`` be a link to the page given by ``url``. .. describe:: \\class{name}{math} Attaches the CSS class ``name`` to the output associated with ``math`` when it is included in the HTML page. This allows your CSS to style the element. .. describe:: \\cssId{id}{math} Attaches an id attribute with value ``id`` to the output associated with ``math`` when it is included in the HTML page. This allows your CSS to style the element, or your javascript to locate it on the page. .. describe:: \\style{css}{math} Adds the give ``css`` declarations to the element associated with ``math``. For example: .. code-block:: latex x \href{why-equal.html}{=} y^2 + 1 (x+1)^2 = \class{hidden}{(x+1)(x+1)} (x+1)^2 = \cssId{step1}{\style{visibility:hidden}{(x+1)(x+1)}} This extension is **not** included in any of the combined configurations, but it will be loaded automatically when any of these macros is used, so you do not need to include it explicitly in your configuration. mhchem ------ The `mhchem` extensions implements the ``\ce``, ``\cf``, and ``\cee`` chemical equation macros of the LaTeX `mhchem` package. See the `mhchem CTAN page `_ for more information and a link to the documentation for `mhchem`. For example .. code-block:: latex \ce{C6H5-CHO} \ce{$A$ ->[\ce{+H2O}] $B$} \ce{SO4^2- + Ba^2+ -> BaSO4 v} To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["mhchem.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Beginning with v2.7, the extension provides a configuration option to switch to `mhchem v3 `_, a complete refactor of mhchem contributed by the author of the original LaTeX package. You can control this behavior using the ``legacy`` value which defaults to ``true``. .. code-block:: javascript TeX: { mhchem: { legacy: true } } noErrors -------- The `noErrors` extension prevents TeX error messages from being displayed and shows the original TeX code instead. You can configure whether the dollar signs are shown or not for in-line math, and whether to put all the TeX on one line or use multiple lines (if the original text contained line breaks). This extension is loaded by all the combined configuration files that include the TeX input processor. To enable the `noErrors` extension in your own configuration, or to modify its parameters, add something like the following to your :meth:`MathJax.Hub.Config()` call: .. code-block:: javascript TeX: { extensions: ["noErrors.js"], noErrors: { inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"] multiLine: true, // false for TeX on all one line style: { "font-size": "90%", "text-align": "left", "color": "black", "padding": "1px 3px", "border": "1px solid" // add any additional CSS styles that you want // (be sure there is no extra comma at the end of the last item) } } } Display-style math is always shown in multi-line format, and without delimiters, as it will already be set off in its own centered paragraph, like standard display mathematics. The default settings place the invalid TeX in a multi-line box with a black border. If you want it to look as though the TeX is just part of the paragraph, use .. code-block:: javascript TeX: { noErrors: { inlineDelimiters: ["$","$"], // or ["",""] or ["\\(","\\)"] multiLine: false, style: { "font-size": "normal", "border": "" } } } You may also wish to set the font family or other CSS values here. If you are using a combined configuration file that loads the TeX input processor, it will also load the `noErrors` extension automatically. If you want to disable the `noErrors` extension so that you receive the normal TeX error messages, use the following configuration: .. code-block:: javascript TeX: { noErrors: { disabled: true } } Any math that includes errors will be replaced by an error message indicating what went wrong. noUndefined ----------- The `noUndefined` extension causes undefined control sequences to be shown as their macro names rather than generating error messages. So ``$X_{\xxx}$`` would display as an "X" with a subscript consisting of the text ``\xxx`` in red. This extension is loaded by all the combined configuration files that include the TeX input processor. To enable the `noUndefined` extension in your own configuration, or to modify its parameters, add something like the following to your :meth:`MathJax.Hub.Config()` call: .. code-block:: javascript TeX: { extensions: ["noUndefined.js"], noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } } } The ``attributes`` setting specifies attributes to apply to the ``mtext`` element that encodes the name of the undefined macro. The default values set ``mathcolor`` to ``"red"``, but do not set any other attributes. This example sets the background to a light pink, and reduces the font size slightly. If you are using a combined configuration file that loads the TeX input processor, it will also load the `noUndefined` extension automatically. If you want to disable the `noUndefined` extension so that you receive the normal TeX error messages for undefined macros, use the following configuration: .. code-block:: javascript TeX: { noUndefined: { disabled: true } } Any math that includes an undefined control sequence name will be replaced by an error message indicating what name was undefined. Unicode support --------------- The `unicode` extension implements a ``\unicode{}`` extension to TeX that allows arbitrary unicode code points to be entered in your mathematics. You can specify the height and depth of the character (the width is determined by the browser), and the default font from which to take the character. Examples: .. code-block:: latex \unicode{65} % the character 'A' \unicode{x41} % the character 'A' \unicode[.55,0.05]{x22D6} % less-than with dot, with height .55em and depth 0.05em \unicode[.55,0.05][Geramond]{x22D6} % same taken from Geramond font \unicode[Garamond]{x22D6} % same, but with default height, depth of .8em,.2em Once a size and font are provided for a given unicode point, they need not be specified again in subsequent ``\unicode{}`` calls for that character. The result of ``\unicode{...}`` will have TeX class `ORD` (i.e., it will act like a variable). Use ``\mathbin{...}``, ``\mathrel{...}``, etc., to specify a different class. Note that a font list can be given in the ``\unicode{}`` macro, but Internet Explorer has a buggy implementation of the ``font-family`` CSS attribute where it only looks in the first font in the list that is actually installed on the system, and if the required glyph is not in that font, it does not look at later fonts, but goes directly to the default font as set in the `Internet-Options/Font` panel. For this reason, the default font list for the ``\unicode{}`` macro is ``STIXGeneral, 'Arial Unicode MS'``, so if the user has :term:`STIX` fonts, the symbol will be taken from that (almost all the symbols are in `STIXGeneral`), otherwise MathJax tries `Arial Unicode MS`. The `unicode` extension is loaded automatically when you first use the ``\unicode{}`` macro, so you do not need to add it to the `extensions` array. You can configure the extension as follows: .. code-block:: javascript TeX: { unicode: { fonts: "STIXGeneral, 'Arial Unicode MS'" } } Autoload-all ------------ The `autoload-all` extension predefines all the macros from the extensions above so that they autoload the extensions when first used. A number of macros already do this, e.g., ``\unicode``, but this extension defines the others to do the same. That way MathJax will have access to all the macros that it knows about. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["autoload-all.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. Note that `autoload-all` redefines ``\color`` to be the one from the `color` extension (the LaTeX-compatible one rather than the non-standard MathJax version). This is because ``\colorbox`` and ``\fcolorbox`` autoload the `color` extension, which will cause ``\color`` to be redefined, and so for consistency, ``\color`` is redefined immediately. If you wish to retain the original definition of ``\color``, then use the following .. code-block:: html mediawiki-texvc --------------- The `mediawiki-texvc` extension predefines macros that match the behavior of the `MediaWiki Math Extension `__. To use this extension in your own configurations, add it to the `extensions` array in the TeX block. .. code-block:: javascript TeX: { extensions: ["mediawiki-texvc.js"] } This extension is **not** included in any of the combined configurations, and will not be loaded automatically, so you must include it explicitly in your configuration if you wish to use these commands. .. _tex-commands: Supported LaTeX commands ======================== This is a long list of the TeX macros supported by MathJax. If the macro is defined in an extension, the name of the extension follows the macro name. If the extension is in brackets, the extension will be loaded automatically when the macro or environment is first used. More complete details about how to use these macros, with examples and explanations, is available at Carol Fisher's `TeX Commands Available in MathJax `_ page. Symbols ------- .. code-block:: latex # % & ^ _ { } ~ ' \ (backslash-space) \! \# \$ \% \& \, \: \; \> \\ \_ \{ \| \} A - .. code-block:: latex \AA mediawiki-texvc \above \abovewithdelims \acute \alef mediawiki-texvc \aleph \alpha \Alpha mediawiki-texvc \amalg \And \and mediawiki-texvc \ang mediawiki-texvc \angle \approx \approxeq AMSsymbols \arccos \arcsin \arctan \arg \array \Arrowvert \arrowvert \ast \asymp \atop \atopwithdelims B - .. code-block:: latex \Bbb mediawiki-texvc \backepsilon AMSsymbols \backprime AMSsymbols \backsim AMSsymbols \backsimeq AMSsymbols \backslash \backslash \bar \barwedge AMSsymbols \Bbb \Bbbk AMSsymbols \bbox [bbox] \bcancel cancel \because AMSsymbols \begin \begingroup begingroup non-standard \beta \Beta mediawiki-texvc \beth AMSsymbols \between AMSsymbols \bf \Big \big \bigcap \bigcirc \bigcup \Bigg \bigg \Biggl \biggl \Biggm \biggm \Biggr \biggr \Bigl \bigl \Bigm \bigm \bigodot \bigoplus \bigotimes \Bigr \bigr \bigsqcup \bigstar AMSsymbols \bigtriangledown \bigtriangleup \biguplus \bigvee \bigwedge \binom AMSmath \blacklozenge AMSsymbols \blacksquare AMSsymbols \blacktriangle AMSsymbols \blacktriangledown AMSsymbols \blacktriangleleft AMSsymbols \blacktriangleright AMSsymbols \bmod \bold mediawiki-texvc \boldsymbol [boldsymbol] \bot \bowtie \Box AMSsymbols \boxdot AMSsymbols \boxed AMSmath \boxminus AMSsymbols \boxplus AMSsymbols \boxtimes AMSsymbols \brace \bracevert \brack \breve \buildrel \bul mediawiki-texvc \bullet \Bumpeq AMSsymbols \bumpeq AMSsymbols C - .. code-block:: latex \C mediawiki-texvc \cal \cancel cancel \cancelto cancel \cap \Cap AMSsymbols \cases \cdot \cdotp \cdots \ce mhchem \cee mhchem \centerdot AMSsymbols \cf mhchem \cfrac AMSmath \check \checkmark AMSsymbols \chi \Chi mediawiki-texvc \choose \circ \circeq AMSsymbols \circlearrowleft AMSsymbols \circlearrowright AMSsymbols \circledast AMSsymbols \circledcirc AMSsymbols \circleddash AMSsymbols \circledR AMSsymbols \circledS AMSsymbols \class [HTML] non-standard \clubs mediawiki-texvc \clubsuit \cnums mediawiki-texvc \colon \color color \colorbox color \complement AMSsymbols \Complex mediawiki-texvc \cong \coppa mediawiki-texvc \Coppa mediawiki-texvc \coprod \cos \cosh \cot \coth \cr \csc \cssId [HTML] non-standard \cup \Cup AMSsymbols \curlyeqprec AMSsymbols \curlyeqsucc AMSsymbols \curlyvee AMSsymbols \curlywedge AMSsymbols \curvearrowleft AMSsymbols \curvearrowright AMSsymbols D - .. code-block:: latex \dagger \Dagger mediawiki-texvc \daleth AMSsymbols \Darr mediawiki-texvc \dashleftarrow AMSsymbols \dashrightarrow AMSsymbols \dashv \dbinom AMSmath \ddagger \ddddot AMSmath \dddot AMSmath \ddot \ddots \DeclareMathOperator AMSmath \definecolor color \def [newcommand] \deg \Delta \delta \det \dfrac AMSmath \diagdown AMSsymbols \diagup AMSsymbols \diamond \Diamond AMSsymbols \diamonds mediawiki-texvc \diamondsuit \digamma AMSsymbols \Digamma mediawiki-texvc \dim \displaylines \displaystyle \div \divideontimes AMSsymbols \dot \doteq \Doteq AMSsymbols \doteqdot AMSsymbols \dotplus AMSsymbols \dots \dotsb \dotsc \dotsi \dotsm \dotso \doublebarwedge AMSsymbols \doublecap AMSsymbols \doublecup AMSsymbols \Downarrow \downarrow \downdownarrows AMSsymbols \downharpoonleft AMSsymbols \downharpoonright AMSsymbols E - .. code-block:: latex \ell \empty mediawiki-texvc \emptyset \enclose enclose non-standard \end \endgroup begingroup non-standard \enspace \epsilon \Epsilon mediawiki-texvc \eqalign \eqalignno \eqcirc AMSsymbols \eqref [AMSmath] \eqsim AMSsymbols \eqslantgtr AMSsymbols \eqslantless AMSsymbols \equiv \eta \Eta mediawiki-texvc \eth AMSsymbols \euro mediawiki-texvc \exist mediawiki-texvc \exists \exp F - .. code-block:: latex \fallingdotseq AMSsymbols \fbox \fcolorbox color \Finv AMSsymbols \flat \forall \frac \frac AMSmath \frak \frown G - .. code-block:: latex \Game AMSsymbols \Gamma \gamma \gcd \gdef begingroup \ge \geneuro mediawiki-texvc \geneuronarrow mediawiki-texvc \geneurowide mediawiki-texvc \genfrac AMSmath \geq \geqq AMSsymbols \geqslant AMSsymbols \gets \gg \ggg AMSsymbols \gggtr AMSsymbols \gimel AMSsymbols \global begingroup \gnapprox AMSsymbols \gneq AMSsymbols \gneqq AMSsymbols \gnsim AMSsymbols \grave \gt \gt \gtrapprox AMSsymbols \gtrdot AMSsymbols \gtreqless AMSsymbols \gtreqqless AMSsymbols \gtrless AMSsymbols \gtrsim AMSsymbols \gvertneqq AMSsymbols H - .. code-block:: latex \H mediawiki-texvc \hAar mediawiki-texvc \harr mediawiki-texvc \Harr mediawiki-texvc \hat \hbar \hbox \hdashline \hearts mediawiki-texvc \heartsuit \hline \hom \hookleftarrow \hookrightarrow \hphantom \href [HTML] \hskip \hslash AMSsymbols \hspace \Huge \huge \idotsint AMSmath I - .. code-block:: latex \iff \iiiint AMSmath \iiint \iint \Im \image mediawiki-texvc \imath \impliedby AMSsymbols \implies AMSsymbols \in \inf \infin mediawiki-texvc \infty \injlim AMSmath \int \intercal AMSsymbols \intop \isin mediawiki-texvc \iota \Iota mediawiki-texvc \it J - .. code-block:: latex \jmath \Join AMSsymbols K - .. code-block:: latex \kappa \Kappa mediawiki-texvc \ker \kern \koppa mediawiki-texvc \Koppa mediawiki-texvc L - .. code-block:: latex \label [AMSmath] \Lambda \lambda \land \lang mediawiki-texvc \langle \LARGE \Large \large \larr mediawiki-texvc \Larr mediawiki-texvc \lArr mediawiki-texvc \LaTeX \lbrace \lbrack \lceil \ldotp \ldots \le \leadsto AMSsymbols \left \Leftarrow \leftarrow \leftarrowtail AMSsymbols \leftharpoondown \leftharpoonup \leftleftarrows AMSsymbols \Leftrightarrow \leftrightarrow \leftrightarrows AMSsymbols \leftrightharpoons AMSsymbols \leftrightsquigarrow AMSsymbols \leftroot \leftthreetimes AMSsymbols \leq \leqalignno \leqq AMSsymbols \leqslant AMSsymbols \lessapprox AMSsymbols \lessdot AMSsymbols \lesseqgtr AMSsymbols \lesseqqgtr AMSsymbols \lessgtr AMSsymbols \lesssim AMSsymbols \let [newcommand] \lfloor \lg \lgroup \lhd AMSsymbols \lim \liminf \limits \limsup \ll \llap \llcorner AMSsymbols \Lleftarrow AMSsymbols \lll AMSsymbols \llless AMSsymbols \lmoustache \ln \lnapprox AMSsymbols \lneq AMSsymbols \lneqq AMSsymbols \lnot \lnsim AMSsymbols \log \Longleftarrow \longleftarrow \Longleftrightarrow \longleftrightarrow \longmapsto \Longrightarrow \longrightarrow \looparrowleft AMSsymbols \looparrowright AMSsymbols \lor \lower \lozenge AMSsymbols \lrarr mediawiki-texvc \Lrarr mediawiki-texvc \lrArr mediawiki-texvc \lrcorner AMSsymbols \Lsh AMSsymbols \lt \lt \ltimes AMSsymbols \lVert AMSmath \lvert AMSmath \lvertneqq AMSsymbols M - .. code-block:: latex \maltese AMSsymbols \mapsto \mathbb \mathbf \mathbin \mathcal \mathchoice [mathchoice] \mathclose \mathfrak \mathinner \mathit \mathop \mathopen \mathord \mathpunct \mathrel \mathring AMSmath \mathrm \mathscr \mathsf \mathstrut \mathtip action non-standard \mathtt \matrix \max \mbox \measuredangle AMSsymbols \mho AMSsymbols \mid \middle \min \mit \mkern \mmlToken non-standard \mod \models \moveleft \moveright \mp \mskip \mspace \mu \Mu mediawiki-texvc \multimap AMSsymbols N - .. code-block:: latex \N mediawiki-texvc \nabla \natural \natnums mediawiki-texvc \ncong AMSsymbols \ne \nearrow \neg \negmedspace AMSmath \negthickspace AMSmath \negthinspace \neq \newcommand [newcommand] \newenvironment [newcommand] \Newextarrow extpfeil \newline \nexists AMSsymbols \ngeq AMSsymbols \ngeqq AMSsymbols \ngeqslant AMSsymbols \ngtr AMSsymbols \ni \nLeftarrow AMSsymbols \nleftarrow AMSsymbols \nLeftrightarrow AMSsymbols \nleftrightarrow AMSsymbols \nleq AMSsymbols \nleqq AMSsymbols \nleqslant AMSsymbols \nless AMSsymbols \nmid AMSsymbols \nobreakspace AMSmath \nolimits \normalsize \not \notag [AMSmath] \notin \nparallel AMSsymbols \nprec AMSsymbols \npreceq AMSsymbols \nRightarrow AMSsymbols \nrightarrow AMSsymbols \nshortmid AMSsymbols \nshortparallel AMSsymbols \nsim AMSsymbols \nsubseteq AMSsymbols \nsubseteqq AMSsymbols \nsucc AMSsymbols \nsucceq AMSsymbols \nsupseteq AMSsymbols \nsupseteqq AMSsymbols \ntriangleleft AMSsymbols \ntrianglelefteq AMSsymbols \ntriangleright AMSsymbols \ntrianglerighteq AMSsymbols \nu \Nu mediawiki-texvc \nVDash AMSsymbols \nVdash AMSsymbols \nvDash AMSsymbols \nvdash AMSsymbols \nwarrow O - .. code-block:: latex \O mediawiki-texvc \odot \officialeuro mediawiki-texvc \oint \oldstyle \Omega \omega \omicron \Omicron mediawiki-texvc \ominus \operatorname AMSmath \oplus \or mediawiki-texvc \oslash \otimes \over \overbrace \overleftarrow \overleftrightarrow \overline \overrightarrow \overset \overwithdelims \owns P - .. code-block:: latex \P mediawiki-texvc \pagecolor mediawiki-texvc \parallel \part mediawiki-texvc \partial \perp \phantom \Phi \phi \Pi \pi \pitchfork AMSsymbols \plusmn mediawiki-texvc \pm \pmatrix \pmb \pmod \pod \Pr \prec \precapprox AMSsymbols \preccurlyeq AMSsymbols \preceq \precnapprox AMSsymbols \precneqq AMSsymbols \precnsim AMSsymbols \precsim AMSsymbols \prime \prod \projlim AMSmath \propto \Psi \psi Q - .. code-block:: latex \Q mediawiki-texvc \qquad \quad R - .. code-block:: latex \R mediawiki-texvc \raise \rang mediawiki-texvc \rangle \rarr mediawiki-texvc \Rarr mediawiki-texvc \rArr mediawiki-texvc \rbrace \rbrack \rceil \Re \real mediawiki-texvc \reals mediawiki-texvc \Reals mediawiki-texvc \ref [AMSmath] \renewcommand [newcommand] \renewenvironment [newcommand] \require non-standard \restriction AMSsymbols \rfloor \rgroup \rhd AMSsymbols \rho \Rho mediawiki-texvc \right \Rightarrow \rightarrow \rightarrowtail AMSsymbols \rightharpoondown \rightharpoonup \rightleftarrows AMSsymbols \rightleftharpoons \rightleftharpoons AMSsymbols \rightrightarrows AMSsymbols \rightsquigarrow AMSsymbols \rightthreetimes AMSsymbols \risingdotseq AMSsymbols \rlap \rm \rmoustache \root \Rrightarrow AMSsymbols \Rsh AMSsymbols \rtimes AMSsymbols \Rule non-standard \rVert AMSmath \rvert AMSmath S - .. code-block:: latex \S \sampi mediawiki-texvc \Sampi mediawiki-texvc \scr \scriptscriptstyle \scriptsize \scriptstyle \sdot mediawiki-texvc \searrow \sect mediawiki-texvc \sec \setminus \sf \sharp \shortmid AMSsymbols \shortparallel AMSsymbols \shoveleft AMSmath \shoveright AMSmath \sideset AMSmath \Sigma \sigma \sim \simeq \sin \sinh \skew \small \smallfrown AMSsymbols \smallint \smallsetminus AMSsymbols \smallsmile AMSsymbols \smash \smile \spades mediawiki-texvc \Space \space \spadesuit \sphericalangle AMSsymbols \sqcap \sqcup \sqrt \sqsubset AMSsymbols \sqsubseteq \sqsupset AMSsymbols \sqsupseteq \square AMSsymbols \stackrel \star \stigma mediawiki-texvc \Stigma mediawiki-texvc \strut \style [HTML] non-stanard \sub mediawiki-texvc \sube mediawiki-texvc \subset \Subset AMSsymbols \subseteq \subseteqq AMSsymbols \subsetneq AMSsymbols \subsetneqq AMSsymbols \substack AMSmath \succ \succapprox AMSsymbols \succcurlyeq AMSsymbols \succeq \succnapprox AMSsymbols \succneqq AMSsymbols \succnsim AMSsymbols \succsim AMSsymbols \sum \sup \supe mediawiki-texvc \supset \Supset AMSsymbols \supseteq \supseteqq AMSsymbols \supsetneq AMSsymbols \supsetneqq AMSsymbols \surd \swarrow T - .. code-block:: latex \tag [AMSmath] \tan \tanh \tau \Tau mediawiki-texvc \tbinom AMSmath \TeX \text \textbf \textit \textrm \textsf \textstyle \texttt \texttip action non-standard \textvisiblespace mediawiki-texvc \tfrac AMSmath \therefore AMSsymbols \Theta \theta \thetasym mediawiki-texvc \thickapprox AMSsymbols \thicksim AMSsymbols \thinspace \tilde \times \tiny \Tiny non-standard \to \toggle action non-standard \top \triangle \triangledown AMSsymbols \triangleleft \trianglelefteq AMSsymbols \triangleq AMSsymbols \triangleright \trianglerighteq AMSsymbols \tt \twoheadleftarrow AMSsymbols \twoheadrightarrow AMSsymbols U - .. code-block:: latex \uarr mediawiki-texvc \uArr mediawiki-texvc \Uarr mediawiki-texvc \ulcorner AMSsymbols \underbrace \underleftarrow \underleftrightarrow \underline \underrightarrow \underset \unicode [unicode] non-standard \unlhd AMSsymbols \unrhd AMSsymbols \Uparrow \uparrow \Updownarrow \updownarrow \upharpoonleft AMSsymbols \upharpoonright AMSsymbols \uplus \uproot \Upsilon \upsilon \upuparrows AMSsymbols \urcorner AMSsymbols V - .. code-block:: latex \varcoppa mediawiki-texvc \varDelta AMSsymbols \varepsilon \varGamma AMSsymbols \varinjlim AMSmath \varkappa AMSsymbols \varLambda AMSsymbols \varliminf AMSmath \varlimsup AMSmath \varnothing AMSsymbols \varOmega AMSsymbols \varphi \varPhi AMSsymbols \varpi \varPi AMSsymbols \varprojlim AMSmath \varpropto AMSsymbols \varPsi AMSsymbols \varrho \varsigma \varSigma AMSsymbols \varstigma mediawiki-texvc \varsubsetneq AMSsymbols \varsubsetneqq AMSsymbols \varsupsetneq AMSsymbols \varsupsetneqq AMSsymbols \vartheta \varTheta AMSsymbols \vartriangle AMSsymbols \vartriangleleft AMSsymbols \vartriangleright AMSsymbols \varUpsilon AMSsymbols \varXi AMSsymbols \vcenter \vdash \Vdash AMSsymbols \vDash AMSsymbols \vdots \vec \vee \veebar AMSsymbols \verb [verb] \Vert \vert \vline mediawiki-texvc \vphantom \Vvdash AMSsymbols W - .. code-block:: latex \wedge \weierp mediawiki-texvc \widehat \widetilde \wp \wr X - .. code-block:: latex \Xi \xi \xcancel cancel \xleftarrow AMSmath \xlongequal extpfeil \xmapsto extpfeil \xrightarrow AMSmath \xtofrom extpfeil \xtwoheadleftarrow extpfeil \xtwoheadrightarrow extpfeil Y - .. code-block:: latex \yen AMSsymbols Z - .. code-block:: latex \Z mediawiki-texvc \zeta \Zeta mediawiki-texvc Environments ------------ LaTeX environments of the form ``\begin{XXX} ... \end{XXX}`` are provided where ``XXX`` is one of the following: .. code-block:: latex align [AMSmath] align* [AMSmath] alignat [AMSmath] alignat* [AMSmath] aligned [AMSmath] alignedat [AMSmath] array Bmatrix bmatrix cases CD AMSmath eqnarray eqnarray* equation equation* gather [AMSmath] gather* [AMSmath] gathered [AMSmath] matrix multline [AMSmath] multline* [AMSmath] pmatrix smallmatrix AMSmath split [AMSmath] subarray AMSmath Vmatrix vmatrix mathjax-docs-2.7+20171212/upgrading/0000755000000000000000000000000013213762601013506 5ustar mathjax-docs-2.7+20171212/upgrading/index.rst0000644000000000000000000000117413213762601015352 0ustar ################# Upgrading MathJax ################# .. toctree:: :name: upgrading-MathJax :maxdepth: 1 What's New in MathJax v2.7 What's New in MathJax v2.6 What's New in MathJax v2.5 What's New in MathJax v2.4 What's New in MathJax v2.3 What's New in MathJax v2.2 What's New in MathJax v2.1 What's New in MathJax v2.0 What's New in MathJax v1.1 Migrating from MathJax v1.0 to v1.1 Converting to MathJax from jsMath mathjax-docs-2.7+20171212/upgrading/jsMath.rst0000644000000000000000000000412313213762601015466 0ustar .. _jsMath-support: ********************************* Converting to MathJax from jsMath ********************************* MathJax is the successor to the popular `jsMath `_ package for rendering mathematics in web pages. Like jsMath, MathJax works by locating and processing the mathematics within the webpage once it has been loaded in the browser by a user viewing your web pages. If you are using jsMath with its ``tex2math`` preprocessor, then switching to MathJax should be easy, and is simply a matter of configuring MathJax appropriately. See the section on :ref:`Loading and Configuring MathJax ` for details. On the other hand, if you are using jsMath's ``...`` and ``
...
`` tags to mark the mathematics in your document, then you should use MathJax's ``jsMath2jax`` preprocessor when you switch to MathJax. To do this, include ``"jsMath2jax.js"`` in the `extensions` array of your configuration, with the `jax` array set to include ``"input/TeX"``. For example, .. code-block:: html would load the ``jsMath2jax`` preprocessor, along with a configuration file that processes TeX input and produces HTML-with-CSS output. There are a few configuration options for ``jsMath2jax``, which you can find in the ``config/default.js`` file, or in the :ref:`jsMath configuration options ` section. If you are generating your jsMath documents programmatically, it would be better to convert from generating the jsMath ```` and ``
`` tags to producing the corresponding MathJax `` would become .. code-block:: html instead. This will make sure your pages pass HTML5 validation. Be sure that you put the configuration block **before** the script that loads MathJax. See :ref:`Loading and Configuring MathJax ` for more details. If your page simply loads ``MathJax.js`` and relies on ``config/MathJax.js``, then you will need to modify your `` in the past, you should replace it with .. code-block:: html instead. If you don't do this, you will receive a warning message that directs you to a page that explains how to update your script tags to use the new configuration format. Combined Configurations ======================= New with version 1.1 is the ability to combine several files into a single configuration file, and to load that via the same script that loads MathJax. This should make configuring MathJax easier, and also helps to speed up the initial loading of MathJax's components, since only one file needs to be downloaded. MathJax comes with four pre-built configurations, and our hope is that one of these will suit your needs. They are described in more detail in the :ref:`Using a Configuration File ` section. To load one, add ``?config=filename`` (where ``filename`` is the name of the configuration file without the ``.js``) to the URL that loads ``MathJax.js``. For example .. code-block:: html could be replaced by the single line .. code-block:: html In this way, you don't have to include the in-line configuration, and all the needed files will be downloaded when MathJax starts up. For complete details about the contents of the combined configuration files, see the :ref:`Common Configurations ` section. If you want to use a pre-defined configuration file, but want to modify some of the configuration parameters, you can use both a ``text/x-mathjax-config`` block and a ``config=filename`` parameter in combination. For example, .. code-block:: html would load the ``TeX-AMS_HTML`` configuration file, but would reconfigure the inline math delimiters to include ``$...$`` in addition to ``\(...\)``, and would set the ``processEscapes`` parameter to ``true``. Loading MathJax from a CDN ========================== The MathJax installation is fairly substantial (due to the large number of images needed for the image fonts), and so you may not want to (or be able to) store MathJax on your own server. Keeping MathJax up to date can also be a maintenance problem, and you might prefer to let others handle that for you. In either case, using the MathJax distributed network service may be the best way for you to obtain MathJax. That way you can be sure you are using an up-to-date version of MathJax, and that the server will be fast and reliable. See :ref:`Loading MathJax from a CDN ` for more information. Change in default TeX delimiters ================================ In addition to the fact that MathJax v1.1 no longer loads a default configuration file, there is a second configuration change that could affect your pages. The ``config/MathJax.js`` file properly configured the `tex2jax` preprocessor to use only ``\(...\)`` and not ``$...$`` for in-line math delimiters, but the `tex2jax` preprocessor itself incorrectly defaulted to including ``$...$`` as in-line math delimiters. The result was that if you used in-line configuration to specify the ``tex2jax`` preprocessor, single-dollar delimiters were enabled by default, while if you used file-based configuration, they weren't. This inconsistency was an error, and the correct behavior was supposed to have the single-dollar delimiters disabled in both cases. This is now true in v1.1 of MathJax. This means that if you used in-line configuration to specify the `tex2jax` preprocessor, you will need to change your configuration to explicitly enable the single-dollar delimiters if you want to use them. For example, if you had .. code-block:: html and you want to use single-dollar delimiters for in-line math, then you should replace this with .. code-block:: html The same technique can be used in conjunction with a combined configuration file. For example .. code-block:: html will load the pre-defined ``TeX-AMS_HTML`` configuration, but will modify the settings to allow ``$...$`` delimiters, and to process ``\$`` to produce dollar signs within the text of the page. New Distribution Location ========================= Version 1.0 of MathJax was distributed through `SourceForge`, but the development of MathJax has switched to `GitHub `_, which is now the primary location for MathJax source code and distributions. The SourceForge repository will no longer be actively maintained (and hasn't been since November 2010), and so you will not be able to obtain updates through ``svn`` if you checked out MathJax from there. You may be able to switch to using the MathJax CDN (see above) rather than hosting your own copy of MathJax, and avoid the problem of updates all together. If you must install your own copy, however, you should follow the instructions at :ref:`Installing and Testing MathJax `, using either ``git`` or ``svn`` as described to obtain your copy from GitHub. This will allow you to keep your copy of MathJax up to date as development continues. We apologize for the inconvenience of having to switch distributions, but the git-to-svn bridge we tried to implement to keep both copies in synch turned out to be unreliable, and so the SourceForge distribution was retired in favor of the GitHub site. mathjax-docs-2.7+20171212/upgrading/whats-new-1.1.rst0000644000000000000000000001217613213762601016461 0ustar .. _whats-new-1.1: ************************** What's New in MathJax v1.1 ************************** MathJax version 1.1 includes a number of important improvements and enhancements over version 1.0. We have worked hard to fix bugs, improve support for browsers and mobile devices, process TeX and MathML better, and increase MathJax's performance. In addition to these changes, MathJax.org now offers MathJax as a network service. Instead of having to install MathJax on your own server, you can link to our content delivery network (CDN) to get fast access to up-to-date and past versions of MathJax. See :ref:`Loading MathJax from the CDN ` for more details. The following sections outline the changes in v1.1: Optimization ============ * Combined configuration files that load all the needed files in one piece rather than loading them individually. This simplifies configuration and speeds up typesetting of the mathematics on the page. * Improved responsiveness to mouse events during typesetting. * Parallel downloading of files needed by MathJax, for faster startup times. * Shorter timeout for web fonts, so if they can't be downloaded, you don't have to wait so long. * Rollover to image fonts if a web font fails to load (so you don't have to wait for *every* font to fail. * The MathJax files are now packed only with `yuicompressor` rather than a custom compressor. The CDN serves gzipped versions, which end up being smaller than the gzipped custom-packed files. * Improved rendering speed in IE by removing ``position:relative`` from the style for mathematics. * Improved rendering speed for most browsers by isolating the mathematics from the page during typesetting (avoids full page reflows). Enhancements ============ * Allow the input and output jax configuration blocks to specify extensions to be loaded when the jax is loaded (this avoids needing to load them up front, so they don't have to be loaded on pages that don't include mathematics, for example). * Better handling of background color from style attributes. * Ability to pass configuration parameters via script URL. * Support HTML5 compliant configuration syntax. * Switch the Git repository from storing the fonts in `fonts.zip` to storing the `fonts/` directory directly. * Improved About box. * Added a minimum scaling factor (so math won't get too small). TeX Support ============ * Added support for ``\href``, ``\style``, ``\class``, ``\cssId``. * Avoid recursive macro definitions and other resource consumption possibilities. * Fix for ``\underline`` bug. * Fix for bug with ``\fbox``. * Fix height problem with ``\raise`` and ``\lower``. * Fix problem with ``\over`` used inside array entries. * Fix problem with nesting of math delimiters inside text-mode material. * Fix single digit super- and subscripts followed by punctuation. * Make sure `movablelimits` is off for ``\underline`` and related macros. * Fix problem with dimensions given with ``pc`` units. MathML Support ============== * Fix ``<`` and ``&`` being translated too early. * Handle self-closing tags in HTML files better. * Combine adjacent relational operators in ```` tags. * Fix entity name problems. * Better support for MathML namespaces. * Properly handle comments within MathML in IE. * Properly consider ```` and ```` as space-like. * Improved support for ```` with embellished operators. Other Bug Fixes =============== * Fixed CSS bleed through with zoom and other situations. * Fixed problems with ``showMathMenuMSIE`` when set to ``false``. * Replaced illegal prefix characters in cookie name. * Improved placement of surd for square roots and n-th roots. * Fixed layer obscuring math from MathPlayer for screen readers. * Newlines in CDATA comments are now handled properly. * Resolved conflict between `jsMath2jax` and `tex2jax` both processing the same equation. * Fixed problem with ``class="tex2jax_ignore"`` affecting the processing of sibling elements. Browser Support =============== **Android** * Added detection and configuration for Android browser. * Allow use of OTF web fonts in Android 2.2. **Blackberry** * MathJax now works with OS version 6. **Chrome** * Use OTF web fonts rather than SVG fonts for version 4 and above. **Firefox** * Added Firefox 4 detection and configuration. * Fix for extra line-break bug when displayed equations are in preformatted text. * Updated fonts so that FF 3.6.13 and above can read them. **Internet Explorer** * Changes for compatibility with IE9. * Fix for IE8 incorrectly parsing MathML. * Fix for IE8 namespace problem. * Fix for null ``parentNode`` problem. * Fix for ``outerHTML`` not quoting values of attributes. **iPhone/iPad** * Added support for OTF web fonts in iOS4.2. **Nokia** * MathJax now works with Symbian\ :sup:`3`\ . **Opera** * Prevent Opera from using STIX fonts unless explicitly requested via the font menu (since Opera can't display many of the characters). * Fixed bad em-size detection in 10.61. * Fixed a problem with the About dialog in Opera 11. **Safari** * Use OTF web fonts for Safari/PC. **WebKit** * Better version detection. mathjax-docs-2.7+20171212/upgrading/whats-new-2.0.rst0000644000000000000000000007066213213762601016465 0ustar .. _whats-new-2.0: ************************** What's New in MathJax v2.0 ************************** MathJax version 2.0 includes many new and improved features, including much better speeds in Internet Explorer, a new AsciiMath input processor, a new :term:`SVG` output processor, support for additional LaTeX commands, and many bug fixes, to name just a few of the changes. Major speed improvement for HTML-CSS output, particularly in IE =============================================================== The HTML-CSS output processing was redesigned to avoid the page reflows that were the main source of the speed problem in Internet Explorer 8 and 9. For test pages having between 20 and 50 typeset expressions, we see an 80% reduction in output processing time for IE8, a 50% reduction for IE9, and between 15% and 25% reduction for most other browsers over the corresponding v1.1a times. Since the processing time in v1.1a grows non-linearly in IE, you should see even larger savings for pages with more equations when using v2.0. Forcing IE7 emulation mode is no longer necessary (and indeed is no longer recommended). Reduced flickering during typsetting ==================================== In the past, each expression was displayed as soon as it was typeset, which caused a lot of visual flickering as MathJax processed the page. In v2.0, the output is processed in blocks so that typeset expressions are revealed in groups. This reduces the visual distraction, and also speeds up the processing. The number of equations in a block can be controlled through the ``EqnChunk`` parameter in the HTML-CSS or SVG block of your configuration. See the :ref:`configuration options for HTML-CSS ` and :ref:`configuration options for SVG ` pages for details. If the page URL includes a hash reference (a link to a particular location within the page), MathJax v2.0 will jump to that location after the page has finished typsetting. (Since the size of the page may have changed due to the mathematical typsetting, that location may no longer be visible on screen, so MathJax moves there when it is done with the initial typesetting.) You can control this behavior with the ``positionToHash`` parameter in the main section of your configuration. See the :ref:`core configuration options ` page for details. Automatic equation numbering of TeX formulas ============================================ The TeX input jax now can be configured to add equation numbers (though the default is not to number equations so that existing pages will not change their appearance). This is controlled through the ``equationNumbers`` section of the ``TeX`` block of your configuration (see the :ref:`equation numbering ` section for details). You can request that the numbering follow the AMS-style numbering of environments, or you can request that every displayed equation be numbered. There are now ``\label``, ``\ref``, and ``\eqref`` commands to make it easier to link to particular equations within the document. Automatic line breaking of long displayed equations =================================================== MathJax now implements the MathML3 specification for automatic line breaking of displayed equations in its HTML-CSS output. This is disabled by default, but can be enabled via the ``linebreaks`` section of the ``HTML-CSS`` or ``SVG`` block of your configuration (see the :ref:`automatic line breaking ` section for details). Note that automatic line breaking only applies to displayed equations, not in-line equations, unless they are themselves longer than a line. The algorithm uses the nesting depth, the type of operator, the size of spaces, and other factors to decide on the breakpoints, but it does not know the meaning of the mathematics, and may not choose the optimal breakpoints. We will continue to work on the algorithm as we gain information from its actual use in the field. New AsciiMath input jax and SVG output jax ========================================== MathJax currently processes math in either :term:`TeX` and :term:`LaTeX` format, or :term:`MathML` notation; version 2.0 augments that to include :term:`AsciiMath` notation (see `the ASCIIMathML home page `_ for details on this format). This is a notation that is easier for students to use than TeX, and has been requested by the user community. See the :ref:`AsciiMath support ` page for details. In addition to the HTML-CSS and Native MathML output available in v1.1, MathJax v2.0 includes an :term:`SVG`-based output jax. This should prove to be more reliable than the HTML-CSS output, as it avoids some CSS, web-font, and printing issues that the HTML-CSS output suffers from, and it currently has no browser-dependent code. The SVG mode even works in some ebook readers (like Apple iBooks and Calibre). See the :ref:`output formats ` documentation for details. New combined configuration files ================================ Pre-defined configuration files that include the AsciiMath and SVG processors are now available with MathJax v2.0. These include ``AM_HTMLorMML``, ``TeX-AMS-MML_SVG``, and ``TeX-MML-AM_HTMLorMML``. See the :ref:`common configurations ` section for details. MathJax contextual menu now available on mobile devices ======================================================= MathJax v2.0 provides access to its contextual menu in mobile devices that are based on the WebKit (Safari) and Gecko (Firefox) engines. For Mobile Firefox, the menu is accessed by a tap-and-hold on any expression rendered by MathJax (this is Mobile Firefox's standard method of triggering a contextual menu). In Mobile Safari, use a double-tap-and-hold (you may need to zoom in a bit to be able to accomplish this). This is the first step toward providing a better interface for mobile devices. Improved support for screen readers =================================== Some issues surrounding the use of screen readers and their interaction with MathPlayer have been resolved in MathJax v2.0. In particular, there are additional menu items that allow the user finer control over some aspects of MathJax's interface that were interfering with some screen readers' ability to properly identify the mathematics. Several stability issues with MathPlayer have also been addressed. In Internet Explorer when MathPlayer is installed, there is now a new contextual menu item to allow you to specify what events are handled by MathJax and what should be handled by MathPlayer. This gives you finer control over MathPlayer's interaction with some screen readers. Many new TeX additions and enhancements ======================================= * New `mhchem` chemistry extension (adds ``\ce``, ``\cf``, and ``\cee`` macros) * New `cancel` extension (adds ``\cancel``, ``\bcancel``, ``\xcancel``, and ``\cancelto`` macros) * New `extpfeil` extension (adds more stretchy arrows) * New `color` extension (makes ``\color`` work as a switch, as in LaTeX). Adds ``\definecolor``, other color models, LaTeX named colors, ``\colorbox``, ``\fcolorbox``, etc. * New `begingroup` extension to allow macro definitions to be localized. Adds ``\begingroup`` and ``\endgroup`` for isolating macro declarations, and defines ``\let``, ``\renewenvironment``, ``\global``, and ``\gdef``. * New `enclose` extension to give TeX access to ```` elements. Adds ``\enclose{type}[attributes]{math}`` macro. * New `action` extension to give TeX access to ```` elements. Adds ``\mathtip{math}{tip}``, ``\texttip{math}{tip}``, and ``\toggle{math1}{math2}...\endtoggle`` macros. * New ``\mmToken{type}[attributes]{text}`` macro for producing ````, ````, ````, and other token MathML elements directly. * New ``\bbox[color;attributes]{math}`` macro to add background color, padding, borders, etc. * New ``\middle`` macro for stretchy delimiters between ``\left`` and ``\right``. * New ``\label``, ``\ref``, and ``\eqref`` macros for numbered equations. * Better implementation of ``\not`` so it produces proper MathML when possible. * Better implementation of ``\dots`` that selects ``\ldots`` or ``\cdots`` depending on the context. * Better implementation of ``\cases`` that automatically uses ``\text`` on the second entry in each row. * Safer implementation of ``\require`` that only allows loading from extensions directory. * Allow ``\newcommand`` to provide a default parameter. * Allow ``\\`` to take an optional argument that specifies additional space between lines. * Allow ``\\`` to be used anywhere (to force a line break), not just in arrays. * Allow optional alignment parameter for array, aligned, and gathered environments. See the :ref:`TeX support ` page for details on these extensions and macros. Font enhancements ================= * Work around for the OS X Lion STIX font problem. * Support for STIX-1.1 fonts (detection of which version you have, and use data appropriate for that). * New WOFF versions of the web fonts (smaller, so faster to download). * Data for more stretchy characters in HTML-CSS output. * Add support for Unicode planes 1 through 10 (not just the Math Alphabet block) in HTML-CSS output. * Increased timeout for web fonts (since it was switching to image fonts too often, especially for mobile devices). * Only switch to image fonts if the first web font fails to load (if we can access one, assume we can access them all). * Allow ```` elements to use the page font rather than MathJax fonts (optionally). This is controlled by the ``mtextFontInerhit`` configuration parameter for HTML-CSS and SVG output jax. * Provide better control over the font used for characters that are not in the MathJax fonts. * Allow Firefox to use web-based fonts when a local URL uses MathJax from the CDN (in the past it would force image fonts when that was not necessary). Interface improvements ====================== * The MathJax contextual menu has been reorganized to make it easier to get the source view, and to control the parameters for MathPlayer in IE. * The MathJax contextual menu is available in mobile devices (see description above). * Warning messages are issued if you switch renderers to one that is inappropriate for your browser. * MathJax now starts processing the page on the ``DOMContentLoaded`` event rather than the page ``onload`` event (this allows the mathematics to appear sooner). * Native MathML output is now scaled to better match the surrounding font (like it is for HTML-CSS output). * Better CSS styling for NativeMML output in Firefox in order to handle ``\cal`` and other fonts. * MathML output now (optionally) includes class names to help mark special situations generated by the TeX input jax. (This lets the MathML from the Show Source menu item better reproduce the original TeX output.) * MathJax now loads the menu and zoom code (if they haven't been loaded already) after the initial typesetting has occured so that they will be available immediately when a user needs those features, but do not delay the initial typesetting of the mathematics. * For the `tex2jax` preprocessor, the ``processClass`` can now be used to override the ``skipTags`` to force a tag that is usually skipped to have its contents be processed. * The `noErrors` and `noUndefined` extensions can now be disabled via a configuration option (since they are included in many of the combined configuration files). See the `noErrors` and `noUndefined` sections of the :ref:`TeX support ` page for more information. * There is a new :meth:`MathJax.Hub.setRenderer()` function that can be used to switch the current renderer. See the :ref:`MathJax Hub API ` documentation for details. * A user-defined macros is no longer overridden if an extension is loaded that redefines that macro. * Improved web-font detection reliability. .. _important-changes-2.0: Important changes from previous versions ======================================== * The default renderer for Firefox has been changed from `NativeMML` to `HTML-CSS` (in those configurations that choose between the two). The only browser that defaults to `NativeMML` is now IE with MathPlayer installed. You can configure this to your liking using the :ref:`MMLorHTML configuration options `. * `NativeMML` output will now be selected in IE9 when MathPlayer is present (since IE9 was released the same day as MathJax v1.1a, and there had been problems with IE9 beta releases, we weren't sure if MathPlayer would work with the official release, and so did not select NativeMML by default.) * The performance improvements in IE8 and IE9 now make it unnecessary to use a ```` tag to force IE7 emulation mode. In fact IE9 in IE9 standards mode now runs faster than IE9 in IE7 standards mode, and IE8 in IE8 standards mode is comparable to IE8 in IE7 standards mode. We now recommend that you use .. code-block:: html to obtain the highest emulation mode available in IE, which will be the fastest one for MathJax 2.0. * The `tex2jax` preprocessor now balances braces when looking for the closing math delimiter. That allows expressions like .. code-block:: latex $y = x^2 \hbox{ when $x > 2$}$ to be properly parsed as a single math expression rather than two separate ones with unbalanced braces. The old behavior can be obtained by setting ``balanceBraces`` to false in the ``tex2jax`` block of your configuration. (See the :ref:`tex2jax configuration options ` for details.) * If you are hosting your own copy of MathJax on your server, and that copy is being used from pages in a different domain, you will have set up the access control paramters for the font directory to allow Firefox to access the font files properly. Since MathJax 2.0 includes fonts in WOFF format, you will need to include ``woff`` in you access control declaration for the fonts. E.g., use :: Header set Access-Control-Allow-Origin "*" in the ``.htaccess` file for the ``Mathjax/fonts`` directory if you are using the Apache web server. See :ref:`Notes about shared installations ` for details. * The ``\cases`` macro now properly places the second column in text mode not math mode. In the past, one needed to use ``\text`` in the second column to achieve the proper results; pages that did this will still work properly in v2.0. Pages that took advantage of the math mode in the second column will need to be adjusted. * The ``\dots`` macro now produces ``\ldots`` or ``\cdots`` depending on the context (in the past, ``\dots`` always produced ``\ldots``). * A one pixel padding has been added above and below HTML-CSS and SVG output so that math on successive lines of a paragraph won't bump into each other. * There is a new `MathPlayer` submenu of the `Math Settings` menu in the MathJax contextual menu that allows the user to control what events are passed on to MathPlayer. This allows better control for those using assistive devices like screen readers. When menu events are being passed on to MathPlayer, the MathJax menu can be obtained by ALT-clicking on a typeset expression (so the user can still access MathJax's other features). * In order to improve stability with IE when MathPlayer is installed, MathJax now adds the namespace and object bindings that are needed for MathPlayer at the time that Mathjax is first loaded, rather than waiting for the `NativeMML` output jax to be loaded. Since this is before the configuration information has been obtained, this will happen regardless of whether the `NativeMML` output jax is requested. This means that IE may ask the user to allow MathPlayer to be used, and may show the MathPlayer splash dialog even when MathPlayer is not in the end used by MathJax. Note that this setup can only be performed if MathJax is loaded explicitly as part of the initial web page; if it is injected into the page later by adding a ``