mathjax-docs-2.6+20151230/0000755000000000000000000000000012641042751013334 5ustar rootrootmathjax-docs-2.6+20151230/mathml.rst0000644000000000000000000001433012641042751015351 0ustar rootroot.. _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/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/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.6+20151230/options/������������������������������������������������������������������0000755�0000000�0000000�00000000000�12641042751�015027� 5����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.6+20151230/options/SVG.rst�����������������������������������������������������������0000644�0000000�0000000�00000016527�12641042751�016233� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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: 10 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.6+20151230/options/hub.rst0000644000000000000000000003212512641042751016342 0ustar rootroot.. _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:: 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:: 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.6+20151230/options/Content-MathML.rst0000644000000000000000000000224112641042751020312 0ustar rootroot.. _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.6+20151230/options/assistive-mml.rst0000644000000000000000000000233612641042751020362 0ustar rootroot.. _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 `. mathjax-docs-2.6+20151230/options/TeX.rst0000644000000000000000000001147712641042751016273 0ustar rootroot.. _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.6+20151230/options/ThirdParty.rst0000644000000000000000000000525312641042751017660 0ustar rootroot.. _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 host a third-party extension repository on the MathJax CDN. This repository allows developers to make their custom extensions easily available to all MathJax users. The code of the repository is hosted on Github at `github.com/mathjax/MathJax-third-party-extensions `_ and is mirrored to the CDN at `cdn.mathjax.org/mathjax/contrib/ `_ To add your extension, please follow the guidelines of the repository. To add the third party repository to your configuration use .. code-block:: javascript or equivalently, .. code-block:: javascript mathjax-docs-2.6+20151230/options/PreviewHTML.rst0000644000000000000000000000547712641042751017704 0ustar rootroot.. _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.6+20151230/options/tex2jax.rst0000644000000000000000000001513412641042751017152 0ustar rootroot.. _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 searpate 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.6+20151230/options/MMLorHTML.rst0000644000000000000000000000466412641042751017246 0ustar rootroot.. _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.6+20151230/options/Safe.rst0000644000000000000000000001446012641042751016444 0ustar rootroot.. _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.6+20151230/options/MML3.rst0000644000000000000000000000106512641042751016273 0ustar rootroot.. _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.6+20151230/options/NativeMML.rst0000644000000000000000000000441412641042751017360 0ustar rootroot.. _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.6+20151230/options/mml2jax.rst0000644000000000000000000000367012641042751017141 0ustar rootroot.. _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.6+20151230/options/handle-floats.rst�������������������������������������������������0000644�0000000�0000000�00000001403�12641042751�020300� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/FontWarnings.rst��������������������������������������������������0000644�0000000�0000000�00000012136�12641042751�020203� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/jsMath2jax.rst����������������������������������������������������0000644�0000000�0000000�00000003104�12641042751�017572� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/MathML.rst��������������������������������������������������������0000644�0000000�0000000�00000001564�12641042751�016711� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/MathEvents.rst����������������������������������������������������0000644�0000000�0000000�00000002167�12641042751�017645� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/CHTML-preview.rst�������������������������������������������������0000644�0000000�0000000�00000000411�12641042751�020103� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/asciimath2jax.rst�������������������������������������������������0000644�0000000�0000000�00000011407�12641042751�020313� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/index.rst���������������������������������������������������������0000644�0000000�0000000�00000004075�12641042751�016676� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.6+20151230/options/HTML-CSS.rst������������������������������������������������������0000644�0000000�0000000�00000021062�12641042751�016754� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/MathZoom.rst0000644000000000000000000000310112641042751017312 0ustar rootroot.. _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.6+20151230/options/MathMenu.rst0000644000000000000000000001035312641042751017301 0ustar rootroot.. _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.6+20151230/options/PlainSource.rst���������������������������������������������������0000644�0000000�0000000�00000002166�12641042751�020012� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _configure-PlainSource: ******************************** The PlainSource output processor ******************************** 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.6+20151230/options/CommonHTML.rst����������������������������������������������������0000644�0000000�0000000�00000005464�12641042751�017507� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _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.6+20151230/options/AsciiMath.rst0000644000000000000000000000356212641042751017431 0ustar rootroot.. _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.6+20151230/options/fast-preview.rst0000644000000000000000000000501212641042751020173 0ustar rootroot.. _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.6+20151230/options/MatchWebFonts.rst0000644000000000000000000000426612641042751020275 0ustar rootroot.. _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.6+20151230/config-files.rst0000644000000000000000000007441712641042751016450 0ustar rootroot.. _common-configurations: *********************** Combined Configurations *********************** MathJax comes with a number of pre-defined and pre-compiled configuration files in the ``MathJax/config`` directory. The ``default.js`` file contains nearly all the possible configuration options together with comments explaining them, so you can use that file to customize MathJax to your needs. Simply load it via .. code-block:: html 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"], 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"], 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"], 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"], 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"], 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"], 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"], 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"] }); 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"] }); 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"] }); 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"] }); 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"] }); 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"] }); 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"], 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"], 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.6+20151230/safe-mode.rst0000644000000000000000000000572412641042751015736 0ustar rootroot.. _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:: javascript 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.6+20151230/whats-new-2.3.rst0000644000000000000000000000647312641042751016315 0ustar rootroot.. _whats-new-2.3: ************************** What's New in MathJax v2.3 ************************** MathJax v2.3 includes a number of new features, as well a more than 30 important bug fixes. Features: ========= * *New webfonts:* MathJax v2.3 adds new webfonts for ``STIX``, ``Asana Math``, ``Neo Euler``, ``Gyre Pagella``, ``Gyre Termes``, and ``Latin Modern``. * *Localization improvements:* MathJax has been accepted into TranslateWiki.net. Thanks to the TWN community we could add 12 complete and over 20 partial translations. * *MathML improvements:* MathJax’s "Show Math as" menu will now expose the MathML annotation features. There are also two new preview options for the MathML input mode: ``mathml`` (now the default), which uses the original MathML as a preview, and ``altimage``, which uses the ```` element's ``altimg`` (if any) for the preview. * *Miscellaneous improvements:* A new extension ``MatchWebFonts`` improves the interaction with the surrounding content when that uses a webfont. A new configuration method allows configurations to be specified using a regular JavaScript variable ``window.MathJax``. * MathJax is now available as a Bower package thanks to community contributions. TeX input: ========== * Prevent the TeX pre-processor from rendering TeX in MathML annotation-xml elements. (`Issue #484 `_) * Fix sizing issue in ``cases`` environment (`Issue #485 `_) Fonts: ====== * Fix block-letter capital I (U+2111) appearing as J in MathJax font (`Issue #555 `_) MathML: ======= * Improved workarounds for MathML output on WebKit (`Issue #482 `_) * Handle empty ``multiscript``, ``mlabeledtr``, and other nodes in Native MathML output (`Issue #486 `_) * Replace non-standard ``MJX-arrow`` class by new ``menclose`` notation (`Issue #481 `_) * Fix incorrect widths in Firefox MathML output (`Issue #558 `_) * Fix display math not being centered in XHTML (`Issue #650 `_) * Fix problem when LaTeX code appears in ``annotation`` node (`Issue #484 `_) HTML-CSS/SVG output =================== * Fix MathJax not rendering in Chrome when sessionStorage is disabled (`Issue #584 `_) * Fix ``\mathchoice`` error with linebreaking in SVG output (`Issue #604 `_) * Fix poor linebreaking of "flat" MathML with unmatched parentheses (`Issue #523 `_) Interface: ========== * Fix Double-Click zoom trigger (`Issue #590 `_) Miscellaneous: ============== * Localization: improved fallbacks for IETF tags (`Issue #492 `_) * Localization: support RTL in messages (`Issue #627 `_) * Improve PNG compression (`Issue #44 `_) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.6+20151230/api/����������������������������������������������������������������������0000755�0000000�0000000�00000000000�12641042751�014105� 5����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������mathjax-docs-2.6+20151230/api/hub.rst���������������������������������������������������������������0000644�0000000�0000000�00000040476�12641042751�015430� 0����������������������������������������������������������������������������������������������������ustar �root����������������������������root�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.. _api-hub: ********************** The MathJax.Hub Object ********************** The MathJax Hub, `MathJax.Hub`, is the main control structure for MathJax. It is where input and output :term:`jax` are tied together, and it is what handles processing of the MathJax ```` element in which the zoomed version of the math should be placed, ``math`` is the DOM element that received the zoom trigger event, and ``Mw`` and ``Mh`` are the maximum width and height allowed for the zoom box (the ``span``). The return value is an object with the following properties: - ``Y`` --- the vertical offset from the top of the ``span`` to the baseline of the mathematics - ``mW`` --- the width of the original mathematics element - ``mH`` --- the height of the original mathematics element - ``zW`` --- the width of the zoomed math - ``zH`` --- the height of the zoomed math All of these values are in pixels. :Parameters: - **jax** --- the jax to be zoomed - **span** --- the ```` in which to place the zoomed math - **math** --- the DOM element generating the zoom event - **Mw** --- the maximum width of the zoom box - **Mh** --- the maximum height of the zoom box :Returns: a structure as described above mathjax-docs-2.6+20151230/api/jax.rst0000644000000000000000000001157012641042751015425 0ustar rootroot.. _api-jax: ****************** The Base Jax Class ****************** The `MathJax.InputJax`, `MathJax.OutputJax` and `MathJax.ElementJax` classes are all subclasses of the base `Jax` class in MathJax. This is a private class that implements the methods common to all three other jax classes. Unlike most MathJax.Object classes, calling the class object creates a *subclass* of the class, rather than an instance of the class. E.g., .. code-block:: javascript MathJax.InputJax.MyInputJax = MathJax.InputJax({ id: "MyInputJax", version: "1.0", ... }); creates ``MathJax.InputJax.MyInputJax`` as a subclass of ``MathJax.InputJax``. Class Properties ================ .. describe:: directory The name of the jax directory (usually ``"[MathJax]/jax"``). Overridden in the subclass to be the specific directory for the class, e.g. ``"[MathJax]/jax/input"``. .. describe:: extensionDir The name of the extensions directory (usually ``"[MathJax]/extensions"``). Instance Properties =================== .. describe:: id The name of the jax. .. describe:: version The version number of the jax. .. describe:: directory The directory for the jax (e.g., ``"[MathJax]/jax/input/TeX"``). .. describe:: require: null An array of files to load before the ``jax.js`` file calls the :meth:`MathJax.Ajax.loadComplete()` method. .. describe:: config: {} An object that contains the default configuration options for the jax. These can be modified by the author by including a configuration subsection for the specific jax in question. .. describe:: JAXFILE: "jax.js" The name of the file that contains the main code for the jax. Methods ======= .. Method:: Translate(script) This is a stub for a routine that should be defined by the jax's ``jax.js`` file when it is loaded. It should perform the translation action for the specific jax. For an input jax, it should return the `ElementJax` object that it created. The :meth:`Translate()` method is never called directly by MathJax; during the ``loadComplete()`` call, this function is copied to the :meth:`Process()` method, and is called via that name. The default :meth:`Translate()` method throws an error indicating that the :meth:`Translate()` method was not redefined. That way, if the ``jax.js`` file fails to load for some reason, you will receive an error trying to process mathematics with this jax. :Parameters: - **script** --- reference to the DOM `` where ``path-to-MathJax`` is replaced by the URL of the copy of MathJax that you are loading. For example, if you are using the MathJax 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 the CDN ============================ MathJax is available as a web service from ``cdn.mathjax.org``, so you can obtain MathJax from there without needing to install it on your own server. The 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. The CDN hosts the most current version of MathJax, as well as older versions, so you can either link to a version that stays up-to-date as MathJax is improved, or you can stay with one of the release versions so that your pages always use the same version of MathJax. The URL that you use to obtain MathJax determines the version that you get. The CDN has the following directory structure: .. code-block:: sh mathjax/ # project-name 1.0-latest/ 1.1-latest/ # the 1.1 release with any critical patches 2.0-latest/ # the 2.0 release with any critical patches 2.1-latest/ # the 2.1 release with any critical patches 2.2-latest/ # the 2.2 release with any critical patches 2.3-latest/ # the 2.3 release with any critical patches 2.4-latest/ # the 2.4 release with any critical patches 2.5-latest/ # the 2.5 release with any critical patches 2.6-latest/ # the 2.6 release with any critical patches ... latest/ # the most current version (2.6-latest in this case) Each directory corresponds to an official MathJax release; however, hotfixes (urgent bug fixes) will be applied in each release branch as necessary, even if new releases are not prepared. In other words, ``1.1-latest`` will initially point to v1.1, but over time may be updated with patches that would correspond to releases that might be numbers 1.1a, 1.1b, etc., even if such releases are not actually packaged for separate distribution (they likely won't be). We may occasionally introduce directories for betas, as indicated above, but they will be temporary, and will be removed after the official release. To load from a particular release, use the directory for that release. For example, .. code-block:: html loads the v2.0 version, even after v2.1 or later versions are released, while .. code-block:: html will always be the most current stable release, so it will go from v2.3 to the next version automatically when that is released. Note that all the versions available on the CDN are stable versions; the development version is not hosted on the CDN. (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.) The use of ``cdn.mathjax.org`` is governed by its `terms of service `_, so be sure to read that before linking to the MathJax CDN server. If you wish to use the MathJax 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 the CDN ============================================= You can load MathJax from the MathJax CDN server 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 the 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. 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.6+20151230/index.rst0000644000000000000000000001126412641042751015201 0ustar rootroot##################### MathJax Documentation ##################### MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers. Basic Usage =========== .. toctree:: :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 .. _configuration-options: MathJax Configuration Options ============================= .. toctree:: :maxdepth: 1 The configuration objects .. toctree:: :maxdepth: 1 The core options .. toctree:: :maxdepth: 1 The tex2jax preprocessor options The mml2jax preprocessor options The asciimath2jax preprocessor options The jsMath2jax preprocessor options .. toctree:: :maxdepth: 1 The TeX input processor options The MathML input processor options The AsciiMath input 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] .. toctree:: :maxdepth: 1 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] .. toctree:: :maxdepth: 1 The MathMenu options The MathZoom options The MathEvents options The FontWarnings options The Safe options The MatchWebFonts options .. toctree:: :maxdepth: 1 Third-party extensions .. _advanced-topics: Advanced Topics =============== .. toctree:: :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:: :maxdepth: 1 Details of the MathJax API .. _upgrading-MathJax: Miscellanea =============== .. toctree:: :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 Upgrading MathJax ================= .. toctree:: :maxdepth: 1 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 Reference Pages =============== .. toctree:: :maxdepth: 1 HTML snippets CSS style objects Localization strings Glossary * :ref:`Search ` -------- This version of the documentation was built |today|. mathjax-docs-2.6+20151230/tex.rst0000644000000000000000000016003412641042751014672 0ustar rootroot.. _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). Note that 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 `_. 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.) 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 these, 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] } } }); 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. 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 expresion 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. 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. 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 .. _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 \above \abovewithdelims \acute \aleph \alpha \amalg \And \angle \approx \approxeq AMSsymbols \arccos \arcsin \arctan \arg \array \Arrowvert \arrowvert \ast \asymp \atop \atopwithdelims B - .. code-block:: latex \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 \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 \boldsymbol [boldsymbol] \bot \bowtie \Box AMSsymbols \boxdot AMSsymbols \boxed AMSmath \boxminus AMSsymbols \boxplus AMSsymbols \boxtimes AMSsymbols \brace \bracevert \brack \breve \buildrel \bullet \Bumpeq AMSsymbols \bumpeq AMSsymbols C - .. code-block:: latex \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 \choose \circ \circeq AMSsymbols \circlearrowleft AMSsymbols \circlearrowright AMSsymbols \circledast AMSsymbols \circledcirc AMSsymbols \circleddash AMSsymbols \circledR AMSsymbols \circledS AMSsymbols \class [HTML] non-standard \clubsuit \colon \color color \colorbox color \complement AMSsymbols \cong \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 \daleth AMSsymbols \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 \diamondsuit \digamma AMSsymbols \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 \emptyset \enclose enclose non-standard \end \endgroup begingroup non-standard \enspace \epsilon \eqalign \eqalignno \eqcirc AMSsymbols \eqref [AMSmath] \eqsim AMSsymbols \eqslantgtr AMSsymbols \eqslantless AMSsymbols \equiv \eta \eth AMSsymbols \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 \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 \hat \hbar \hbox \hdashline \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 \imath \impliedby AMSsymbols \implies AMSsymbols \in \inf \infty \injlim AMSmath \int \intercal AMSsymbols \intop \iota \it J - .. code-block:: latex \jmath \Join AMSsymbols K - .. code-block:: latex \kappa \ker \kern L - .. code-block:: latex \label [AMSmath] \Lambda \lambda \land \langle \LARGE \Large \large \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 \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 \multimap AMSsymbols N - .. code-block:: latex \nabla \natural \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 \nVDash AMSsymbols \nVdash AMSsymbols \nvDash AMSsymbols \nvdash AMSsymbols \nwarrow O - .. code-block:: latex \odot \oint \oldstyle \Omega \omega \omicron \ominus \operatorname AMSmath \oplus \oslash \otimes \over \overbrace \overleftarrow \overleftrightarrow \overline \overrightarrow \overset \overwithdelims \owns P - .. code-block:: latex \parallel \partial \perp \phantom \Phi \phi \Pi \pi \pitchfork AMSsymbols \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 \qquad \quad R - .. code-block:: latex \raise \rangle \rbrace \rbrack \rceil \Re \ref [AMSmath] \renewcommand [newcommand] \renewenvironment [newcommand] \require non-standard \restriction AMSsymbols \rfloor \rgroup \rhd AMSsymbols \rho \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 \scr \scriptscriptstyle \scriptsize \scriptstyle \searrow \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 \Space \space \spadesuit \sphericalangle AMSsymbols \sqcap \sqcup \sqrt \sqsubset AMSsymbols \sqsubseteq \sqsupset AMSsymbols \sqsupseteq \square AMSsymbols \stackrel \star \strut \style [HTML] non-stanard \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 \supset \Supset AMSsymbols \supseteq \supseteqq AMSsymbols \supsetneq AMSsymbols \supsetneqq AMSsymbols \surd \swarrow T - .. code-block:: latex \tag [AMSmath] \tan \tanh \tau \tbinom AMSmath \TeX \text \textbf \textit \textrm \textstyle \texttip action non-standard \tfrac AMSmath \therefore AMSsymbols \Theta \theta \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 \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 \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 \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 \vphantom \Vvdash AMSsymbols W - .. code-block:: latex \wedge \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 \zeta 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.6+20151230/LICENSE.txt0000644000000000000000000002613612641042751015167 0ustar rootroot 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.6+20151230/whats-new-2.5.rst0000644000000000000000000002401212641042751016304 0ustar rootroot.. _whats-new-2.5: ************************** What's New in MathJax v2.5 ************************** MathJax v2.5 includes a number of new features, as well a more than 70 important bug fixes. The following are some of the highlights. Features -------- * *Speed improvements.* The HTML-CSS output performance was improved by 30-40% (depending on content complexity, with higher gains in more complex content such as very long documents). * *New output for fast preview.* The new CommonHTML output provides a rough but 10x-faster rendering. The ``CHTML-preview`` extension will use this fast output as a preview mode for HTML-CSS or SVG output. * *Improved Content MathML support.* Content MathML is now fully supported via a new extension, in particular this allows customization of the conversion process. * *Improved elementary math support* The experimental support for elementary math elements has been significantly improved special thanks to David Carlisle. * *NodeJS compatibility*. Enable the implementation of a NodeJS API (released as `MathJax-node `__). Numerous display bugs, line-breaking problems, and interface issues have been resolved; for a detailed listing please check the `release milestone `__. Interface --------- * `#834 `__ Fix incorrect line-width when zooming which can cause line-breaking problems. * `#918 `__ Fix zoom box size in NativeMML output. * `#835 `__ Fix zoom for equations extending beyond their bounding box. * `#893 `__ Fix outdated ARIA values for HTML-CSS and SVG output. * `#860 `__, `#502 `__ Preserve RDFa, microdata, aria labels, and other attributes in HTML-CSS and SVG output. * `#935 `__ Escape special characters in TeX annotations. * `#912 `__ Fix missing ``mstyle`` attributes in ``toMathML`` output. * `#971 `__ Fix lost attributes when ``toMathML`` is restarted. Line-breaking ------------- * `#949 `__ Fix processing error due to empty elements. HTML-CSS/SVG/nativeMML display ------------------------------ * `#863 `__ Fix broken MathML preview in MathML pre-processor. * `#891 `__ Fix deprecated regexp affecting mtable alignment. * `#323 `__ Improve MathPlayer compatibility on Internet Explorer 10+. * `#826 `__ Scale content in fallback fonts. * `#898 `__ Fix invalid SVG output when using fallback characters. * `#800 `__ Fix misplaced background color for stretched mphantom elements in SVG output. * `#490 `__ Fix ``\overline`` issues in combination with text-style limits. * `#829 `__ Implement ``\delimitershortfall``, ``\delimiterfactor``. * `#775 `__ Fix lost text content in SVG output. * `#917 `__ Fix cases of incorrect bounding boxes in HTML-CSS output. * `#807 `__ Fix clipping of table columns in HTML-CSS output. * `#804 `__ Fix cases of uneven subscripts. * `#944 `__ Fix rendering error when scaling-all-math of labeled equations. * `#930 `__ Fix SVG output failure when ```` element has inline styles with border or padding. * `#931 `__ Fix baseline alignment in Safari 6.2/7.1/8.0. * `#937 `__ Fix incorrect width in MathJax font data affecting underlining. * `#966 `__ Fix SVG output overlapping when using prefix notation. * `#993 `__ Add workaround for Native MathML in Gecko to re-enable ``mlabeledtr`` etc. * `#1002 `__ Enable SVG output to inherit surrounding text color. TeX emulation ------------- * `#881 `__ Allow ``\newenvironment`` to process optional parameters. * `#889 `__ remove extra space around some parenthesis constructs. * `#856 `__ Recognize comma as decimal delimiter in units. * `#877 `__ Fix bug related to multiple accent having different width. * `#832 `__ Fix multline environment not being centered in HTML-CSS output. * `#776 `__ Fix stretchy delimiters of ``binom`` and ``choose``. * `#900 `__ Fix ``\buildrel`` getting TeX class ORD instead of REL. * `#890 `__ Enable px as dimension in ``\\[...]``. * `#901 `__ Allow ``\limits`` in more cases and add errors for some cases of multiple subscripts. * `#903 `__ Allow ``\hfill`` to set alignment in matrices and arrays (for old fashioned TeX layout). * `#902 `__ Convert ``\eqalignno`` and ``\leqalignno`` into ``mlabeledtr``. * `#906 `__ Allow comma separated parameters in ``\mmlToken``. * `#913 `__ Allow attributes in ``\mmlToken`` whose defaults are false or blank. * `#972 `__ Fix autoload of the ``color`` extension. * `#375 `__ Add ``\{``, ``\}``, and ``\\`` to macros working within ``\text{}`` etc. * `#969 `__ Fix incorrect spacing with some ``\frac`` constructs. * `#982 `__ Fix incorrect spacing in ``aligned`` environments. * `#1013 `__ Fix processing error caused by ``'`` in commutative diagrams using ``AMScd.js``. * `#1005 `__ Add ``wikipedia-texvc.js`` extension. Asciimath --------- * `#851 `__ Prevent leading space in quote from causing processing errors. * `#431 `__ Fix handling of special characters in exponents. * `#741 `__ Add underbrace macro. * `#857 `__ Update AsciiMathML to 2.2; changes include `improve entity handling `__, `add triangle macro `__, `map ast to asterisk `__, `allow input of row vectors `__, `allow lamda `__, `switch phi/varphi mapping `__, `add underbrace macro `__, `handle empty nodes better `__, `add vector norm macro `__, `improve @ macro `__. MathML Handling --------------- * `#847 `__ Fix line-breaks in annotation elements. * `#805 `__ Prevent empty annotation elements from causing math processing errors. * `#769 `__ Update ``indentshift`` implementation to meet clarified MathML specification. * `#768 `__ Fix processing of percentage values for ``indenshift``. * `#839 `__ Update inheritance of ``displaystyle`` in ``mtable`` to meet clarified MathML specification. * `#695 `__ Allow Content MathML converion to be customized. * `#964 `__ Move experimental support for elementary math and RTL to its own extension. Fonts ----- * `#845 `__ Fix webfont bug in Safari 7. * `#950 `__ Fix webfont bug in IE 11. Localization ------------ * `#979 `__ Updated locales thanks to Translatewiki.net; activate locales for Scots and Southern Balochi. APIs ----- * `#873 `__ Combine array of elements when typesetting. * `#693 `__ Add API to allow listeners to be cleared. Misc. ----- * `#870 `__ Add Composer package information. * `#872 `__ Add small delay between input and output phase to prevent performance degredation. * `#1016 `__ Fix bug related to ``