Skip to content

Releases: mathjax/MathJax-src

MathJax v3 beta 4

21 May 00:01
Compare
Choose a tag to compare
MathJax v3 beta 4 Pre-release
Pre-release

This is the fourth public beta release of MathJax v3.

NOTE:
Mathjax v3 is in beta release. Do not use this in production but please test it and report issues at https://github.com/mathjax/mathjax-v3/issues!

This is the final planned beta version. We expect an official 3.0 release in the near future.

What's New

This beta includes a number of important improvements over the beta.3 version, which are described below.

MathJax Components

The biggest change is the ability to create MathJax "components" that can be dynamically loaded by MathJax as needed (much as could be done in version 2). This allows portions of MathJax to be bundled together into components that include most or all of what you need to run MathJax, but still allows less-used pieces to be loaded on demand later when needed. This is similar to v2's combined configuration files and TeX extensions.

The main goal of these components is to use them for the delivery of MathJax from the CDNs that host MathJax. This allows you to customize the MathJax components that you use without having to have (as single files on the CDN) every possible combination of parts that anyone would need packaged together. We will provide a number of all-in-one packages that include an input and output jax together with the data for a font to be used, but also will provide separate components for the individual input and output jax, fonts, TeX extensions, and so on, so that you can mix-and-match them as needed.

MathJax components can be used in the browser as well as on the server in NodeJS applications, so browser and server-side applications can use the same code base and configurations. Components can be combined together into larger packages, either with other MathJax components, or with your own code, via webpack, for example.

Moreover, the tools for building components are available so that you can create your own custom components that you can serve from your own website if you have special needs not addressed by the CDN. For example, authors writing TeX extensions for MathJa can create their own components that can be loaded into MathJax from a different server even if the core MathJax is loaded from a CDN.

Although components are a convenient way of working with MathJax, those writing NodeJS scripts that use MathJax need not use the components as we have packaged them at all; they can continue to import MathJax into their projects directly, as in previous beta versions.

Configuring Components

The component system described above can be configured using a global variable MathJax that you set before loading the main MathJax component that you are planning to use. The MathJax variable specifies configuration blocks for the various components in much the same was as was done in version 2 (this is illustrated in the examples below, and described in more detail in a separate section below). MathJax will modify this global variable to include the methods and data that it creates during the startup process for your use in your applications.

Rendering and Converting Math

The mechanism for rendering expressions in previous beta versions of MathJax 3 involved calling a sequence of MathJax commands to perform the individual actions required to find, compile, typeset, and insert the math into the page. These functions are still available, but there are now several new functions to make that process easier and more natural to perform. The render() method of the MathDocument and MathItem classes will perform all the actions normally needed for typesetting math to the page, and the convert() method will perform conversion from the input format to the output format of the page (or to MathML, which is used internally by MathJax).

These methods use an internal list of actions to be taken when they are called, and those lists are updated automatically when extensions are loaded. For example, when the semantic-enrichment extension is loaded, the action that performs the enrichment is added to render() and convert() automatically, so you don't have to call the extension's methods yourself. You can even add your own actions to the list, if you want, or could remove the automatic ones to fully customize the rendering process.

If you use the MathJax components described above, MathJax will set up short-hand functions for you for typesetting the page or converting from input to output formats. For example, if you load the input/tex and output/chtml components (or the tex-chtml combonent that combines them), you automatically get methods Typeset() and TypesetPromise() for typesetting the page, and tex2chml(), tex2chtmlPromise(), tex2mml(), and tex2mmlPromise() that convert from TeX to HTML or MathML. You also get texReset(), TypesetClear(), and chtmlStylesheet() that reset TeX's labels and equation numbers, reset the typesetting system entirely (the information about CSS used, font caches, etc.), and produce the CSS stylesheet object used by CommonHTML for the expressions you have processed so far. The ones ending in Promise return a promise that is resolved when the math is completed (use this if there is a chance that an external module needs to be loaded, e.g., with \require), while the others perform the typesetting or conversion and return the result immediately (they will throw an error if an external module needs to be loaded).

If you are using the MathJax components, then the MathJax.startup object includes references to the important objects created by MathJax automatically, like the input and output jax, the DOM adaptor, and the MathDocument. You may reference these as needed in order to access their methods for more special-purpose needs. Some of the examples below illustrate this.

Contextual Menu

A contextual menu similar to the one in version 2 has been added to MathJax v3 in this beta version. It has the actions familiar from version 2, but also includes some new features like copying to the clipboard.

