MathJax

Last updated
MathJax
Developer(s) American Mathematical Society
Stable release
3.2.2 [1] / June 8, 2022;22 months ago (2022-06-08)
Repository
Written in JavaScript
Operating system Cross-platform
Type Mathematical software
License Apache License 2.0
Website www.mathjax.org   OOjs UI icon edit-ltr-progressive.svg

MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX and ASCIIMathML markup. [2] [3] [4] MathJax is released as open-source software under the Apache License.

Contents

The MathJax project started in 2009 as the successor to an earlier JavaScript mathematics formatting library, jsMath, [5] and is managed by the American Mathematical Society. [6] The project was founded by the American Mathematical Society, Design Science, and the Society for Industrial and Applied Mathematics and is supported by numerous sponsors such as the American Institute of Physics and Stack Exchange. [7]

MathJax is used by web sites including arXiv, [8] Elsevier's ScienceDirect, [9] MathSciNet, [10] n-category cafe, MathOverflow, Wikipedia (on the backend), [11] [12] Scholarpedia, Project Euclid journals, [13] IEEEXplore, [14] Publons, Coursera, and the All-Russian Mathematical Portal. [15]

Features

MathJax is downloaded as part of a web page, scans the page for mathematical markup, and typesets the mathematical information accordingly. Thus, MathJax requires no installation of software or extra fonts on the reader's system. This allows MathJax to run in any browser with JavaScript support, including mobile devices. [16]

MathJax can display math by using a combination of HTML and CSS or by using the browser's native MathML support, when available. The exact method MathJax uses to typeset math is determined by the capabilities of the user's browser, fonts available on the user's system, and configuration settings. MathJax v2.0-beta introduced SVG rendering. [17]

In the case of HTML and CSS typesetting, MathJax maximizes math display quality by using math fonts if available and by resorting to images for older browsers. For newer browsers that support web fonts, MathJax provides a comprehensive set of web fonts, which MathJax downloads as needed. If the browser does not support web fonts, MathJax checks whether valid fonts are available on the user's system. If this does not work, MathJax provides images of any symbols needed.[ clarification needed ] MathJax can be configured to enable or disable web fonts, local fonts, and image fonts.

MathJax uses the STIX fonts for including mathematics in web pages. Installing the fonts on the local computer improves MathJax’s typesetting speed. [18]

MathJax can display mathematical notation written in LaTeX or MathML markup. Because MathJax is meant only for math display, whereas LaTeX is a document layout language, MathJax only supports the subset of LaTeX used to describe mathematical notation. [16]

MathJax also supports math accessibility by exposing MathML through its API to assistive technology software, as well as the basic WAI-ARIA "role" and older alt attributes. [19]

The MathJax architecture is designed to support the addition of input languages and display methods in the future via dynamically loaded modules. MathJax also includes a JavaScript API for enumerating and interacting with math instances in a page.

Browser compatibility

MathJax renders math in most popular browsers, including Internet Explorer 6+, Firefox 3+, Google Chrome 0.3+, Safari 2.0+, Opera 9.5+, iPhone/iPad Safari, and the Android browser. Some older versions of browsers do not support web fonts (with the @font-face CSS construct), so they have to use MathJax image font mode. The browser compatibility list is available at the official site. [20]

Plugin support

MathJax can be easily added to many popular web platforms. [21]

Node.js

MathJax can be used in Node.js since version 3; [22] for version 2, the MathJax-node library [23] provides Node.js compatibility.

Equation editor compatibility

Any MathJax equation displayed in a supported browser can be copied out in MathML or LaTeX format via "Show Math as" sub-menu if right-button clicked or control-clicked on it. Then it can be pasted in any equation editor that supports MathML or LaTeX, such as Mathematica, MathType, MathMagic, Firemath for re-using. [24]

Equations generated in MathML or LaTeX format by any 3rd party equation editor can be used in MathJax enabled web pages.

TeX support

MathJax replicates the math environment commands of LaTeX. AMS-LaTeX math commands are supported via extensions. MathJax also supports TeX macros and miscellaneous formatting like \color and \underline. [25]

MathML support

MathJax added partial support for MathML 2.0 and some MathML 3.0 constructs in its beta 2 release. MathJax supports presentation MathML and, as of version 2.2, provides experimental support for content MathML. [26]

