Skip to content

Releases: mathjax/MathJax-src

MathJax v3.2.0

17 Jun 14:33
Compare
Choose a tag to compare

This release includes a number of new features, along with several bug fixes. The new features include a lazy-typesetting extension, better handling of adaptive CSS in the CommonHTML output, several new TeX extensions, a port of the MML3 extension from v2, and the addition of the Hindi language to the speech generation. These are described more fully below.

There are several several potentially breaking changes in this release. See the second section below for more details.

Finally, a number of bug fixes are also included in this release, as described in the last section below.



New Features in this Release

Lazy Typesetting

Although MathJax version 3 is already an order of magnitude faster than version 2, with version 3.2 we offer a new extension that is designed to make pages with large numbers of equations perform even better. It implements a "lazy typesetting" approach that only typesets an expression when it comes into view, which means that expressions will not be typeset when they are not visible. Your readers will not have to wait for the entire document to typeset, which can speed up their initial view of the page. Furthermore, any expressions that are never seen will not be typeset. This also helps with the situation where you may link to a particular location in your page (via a URL with a hash); in version 2, typesetting the material above that point can cause the browser to change the scroll position, and so the user may not end up at the proper location in the page. With the lazy extension, the material above that point is not typeset until the user scrolls upwards, and so there is no position change.

Lazy typesetting works best with SVG output, but changes (discussed below) with the way the CommonHTML output handles its stylesheet updates make the CHTML output nearly as fast. With TeX input, the lazy extension makes sure that previous expressions are processed by TeX (though not output to the page) so that any macro definitions or automatic equation numbers are in place when the visible expressions are processed. Currently, documents that contain \ref or \eqref links may not yet work properly, since target equations may not have been typeset, and so the link location may not be marked in the document. In particular, forward references are unlikely to work, and backward references will work only if the target expression has already been typeset. We hope to improve this situation in a future release.

See the lazy extension documentation for information on how to configure MathJax to use this new feature.

CSS Updates

MathJax's CHTML output handles the characters that appear in the math on the page by storing information about their bounding boxes and text content in a CSS stylesheet. When additional math is typeset, this stylesheet may need to be updated, and in previous versions, MathJax would replace the entire stylesheet with a new one. This can cause visual flashing, and can be expensive as the browser must re-evaluate all the rules and apply them again. In version 3.2, the CHTML output now adds rules to the stylesheet individually, so the older rules are not replaced, and only the new rules must be evaluated and applied. This makes updates must faster, and is of particular benefit to the lazy-typesetting extension described above, as the page can be updated many times as equations scroll into view. This change makes the CHTML output work almost as smoothly as SVG output with the lazy extension.

New TeX Packages

Version 3.2 includes nine new TeX extension packages:

  • cases — provides environments for individually numbered cases.
  • centernot — implements a centered \not command (and a non-standard \centerOver that places one symbol centered on top of another).
  • colortbl — provides macros for coloring cells of an array or alignment.
  • empheq — an environment for placing material to the left or right of an alignment that has individual equation numbers.
  • gensymb — provides macros for some specific units.
  • mathtools — offers a range of macros and environments for advanced mathematical typesetting.
  • setoptions — provides the ability to change some TeX input jax options from within an expression (e.g., to change the tag side).
  • textcomp — provides a range of macros for specifying various text characters.
  • upgreek — provides macros for upright Greek characters.

These are all included in the components that end in -full (and include the TeX input jax), and you can load individual ones as you would other tex packages. Note, however, that none of these are autoloaded, though you can configure the autoload extension to do so, if you wish. See the autoload documentation for details.