Assistive Technology

This beta version now includes support for assistive technology via the generation of speech strings attached to the math elements, and via an interactive expression explorer like the one in version 2. These can be activated using the contextual menu, as in version 2, or by importing the a11y components into your node project or custom webpacked version of MathJax.

CommonHTML CSS

The CommonHTML output now produces only the CSS needed for the expressions on the page, rather than the CSS for every possible character in the font being used. This reduces the number of CSS rules used by CommonHTML considerably, and improves performance of browser refreshes and zooming. If you use NodeJS applications to preprocess math expressions and capture the CSS output to a separate CSS file, you may need to process all the math expressions before generating the CSS file. Alternatively, there is a new adaptiveCSS option for the CommonHTML output jax that you can set to false to have MathJax return to the beta.3 behavior.

SVG Font Caching

The SVG output now includes the option of caching the glyphs used to render the mathematics so that the paths are shared if a character is used more than once. The cache can either be global (all expressions on the page share a common cache) or local (each expression has a cache for glyphs used within it, but they are not shared between expressions). This can be set using the fontCache option for the SVG jax, and it can be set to 'global', 'local', or 'none'. The default is 'local' so that conversion of math to SVG will produce self-contained SVG expressions.

TeX Extensions

As part of the new components feature discussed above, the TeX input jax can load TeX extensions in much the same way that v2 could. This is accomplished through the new require extension that implements the \require macro to load extensions. There is also and autoload extension that will load extensions automatically when their macros or environments are first used. These are included in the default input/tex component, so you if you use that component (or one of the combined components based on it, like tex-chtml or tex-svg), you should have access to these extensions automatically. For example, \require{physics} will load the physics package.

Another new TeX package is the configMacros extension that allows you to configure pre-defined macros using the TeX input jax options, much like you could do in v2. See the tex-macros example below for more information.

The new tagFormat extension allows you to customize how tags are handled in MathJax, and provides the equivalent of the formatNumber(), formatTag(), formatID() and formatURL() options of the TeX equationNumbers configuration block from v2.

The new braket extension implements the physics bra-ket notation macros. They will be loaded automatically if you use the input/tex component, or include the autoload extension in your project.

Color Macro

In version 2, the \color macro worked in a non-standard way. The LaTeX \color macro acts as a switch, to change the current color for all the math that follows it, while the MathJax version took a second argument that enclosed the math to be colored. Version 2 included a color extension that implemented the LaTeX \color behavior, but it was not loaded by default.

In version 3, the LaTeX \color macro will be the default behavior if you are using the input/tex or input/tex-full components, or any component buildt on them (e.g., tex-chtml or tex-svg). You can restore the v2 behavior by setting color: [] in the autoload configuration for the tex component (when using input/tex), or by
removing the color extension...

Read more

MathJax v3 beta 3

28 Nov 18:43
Compare
Choose a tag to compare
MathJax v3 beta 3 Pre-release
Pre-release

This is the third public beta release of MathJax v3.

NOTE

This is a beta release. Do not use this in production but please test it and report issues at https://github.com/mathjax/mathjax-v3/issues!

The master branch is not the beta release; it is the current development copy, set up for development testing. The beta branch is the beta release.

What's New