CDN servers

The MathJax site has been providing a content delivery network (CDN) where the JavaScript needed for MathJax to work can be loaded by the browser at run time from the CDN. This simplifies the installation and ensures the latest version of the library is always used. Over time usage of the server has grown from 1.3TB per month traffic in 2011 to 70TB per month in 2017. Due to increasing cost of hosting the server, the main CDN server shut down at the end of April 2017. Alternative third party CDN servers are available. [27]

See also

Related Research Articles

<span class="mw-page-title-main">HTML</span> HyperText Markup Language

HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.

<span class="mw-page-title-main">LaTeX</span> Document preparation software system

LaTeX is a software system for typesetting documents. LaTeX markup describes the content and layout of the document, as opposed to the formatted text found in WYSIWYG word processors like Microsoft Word, LibreOffice Writer and Apple Pages. The writer uses markup tagging conventions to define the general structure of a document, to stylise text throughout a document, and to add citations and cross-references. A TeX distribution such as TeX Live or MiKTeX is used to produce an output file suitable for printing or digital distribution.

Mathematical Markup Language (MathML) is a mathematical markup language, an application of XML for describing mathematical notations and capturing both its structure and content, and is one of a number of mathematical markup languages. Its aim is to natively integrate mathematical formulae into World Wide Web pages and other documents. It is part of HTML5 and standardised by ISO/IEC since 2015.

An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The current de facto standard is governed by the industry group WHATWG and is known as the HTML Living Standard.

This is a comparison of both historical and current web browsers based on developer, engine, platform(s), releases, license, and cost.

The following tables compare general and technical information for a number of document markup languages. Please see the individual markup languages' articles for further information.

<span class="mw-page-title-main">TiddlyWiki</span> Wiki software

TiddlyWiki is a personal wiki and a non-linear notebook for organising and sharing complex information. It is an open-source single page application wiki in the form of a single HTML file that includes CSS, JavaScript, embedded files such as images, and the text content. It is designed to be easy to customize and re-shape depending on application. It facilitates re-use of content by dividing it into small pieces called Tiddlers.

<span class="mw-page-title-main">MathType</span> The Software for Type And Design Formulas and numerical expressions

MathType is a software application created by Design Science that allows the creation of mathematical notation for inclusion in desktop and web applications.

This is a comparison of word processing software.

<span class="mw-page-title-main">STIX Fonts project</span>

The STIX Fonts project or Scientific and Technical Information Exchange (STIX), is a project sponsored by several leading scientific and technical publishers to provide, under royalty-free license, a comprehensive font set of mathematical symbols and alphabets, intended to serve the scientific and engineering community for electronic and print publication. The STIX fonts are available as fully hinted OpenType/CFF fonts. There is currently no TrueType version of the STIX fonts available, but the STIX Mission Statement includes the intention to create one in the future. However, there exists an unofficial conversion of STIX Fonts to TrueType, suitable for use with software without OpenType support.

jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animations, and Ajax. It is free, open-source software using the permissive MIT License. As of August 2022, jQuery is used by 77% of the 10 million most popular websites. Web analysis indicates that it is the most widely deployed JavaScript library by a large margin, having at least three to four times more usage than any other JavaScript library.

A mathematical markup language is a computer notation for representing mathematical formulae, based on mathematical notation. Specialized markup languages are necessary because computers normally deal with linear text and more limited character sets. A formally standardized syntax also allows a computer to interpret otherwise ambiguous content, for rendering or even evaluating. For computer-interpretable syntaxes, the most popular are TeX/LaTeX, MathML, OpenMath and OMDoc.

AsciiMath is a client-side mathematical markup language for displaying mathematical expressions in web browsers.

<span class="mw-page-title-main">CSS</span> Style sheet language

Cascading Style Sheets (CSS) is a style sheet language used for specifying the presentation and styling of a document written in a markup language such as HTML or XML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

TeX4ht is a configurable converter capable of translating TeX and LaTeX documents to HTML and certain XML formats. Most notably, TeX4ht serves for converting (La)TeX documents to formats used by word processors. It was developed by Eitan M. Gurari.

jsMath was a JavaScript library for displaying mathematics in browsers in a cross-platform way. jsMath is free software released under the Apache License.