In addition to these new packages, some of the older packages have been updated:

  • The ams package now includes flalign, xalign, and xxalign environments. In addition, the multline extension has been made more compatible with actual LaTeX. In the past, multline was set to be 85% of the container width, but now it is set to 100%, but with a 1em indent on both sides; when there is a tag, the indent on the tag side is increased by the width of the tag, as is the case in LaTeX. The width was stored in the multlineWidth configuration option in the tex configuration block. That has now been moved to the ams block in the tex configuration, and there is a new multlineIndent value. These are set to 100% and 1em respectively. To obtain the old behavior, set them to 85% and 0. Currently, if multlineWidth is found in the main tex option block, it will be moved to the ams block, but that backward-compatibility code will be removed in a future release.

  • The physics package now implements all macros, even those that are not officially documented, but are nevertheless available in LaTeX. In addition, it now implements the italicdiff and arrowdel options.

  • The following macros have been added to the indicated package:

    • \overunderset (ams) — a combination of \overset and \underset.
    • \stackbin (ams) — similar to \stackrel but produces a symbol with the spacing of a binary operator.
    • \nonscript (base) — apply the following spacing only when in display and text styles.
    • \boxed (base) — puts a frame around an expression.
    • \framebox (base) — puts a frame around a text argument.
    • \ip, \Bqty, \qsince, \Residue (physics) — originally missing from the physics package.

MathML Extensions

The MML3 extension from version 2 has been ported to version 3 and is available to be included when you load the MathML input jax. This extension implements the MathML3 elementary math tags (like <mstack> and <mlongdiv>) using an XSLT transform to convert these tags into other presentation MathML tags that MathJax has implemented. This does a reasonable job for some constructs, and a poorer job for others, but it does make it possible to process elementary math within MathJax v3. This is an experimental extension as a stop-gap measure until these tags are fully implemented within core MathJax.

See the mml3 extension documentation for information on how to configure MathJax to use this new feature.

Explorer Update

The Speech-Rule Engine (SRE) that underlies MathJax's assistive technology support has been updated to the most recent version (3.3.3). This includes support for the Hindi language, so that the expression explorer can generate speech in Hindi (as well as its other languages: English, French, German, Italian, Spanish, together with Braille support in Nemeth).

See the SRE release notes for details.

This release also ports the remaining missing features for the explorer to v3. This includes summarising expressions and navigation of tabular expressions, like matrices or equation systems. See the explorer keyboard commands for details.

Other New Features

In addition to the major features listed above, there are some minor new features as well:

  • Packages can now be specified for the textmacros extension to the TeX input jax. This allows you to configure additional macros that can be processed within text mode. See the textmacros documentation for details.

  • Processing of raw Unicode character...

Read more

MathJax v3.1.4

23 Apr 18:46
Compare
Choose a tag to compare

This is a hot-fix release to correct two issues in the recent 3.1.3 release. Both errors only affect server-side node applications that use the mathjax-full npm package and import the MathJax modules directly, and not the web-based MathJax components.

  • The inclusion of the mhchemparser npm package caused errors in server-side node application that included the mhchem package. This is resolved in #689.

  • A change to HTML the serialization code in the LiteDOM caused empty tags to not have their closing tags. This is resolved by #690.

The mathjax npm package and CDN servers will see an update to v3.1.4 as well, even though the 3.1.3 version does not include these bugs, so that the versions stay synchronized.

MathJax v3.1.3

22 Apr 19:27
Compare
Choose a tag to compare

This is mostly a bug-fix release, various display bugs and other issues. See the individual bugs linked below for more details, and the 3.1.3 milestone for the pull requests involved in this release.