This release fixes a number of display issues with the SVG output (see #153, #156, #157, #137) and improves the output for nested tables, particularly those with labels and those with percentage widths, in both CommonHTML and SVG output. Problems with table lines in SVG output in Safari and IE were fixed as well.

The TeX input has been updated to include nearly all the extensions that were available in v2, including the color, action, unicode, bbox, html, and several other extensions. These are all included in the webpacked files available in the demos repository (listed below), although the color extension is not enabled by default in order to preserve the behavior of \color in version 2 (this will probably change in the official release of v3).

In addition, there were some changes internally to how the MathDocument and MathItem classes, and the Handler class now allows more flexibility in overriding these. These changes are needed to better support extensions that may need to subclass the document and math-item classes. The next release will formalize the extension mechanisms and will include examples of how extensions will operate.

Finally, the TeX-lab.html and MML-lab.html files have been merged into a single v3-lab.html, and the original files removed. This late allows you to experiment will both input and both output formats, as well as enable/disable each of the extensions individual.

What's Included

This beta version includes two input processors (TeX and MathML) and two output processors (CommonHTML and SVG). Other input and output processors (e.g., AsciiMath input) will be added in the future.

The current TeX input processor has all the core functionality of the MathJax v2 TeX input, and several of the extensions built in, but some extensions are still to come. For example, \unicode, \bbox, and the color extension are not yet available.

The CommonHTML and SVG output implement all the MathML elements that they do in v2, but do not yet include support for line breaking (neither automatic nor explicit ones); this will be implemented in a later beta version. Both output renderers currently only support the MathJax TeX font; other fonts will be added in the future.

The CommonHTML output currently uses a very large CSS file that encodes the font information needed for all the characters in the MathJax TeX fonts. This is a preliminary implementation of the font support, which will be updated to reduce the size of the CSS in future versions.

The SVG output currently uses explicit SVG <path> elements for the characters it displays, whereas version 2 cached the paths in a common SVG <defs> element so that paths didn't have to be repeated in the individual expressions that used them. This will be implemented in a future version.

The MathJax contextual menu is not yet implemented.

The ability to configure MathJax through a configuration object, as in v2, is limited at the moment. In version 3, this type of customization is handled through building custom packed versions of MathJax, and that is not yet fully documented.

Examples

The https://github.com/mathjax/mj3-demos repository includes examples and webpacked files for the beta release. See the instructions there for how to use them.

The https://github.com/mathjax/mj3-demos-node repository includes examples for how to use MathJax version 3 with NodeJS.

MathJax v3 beta 2

04 Oct 20:44
Compare
Choose a tag to compare
MathJax v3 beta 2 Pre-release
Pre-release

This is the second public beta release of MathJax v3.

NOTE

This is a beta release. Do not use this in production but please test it and report issues at https://github.com/mathjax/mathjax-v3/issues!

The master branch is not the beta release; it is the current development copy, set up for development testing. The beta branch is the beta release.

What's New

The TeX input jax has been updated and expanded to include more complete coverage, including a number of extensions that were not previously available (e.g., mhchem, cancel, and verb) as well as implementations for features such as tags and labels.

The CommonHTML output was refactored to separate out functions that can be used by other output renderers (such as bounding box computations and positioning computations) from the HTML-specific code. This made is easy to implement the new output renderer for SVG output, which is included in this beta release.

In addition, a number of bug fixes and enhancements are included. For example, both output renderers now handle characters that aren't in the MathJax TeX fonts.

What's Included

This beta version includes two input processors (TeX and MathML) and two output processors (CommonHTML and SVG). Other input and output processors (e.g., AsciiMath input) will be added in the future.

The current TeX input processor has all the core functionality of the MathJax v2 TeX input, and several of the extensions built in, but some extensions are still to come. For example, \unicode, \bbox, and the color extension are not yet available.

The CommonHTML and SVG output implement all the MathML elements that they do in v2, but do not yet include support for line breaking (neither automatic nor explicit ones); this will be implemented in a later beta version. Both output renderers currently only support the MathJax TeX font; other fonts will be added in the future.

The CommonHTML output currently uses a very large CSS file that encodes the font information needed for all the characters in the MathJax TeX fonts. This is a preliminary implementation of the font support, which will be updated to reduce the size of the CSS in future versions.

The SVG output currently uses explicit SVG <path> elements for the characters it displays, whereas version 2 cached the paths in a common SVG <defs> element so that paths didn't have to be repeated in the individual expressions that used them. This will be implemented in a future version.

The MathJax contextual menu is not yet implemented.

The ability to configure MathJax through a configuration object, as in v2, is limited at the moment. In version 3, this type of customization is handled through building custom packed versions of MathJax, and that is not yet fully documented.

Examples

The https://github.com/mathjax/mj3-demos repository includes examples and webpacked files for the beta release. See the instructions there for how to use them.

The https://github.com/mathjax/mj3-demos-node repository includes examples for how to use MathJax version 3 with NodeJS.

MathJax v3 beta 1

09 Jun 22:45
Compare
Choose a tag to compare
MathJax v3 beta 1 Pre-release
Pre-release

This is the first public beta release of MathJax v3.

NOTE

This is an early beta release. Do not use this in production but please test it and report issues at https://github.com/mathjax/mathjax-v3/issues!

The master branch is not the beta release; it is the current development copy, set up for development testing. The beta branch is the beta release.

What's Included

This beta version includes two input processors (TeX and MathML) and one output processor (CommonHTML). Other input and output processors (e.g., AsciiMath input and SVG output) will be added in the future.

The current TeX input processor has all the core functionality of the MathJax v2 TeX input, and several of the extensions built in, but some extensions are still to come. For example, \unicode, \bbox, and the color extension are not yet available.

The CommonHTML output implements all the MathML elements that v2 does, but does not yet include support for line breaking (neither automatic nor explicit ones); this will be implemented in a later beta version. Currently, there is no support for characters that are not within the MathJax TeX fonts, but that will be included in the future.

The MathJax contextual menu is not yet implemented.

The ability to configure MathJax through a configuration object, as in v2, is limited at the moment. In version 3, this type of customization is handled through building custom packed versions of MathJax, and that is not yet fully documented.

Examples

The https://github.com/mathjax/mj3-demos repository includes examples and webpacked files for the beta release. See the instructions there for how to use them.

The https://github.com/mathjax/mj3-demos-node repository includes examples for how to use MathJax version 3 with NodeJS.

MathJax v3 alpha 6

18 May 14:57
Compare
Choose a tag to compare
MathJax v3 alpha 6 Pre-release
Pre-release

Please be advised: do not use this in production.

Please post your feedback to the GitHub Issue Tracker or the mathjax-dev mailing list.

Changes

  • Implements the AMS (math and symbols) packages for TeX input
  • Implements the noUndefined package for TeX input
  • Adds support for the remaining MathML elements in CommonHTML:
    • Fixed problems with \xrightarrow not stretching properly.
    • Support for the mglyph element (though both width and height must be specified explicitly).
    • Support for the menclose element.
    • Support for the maction element.
    • Support for the mmultiscripts element.
    • Support for MathML spacing rules (rather than TeX spacing)
    • Fixed vertical placement of labels in mlabeledtr rows.
    • Support for the align attribute of munderover, munder and mover.
    • Support for the accent and accentunder attributes on mo and on the munderover, under, and mover elements.
    • Support for the skew font values for better placement of accents.
    • Remapping of hyphen to minus in mo and mn elements, as well as some other accent substitutions for improved output.
    • Support for intentalign, indentshift, and related attributes on the math element.
    • Support for matching the font size of the surrounding text.
  • Removes jsdom as a dependency (though you can still use the jsdomAdaptor if you install it yourself). The choosAdaptor now chooses between the browser and lite adaptors (rather than browser and jsdom).

No support yet for line breaking or for fonts other than the MathJax TeX fonts. These are the last remaining big issues for the CommonHTML output.

Also, not support for the MathJax menu. Eventually, that most likely will be an optional extension.

MathJax v3 alpha 5

17 Apr 20:12
Compare
Choose a tag to compare
MathJax v3 alpha 5 Pre-release
Pre-release

This fixes a problem with the npm version of the alpha.4 release, and tags the correct branch.

MathJax v3 alpha.4

17 Apr 12:48
Compare
Choose a tag to compare
MathJax v3 alpha.4 Pre-release
Pre-release

Please be advised: do not use this in production.

Please post your feedback to the GitHub Issue Tracker or the mathjax-dev mailing list.

Changes

  • Internal improvements to the TeX input processing
  • Add support for \mathchoice
  • Added support for missing mtable attributes: align, width, columnwidths, equalrows, equalcolumns, minlabelspacing, side.
  • Add support for mlabeledtr (though \tag is still not processed by the TeX input jax)
  • Add support for mfenced (#86)
  • Add support for mfrac attributes: linethickness, numalign, denomalign, bevelled
  • Fix loading of entity definition files (#88)
  • Provide method for preventing web pack errors related to asynchronous loading (#88)
  • Include AsciiMath in npm distribution (#85)

MathJax v3 alpha.3

29 Jan 23:39
c89592e
Compare
Choose a tag to compare
MathJax v3 alpha.3 Pre-release
Pre-release

Improvements on

  • Operator table lookup,
  • CSS for stretchy braces in IE and Edge,
  • Stretchy characters in Tex Parser.

MathJax v3 alpha.2

07 Dec 14:20
Compare
Choose a tag to compare
MathJax v3 alpha.2 Pre-release
Pre-release

Please be advised: do not use this in production.

Please post your feedback to the GitHub Issue Tracker or the mathjax-dev mailing list.

Changes

  • #66, #73 improve stretchy constructions on Edge, Firefox, Safari
  • #67 allow configuration of fontURL
  • 6d911de add full operator table

MathJax 3.0.0-alpha.1 - First Public Alpha

16 Nov 15:45
Compare
Choose a tag to compare

This marks the first public alpha release of MathJax v3.

Please be advised: do not use this in production.

Please post your feedback to the GitHub Issue Tracker or the mathjax-dev mailing list.