The Web platform is a collection of technologies developed as open standards by the World Wide Web Consortium and other standardization bodies such as the Web Hypertext Application Technology Working Group, the Unicode Consortium, the Internet Engineering Task Force, and Ecma International. It is the umbrella term introduced by the World Wide Web Consortium, and in 2011 it was defined as "a platform for innovation, consolidation and cost efficiencies" by W3C CEO Jeff Jaffe. Being built on The evergreen Web has allowed for the addition of new capabilities while addressing security and privacy risks. Additionally, developers are enabled to build interoperable content on a cohesive platform.

<span class="mw-page-title-main">Firemath</span>

Firemath is a WYSIWYG equation editor which generates MathML. It is open source software published under the GNU General Public License (GPL) version 3. Firemath is an add-on for the web browser Firefox. It uses the rendering facilities of the browser.

<span class="mw-page-title-main">KaTeX</span> Cross-browser JavaScript library that displays mathematical notation in web browsers

KaTeX is a cross-browser JavaScript library that displays mathematical notation in web browsers. It puts special emphasis on being fast and easy to use.

This is a list of articles related to the JavaScript programming language.

References

  1. "MathJax v3.2.2". MathJax. 2022-06-08.
  2. "MathJax: Rich Math display from LaTeX and MathML". 17 November 2015.
  3. "MathJax AsciiMath support". Archived from the original on 2018-03-23. Retrieved 2013-04-07.
  4. Cuellar, Autumn; Topping, Paul (June 2013). Mathews, Bob (ed.). "What you need to know about the Maths Stack". XML London 2013: 63–68. doi: 10.14337/XMLLondon13.Cuellar01 (inactive 2024-03-14). ISBN   978-0-9926471-0-0.{{cite journal}}: CS1 maint: DOI inactive as of March 2024 (link)
  5. Hayes, Brian (2009), "Writing Math on the Web: The Web would make a dandy blackboard if only we could scribble an equation", American Scientist , 92 (2): 98, doi:10.1511/2009.77.98 .
  6. "AMS becomes managing partner of the MathJax Consortium". 2013-03-20.
  7. "MathJax Sponsorship".
  8. "arXiv.org help – What is MathJax?".
  9. "MathJax on ScienceDirect". Archived from the original on 2014-08-26. Retrieved 2014-08-24.
  10. "MathSciNet What's New".
  11. Schubotz, Moritz; Wicke, Gabriel (2014-01-01). "Mathoid: Robust, Scalable, Fast and Accessible Math Rendering for Wikipedia". Intelligent Computer Mathematics. Lecture Notes in Computer Science. Vol. 8543. pp. 224–235. arXiv: 1404.6179 . doi:10.1007/978-3-319-08434-3_17. ISBN   978-3-319-08434-3. S2CID   16123116.
  12. "Extension:Math - MediaWiki". www.mediawiki.org. Retrieved 2017-04-06.
  13. "What is MathJax?".
  14. "IEEE Xplore Help". ieeexplore.ieee.org. Retrieved 2021-08-05.
  15. "All-Russian Mathematical Portal".
  16. 1 2 Cervone, Davide (2012), "Math Jax: A Platform for Mathematics on the Web" (PDF), Notices of the American Mathematical Society , 59 (2): 312–316, doi: 10.1090/noti794
  17. "MathJax v2.0-beta now available on CDN". February 11, 2012.
  18. MathJax Font Help Archived 2012-07-28 at the Wayback Machine accessed 2012-08-14.
  19. "MathJax: Accessibility".
  20. "MathJax: Browser Compatibility". Archived from the original on 2015-04-06. Retrieved 2017-06-05.
  21. "Using MathJax in popular web platforms". Archived from the original on 2017-08-31. Retrieved 2017-06-05.
  22. "What's New in MathJax 3".
  23. "mathjax-node". 5 June 2018.
  24. "Copy and Paste Math".
  25. "MathJax: Supported LaTeX Commands". Archived from the original on 2018-12-16. Retrieved 2017-06-05.
  26. "MathJax MathML Support — MathJax 2.3 documentation". Archived from the original on 2018-12-15. Retrieved 2014-02-14.
  27. "MathJax CDN shutting down on April 30, 2017". MathJax. 31 March 2017.