New Features in this Release

  • The speech-rule engine (SRE) has been updated to v3.2.0. (SRE release notes.)
  • The options controlling the SRE have been separated out from the other assistive options so they can be configured independently. (documentation)
  • The MathDocument reset() command now allows resetting input and output jax. (#647)
  • LaTeX environments can now be defined in the MathJax configuration, just like macros. (mathjax/MathJax#2505) (documentation)
  • Add support for all \mathXYZ and \symXYZ macros (e.g., \mathsfit, \symbfup) and use multi-letter <mi> when possible. (mathjax/MathJax#2595)
  • Add support for trapping and reporting SRE errors. (#679) (documentation)
  • Add ability to trigger links within expressions (via the return key) while using the expression explorer. (#687)
  • Update the mhchem extension to the latest version from the author. (#688)
  • Update AsciiMath to current version. (mathjax/MathJax#2640)

Bugs Addressed in this release

TeX Input Issues

MathML Input Issues

  • Fix problem with loading entity files when MathML input encounters an entity that isn't defined. (mathjax/MathJax#2650)
  • Fix handling of <mrow> nodes that look like \left...\right to be TeX class INNER. (mathjax/MathJax#2584)
  • Don't mark <mrow> nodes as fences if the parentheses aren't stretchy. (#583)
  • Make <mspace> elements have TeX class NONE. (mathjax/MathJax#2576)

Output Issues

  • Fix MathML spacing rules for <mo> elements to better follow the specification. (mathjax/MathJax#2392)
  • Better handling of minimum height and width for SVG (so they don't disappear). (mathjax/MathJax#2605)
  • Fix issues with placement of <menclose> notations. (mathjax/MathJax#2571)
  • Fix several issues with tables (label alignment in CHTML, lines in SVG in tables with tags, vertical centering). (mathjax/MathJax#2601)
  • Update SVG output so that following a link scrolls to the top of the tag rather than the baseline in all browsers. (mathjax/MathJax#2588)
  • Use a colon in link anchor ids so that links work in Safari in SVG output. (mathjax/MathJax#2586)
  • Improve positioning of extenders for stretchy characters. (mathjax/MathJax#2547, mathjax/MathJax#2598)
  • Improve heights of successively larger multi-character surds. (mathjax/MathJax#2658)
  • Handle variant forms for pseudo-scripts better in fonts that have them. (mathjax/MathJax#2519)
  • Allow stylesheet to be obtained even after it was created. (mathjax/MathJax#2542)
  • Correct errors in the horizontal stretchy data for several characters. (#645)
  • Updates to handle smallmatrix environment properly. (#582, #621)
  • Fix problem with selectors for SVG path widths. (mathjax/MathJax#2618)
  • Fix incorrect glyph for script capital I. (mathjax/MathJax-src#2555)
  • Add a small separation between super- and subscripts and their base. (mathjax/MathJax#2406)
  • Allow "single-character" <mi> elements to include trailing combining characters. (mathjax/MathJax#2617)
  • Improve spacing between accents and their bases, and handle under- and over-lines more like TeX. (#619)
  • Handle accents more like TeX does (better sizes and placement). (mathjax/MathJax#712, mathjax/MathJax#2474)
  • Fix handling of italic correction for <munderover> and <msubsup> combinations. (#634)
  • Better handling of the placement of scripts in enriched MathML. (Speech-Rule-Engine/speech-rule-engine#462, #617)
  • Handle spacing in <mroot> elements properly. (mathjax/MathJax#2630)
  • Make sure hit-box is translated along with the hit-able element in SVG output. (mathjax/MathJax#2530)
  • Add support for setting the unknown character family for when a character is not in the MathJax fonts. (#576)
  • Make sure bevelled fraction is symmetrically placed. (#580)
  • Prevent border-spacing and border-collapse from being inherited from an outer table. (#686)

Miscellaneous

  • Update operator dictionary to the current state of Appendix C of the specification. (#652)
  • Skip DOM node types that MathJax can't process. (mathjax/MathJax#2662)
  • Fix a problem where enableEnrich and other a11y options could not be configured. (mathjax/MathJax#2651)
  • Properly serialize <annotation-xml> content. (#678)
  • Reset the tex labels and ids when A11y changes force re-rendering. (mathjax/MathJax#2597)
  • Trim TeX and annotations before copying to clipboard. (mathjax/MathJax#2574)
  • Remove role='presentation' attributes. (mathjax/MathJax#2608)
  • Handle measuring of elements in jsdom adaptor the same way as in liteDOM, since jsdom doesn't do measurements. (mathjax/MathJax#2550)
  • Show more internal properties in serialized MathML. (mathjax/MathJax#2585)
  • Improve build tools to make it easier to create custom components. (#592)
  • Fix pack and makeAll commands to display the modules used in version 5 of webpack. (#591, #579)
  • Fix webpack.common.js to handle windows paths correctly. (mathjax/MathJax-demos-web#30)
  • Update LiteAdaptor to handle full-width characters better. (mathjax/MathJax-demos-node#29)

Potential Future Breaking Changes

Some of the changes made to the options to accommodate the updated speech-rule engine are potentially breaking changes, in that the previous options (enrichSpeech, a11y.locale, a11y.speechRules) are no longer valid options. Since MathJax flags invalid options and stops processing when it encounters one, this means any configurations that used the older options would no longer work. Version 3.1.3 includes code to transfer the old options to their new locations, but that code will be removed in version 3.2. This gives page authors the opportunity to fix the issue before version 3.2 is released and their pages break.

Similarly, the code that automatically renames the older TeX package names to their current all-lower-case versions (e.g., configMacros to configmacros and colorV2 to colorv2) will likely be removed from version 3.2, so if you are using old package names, you should change your configurations before version 3.2. This applies to \require{} macros that refer to the older names as well as their names in the loader section, the tex.packages array, and the tex.autoload block.

Version 3.2 will also see the removal of the matchFontHeight option for the SVG output jax, since it only applies to the CommonHTML output, but is currently allowed in the svg configuration block, while doing nothing.

Version 3.2 may include other breaking changes, such as the removal of the toArray() method from the LinkedList class (and its subclasses), so any custom code that uses that should switch to using Array.from(...) around the list instead.

Finally, the Box.ts and CssStyles.ts (and their associated .js files) have been moved from the output directories to the util directory. Compatibility files were placed in the original locations so that older code would continue to work, but these will likely be removed in v3.2, so you should modify any custom code that loads these files to obtain them from the util directory instead.

MathJax v3.1.2

12 Sep 19:44
Compare
Choose a tag to compare

Hot fix to correct regression introduced in v3.1.1 that caused control sequences followed by spaces to not be recognized.

MathJax v3.1.1

12 Sep 15:51
Compare
Choose a tag to compare

This is a bug-fix release to address several issues that arose from the 3.1.0 release, particularly with the textmacros package for the TeX input jax. It also updates the Speech-Rule Engine to version 3.1.1.

Bugs Addressed in this release

Changes in Speech-Rule Engine

  • Introduces handling of direct speech attributes like aria-label, alt, exact-speech.
  • Handling of elements like mglyph if they contain a direct speech attribute.
  • Allows floats as part of mixed numbers.
  • A number of fixes to the Clearspeak and Nemeth rule sets.
  • Fixes regression of SVG highlighter.

MathJax v3.1.0

25 Aug 15:44
Compare
Choose a tag to compare

This is a feature release that includes a number of API improvements, new extensions, and updates to the assistive tools, as described below. It also includes several bug fixes.

See the individual issues and pull requests linked below, as well as the What's new in v3.1 section of the MathJax documentation, for more details.

Also note that the demos in the node examples have been updated and expanded to include examples of using a simplified interface for MathJax in server-side node applications, MathJax with Puppeteer, and MathJax with jsdom.

New Features in this Release

  • New textmacros extension for handling some macros in text-mode. (#509)
  • Add safe extension and component. (#514)
  • New German localization for speech output using the expression explorer.
  • Updated options within the accessibility contextual menu. (#505)
  • Allow MathML verification options to be specified in the input jax. (#519)
  • Add enable/disable options to document handlers for a11y and menu. (#499)
  • Add configuration options to noundefined extension. (#507)
  • Fix problems with mtextInheritFont, and provide new mtextFont option. (mathjax/MathJax#2189)
  • Make formatError a configuration option for tex input jax. (#483)
  • Improve startup.promise so it is always valid. (mathjax/MathJax#2307)
  • Add functions to manage math items within a given container. (#351)
  • General improvements to input/output errors. (#491)
  • Allow MathML verification options to be specified in the input jax. (#519)
  • Update string processing to handle SMP unicode blocks better. (#504)
  • Add TeX error as data-mjx-error, similar to compile/typeset errors. (#490)

File Location Changes

  • Normalize extension names to all lowercase with no underscores. (#485)
  • Remove MathItem bbox property. (#495)
  • Move output/common/BBox.ts to util directory. (#494)
  • Move output/common/CssStyles.ts to util/StyleList.ts. (#493)

Bug Fixes in this Release

MathJax v3.0.5

10 Apr 13:14
Compare
Choose a tag to compare

This is a hot fix release to resolve an important issue with horizontal stretchy characters (e.g., \overline and \overrightarrow) in CommonHTML output that was introduced in the recent version 3.0.4 release.

MathJax v3.0.4

08 Apr 20:34
Compare
Choose a tag to compare

This is mostly a bug-fix release, resolving a number of important issues since v3.0.1. See the individual bugs linked below for more details, and the 3.0.4 milestone for the pull requests involved in this release.

Version 3.0.2 and 3.0.3 had problems with their npm deployment and have been removed; 3.0.4 is the next release after 3.0.1.

New Features in this Release

  • The infrastructure for the font system has been updated to prepare for more font support in a future release. See #455 for details.

  • The expression explorer now has dynamic loading for its locale data, and the speech-rule engine has been updated to 3.0.0-beta.10.

Bugs Addressed in this Release

Output Issues

TeX Input

MathML input

Miscellaneous

  • Correct menu name being disabled. (mathjax/MathJax-demos-node#10)

  • Fix error with setting startup.elements in configuration. (mathjax/MathJax#2371)

  • Use components/global.js to get window.MathJax in menu handling. (#458)

  • Prevent reading node_modules/@types from containing directories. (mathjax/MathJax#2358)

  • Don't process escaped characters in a11y and menu extensions. (mathjax/MathJax#2327)

  • Set loader's mathjax path to work in more situations. (#406)

  • Fix problem with infinite loop with SRE component in IE. (#450)

MathJax v3.0.1

07 Feb 19:02
Compare
Choose a tag to compare

This is a bug-fix release that fixes most of the bugs reported since the v3.0.0 release. See the individual bugs linked below for more details, and the 3.0.1 milestone for the pull requests involved in this release.

Bugs Addressed in this Release

Accessibility

  • Change the default for Braille output to false in equation explorer.
  • Fix problem with enabling explorer with MathML input. (mathjax/MathJax#2255)
  • Reintroduce AssistiveMML support to v3. (mathjax/MathJax#2260)
  • Improve efficiency of speech generation.
  • Find speech labels even if they are not on the top-level MathML node.
  • Update Speech-Rule Engine to latest beta version.

TeX Input

  • Don't crash for certain \text{} content values. (mathjax/MathJax#2283)
  • Make \require{bussproofs} load properly.
  • Better handling of unknown tagging class. (#404)
  • Make TexParser.Push() handle inferred mrows properly. (mathjax/MathJax#2261)
  • Convert units of mu to ems. (mathjax/MathJax#2239)
  • Improve movablelimits support.
  • Fix operator with movable limits when no other super- or subscripts are used. (mathjax/MathJax#2221)
  • Fix tagFormat to allow it to work with AMS tags. (mathjax/MathJax#2201)
  • Fix capitalization for the amsCd component. (#335)
  • Don't leak fonts and other properties to initial array entries. (mathjax/MathJax#2247)
  • Fix problem with determining texClass uses by \dots. (mathjax/MathJax#2315)
  • Fix problem with incorrect "double exponent" error. (#314)
  • Make tags work for starred environments. (#316)

CHTML and SVG Output

  • Don't include extenders in SVG stretchy characters if they have negative width. (mathjax/MathJax#2300)
  • Fix linespacing below CHTML displayed equations. (mathjax/MathJax#2296)
  • Don't remap U+2192 (right arrow) to U+20D7 (vector accent) when used alone as a movable subscript. (mathjax/MathJax#2293)
  • Fix problem with spacing inside maligngroup elements. (mathjax/MathJax#2295)
  • Update font data to include missing italic correction values and correct minimum stretchy widths. (mathjax/MathJax#2286)
  • Make pt relative to the em size (as it was in v2). (mathjax/MathJax#2285)
  • Fix duplicate xlink namespace in SVG output. (#365)
  • Fixes a bug in msqrt when computing clearance value.
  • Don't use CSS content for invisible characters. (#385)
  • Fix problem with variantForm characters in CHTML. (mathjax/MathJax#2236)
  • Fix spacing problems in superscripts. (mathjax/MathJax#2241)
  • Add missing data for U-0394 (delta) in the italic font. (mathjax/MathJax#2231)
  • Better bounding box computations for unknown characters.
  • Fix scaling of zoomed multline environments with tags. (mathjax/MathJax-demos-web#17)
  • Fix alignment problem with mtables. (mathjax/MathJax#2186)
  • Check that parent is defined before getting its metrics. (mathjax/MathJax#2191)
  • Add CSS to force LTR direction for SVG output. (mathjax/MathJax#2204)
  • Fix spacing around super- and sub-scripts. (mathjax/MathJax#2187)
  • Fix problem with tags being displayed horizontally in CHTML in a table with multiple tags. (mathjax/MathJax#2200)
  • Improve support for annotation-xml elements. (mathjax/MathJax#2210)
  • Fix problem with \underline in SVG output. (#264)

MathML

  • Preserve special spaces in token element contents.
  • Add more data-mjx-* attributes to MathML serialization to support internal values.
  • Add support for serializing annotation-xml contents.
  • Add attribute to identify texClass for TeXAtom serialization. (mathjax/MathJax#2193)

Node and LiteDOM

  • Fix LiteAdaptor's search for elements by class. (mathjax/MathJax#2278)
  • Fix node-main.js to use require() and the correct mathjax path. (#406)
  • Improve path handling when used in node. (#398)
  • Handle self-closing tags in liteDOM. (#328)

General

  • Fix problem with options being improperly shared between object instances. (mathjax/MathJax#2301)
  • Make source.js and dependencies.js into ESM modules. (#420)
  • Corrects capitalization of imported module in ts/core/MmlTree/MmlNode.ts.
  • Fix problem with math following a <br>. (mathjax/MathJax#2202)
  • Fix issues with handling of multiple className attribute values. (mathjax/MathJax#2185)
  • Fix problem with MathDocument.convert() stopping before the final requested step.
  • Make MathDocument.convert() handle output with unknown characters. (mathjax/MathJax#2309)

MathJax v3.0.0

04 Sep 20:06
Compare
Choose a tag to compare

After over two years of development, the MathJax team is pleased to announce the official release of MathJax 3.0.0!

This version is a complete rewrite of MathJax from the ground up using modern programming techniques, including Typescript, ES6 modules, Promises, and more.

Please see the What's New in v3.0 section of the documentation for details about the new version 3.0.0.

Please see the Upgrading from v2 instructions for details about what is and isn't in version 3, and how to upgrade your site from version 2. Note in particular that there is a configuration converter that can help you move from version 2 to version 3.

See the documentation for details about how to use MathJax.

There are two repositories that contain examples of using MathJax, one for web pages, and one for use with node on a server:

Please use the MathJax Issue Tracker to report problems in version 3 of MathJax.