MathJax is a
cross-browser JavaScript library
A JavaScript library is a library of pre-written JavaScript code that allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. They can be included in a website by embedding it directl ...
that displays
mathematical notation
Mathematical notation consists of using glossary of mathematical symbols, symbols for representing operation (mathematics), operations, unspecified numbers, relation (mathematics), relations, and any other mathematical objects and assembling ...
in
web browser
A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
s, using
MathML
Mathematical Markup Language (MathML) is a pair of mathematical markup languages, an application of XML for describing mathematical notations and capturing both its structure and content. Its aim is to natively integrate mathematical formulae ...
,
LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well.
In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
, and
ASCIIMathML
AsciiMath is a client-side mathematical markup language for displaying mathematical expressions in web browsers..
Using the JavaScript script ASCIIMathML.js, AsciiMath notation is converted to MathML at the time the page is loaded by the browser, ...
markup. MathJax is released as
open-source software
Open-source software (OSS) is Software, computer software that is released under a Open-source license, license in which the copyright holder grants users the rights to use, study, change, and Software distribution, distribute the software an ...
under the
Apache License
The Apache License is a permissive free software license written by the Apache Software Foundation (ASF). It allows users to use the software for any purpose, to distribute it, to modify it, and to distribute modified versions of the software ...
.
The MathJax project started in 2009 as the successor to an earlier JavaScript mathematics formatting library,
jsMath
jsMath was a JavaScript library for displaying mathematics in browsers in a cross-platform way. It was free software released under the Apache License.
Produced by Union College Professor, Davide P. Cervone in 2004, jsMath was built as a cros ...
, and is managed by the
American Mathematical Society
The American Mathematical Society (AMS) is an association of professional mathematicians dedicated to the interests of mathematical research and scholarship, and serves the national and international community through its publications, meetings, ...
. The project was founded by the American Mathematical Society, Design Science, and the
Society for Industrial and Applied Mathematics
Society for Industrial and Applied Mathematics (SIAM) is a professional society dedicated to applied mathematics, computational science, and data science through research, publications, and community. SIAM is the world's largest scientific soci ...
and is supported by numerous sponsors such as the
American Institute of Physics
The American Institute of Physics (AIP) promotes science and the profession of physics, publishes physics journals, and produces publications for scientific and engineering societies. The AIP is made up of various member societies. Its corpora ...
and
Stack Exchange.
MathJax is used by web sites including
arXiv
arXiv (pronounced as "archive"—the X represents the Chi (letter), Greek letter chi ⟨χ⟩) is an open-access repository of electronic preprints and postprints (known as e-prints) approved for posting after moderation, but not Scholarly pee ...
,
Elsevier
Elsevier ( ) is a Dutch academic publishing company specializing in scientific, technical, and medical content. Its products include journals such as ''The Lancet'', ''Cell (journal), Cell'', the ScienceDirect collection of electronic journals, ...
's
ScienceDirect
ScienceDirect is a searchable web-based bibliographic database, which provides access to full texts of scientific and medical publications of the Dutch publisher Elsevier as well of several small academic publishers. It hosts over 18 million ...
,
MathSciNet
MathSciNet is a searchable online bibliographic database created by the American Mathematical Society in 1996. It contains all of the contents of the journal ''Mathematical Reviews'' (MR) since 1940 along with an extensive author database, links ...
,
n-category cafe,
MathOverflow
MathOverflow is a mathematics question-and-answer (Q&A) website, which serves as an online community of mathematicians. It allows users to ask questions, submit answers, and rate both, all while getting merit points for their activities. It is ...
,
Wikipedia
Wikipedia is a free content, free Online content, online encyclopedia that is written and maintained by a community of volunteers, known as Wikipedians, through open collaboration and the wiki software MediaWiki. Founded by Jimmy Wales and La ...
(on the backend),
Scholarpedia
''Scholarpedia'' is an English-language wiki-based online encyclopedia with features commonly associated with Open access (publishing), open-access online academic journals, which aims to have quality content in science and medicine.
''Scholarpe ...
,
Project Euclid
Project Euclid is a collaborative partnership between Cornell University Library and Duke University Press which seeks to advance scholarly communication in theoretical and applied mathematics and statistics through partnerships with independent a ...
journals,
IEEEXplore,
Publons
Publons was a commercial website that provided a free service for academics to track, verify, and showcase their peer review and editorial contributions for academic journals. It was launched in 2012 and was bought by Clarivate in 2017. It claime ...
,
Coursera
Coursera Inc. () is an American global massive open online course provider. It was founded in 2012 by Stanford University computer science professors Andrew Ng and Daphne Koller. Coursera works with universities and other organizations to offe ...
, and the
All-Russian Mathematical Portal
The All-Russian Mathematical Portal (better known as Math-Net.Ru) is a web portal that provides extensive access to all aspects of Russian mathematics, including journals, organizations, conferences, articles, videos, libraries, software, and peo ...
.
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.
MathJax can display math by using a combination of
HTML
Hypertext Markup Language (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 ( ...
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.
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
Web typography, like typography generally, is the design of pages their layout and typeface choices. Unlike traditional print-based typography (where the page is fixed once typeset), pages intended for display on the World Wide Web have additional ...
, 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. MathJax can be configured to enable or disable web fonts, local fonts, and image fonts.
MathJax uses the
STIX fonts
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 symbol ...
for including mathematics in web pages. Installing the fonts on the local computer improves MathJax’s typesetting speed.
MathJax can display mathematical notation written in
LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well.
In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
or
MathML
Mathematical Markup Language (MathML) is a pair of mathematical markup languages, an application of XML for describing mathematical notations and capturing both its structure and content. Its aim is to natively integrate mathematical formulae ...
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.
[
MathJax also supports math accessibility by exposing MathML through its API to ]assistive technology
Assistive technology (AT) is a term for assistive, adaptive, and rehabilitative devices for Disability, people with disabilities and the elderly. Disabled people often have difficulty performing activities of daily living (ADLs) independently, ...
software, as well as the basic WAI-ARIA "role" and older alt attributes.
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
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
6+, Firefox
Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curr ...
3+, Google Chrome
Google Chrome is a web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, iOS, iPadOS, an ...
0.3+, Safari
A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
2.0+, Opera
Opera is a form of History of theatre#European theatre, Western theatre in which music is a fundamental component and dramatic roles are taken by Singing, singers. Such a "work" (the literal translation of the Italian word "opera") is typically ...
9.5+, iPhone
The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
/iPad
The iPad is a brand of tablet computers developed and marketed by Apple Inc., Apple that run the company's mobile operating systems iOS and later iPadOS. The IPad (1st generation), first-generation iPad was introduced on January 27, 2010. ...
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.
Plugin support
MathJax can be easily added to many popular web platforms.
Node.js
MathJax can be used in Node.js since version 3; for version 2, the MathJax-node library provides Node.js compatibility.
Equation-editor compatibility
Any MathJax equation displayed in a supported browser can be copied out in MathML
Mathematical Markup Language (MathML) is a pair of mathematical markup languages, an application of XML for describing mathematical notations and capturing both its structure and content. Its aim is to natively integrate mathematical formulae ...
or LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well.
In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
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
Wolfram (previously known as Mathematica and Wolfram Mathematica) is a software system with built-in libraries for several areas of technical computing that allows machine learning, statistics, symbolic computation, data manipulation, network ...
, MathType, MathMagic, or Firemath, for re-use.
Equations generated in MathML
Mathematical Markup Language (MathML) is a pair of mathematical markup languages, an application of XML for describing mathematical notations and capturing both its structure and content. Its aim is to natively integrate mathematical formulae ...
or LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latices are found in nature, but synthetic latices are common as well.
In nature, latex is found as a wikt:milky, milky fluid, which is present in 10% of all floweri ...
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
.
MathML support
MathJax added partial support for MathML
Mathematical Markup Language (MathML) is a pair of mathematical markup languages, an application of XML for describing mathematical notations and capturing both its structure and content. Its aim is to natively integrate mathematical formulae ...
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.
CDN servers
The MathJax site has been providing a content delivery network
A content delivery network (CDN) or content distribution network is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance ("speed") by distributing the service spat ...
(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.
See also
* :Symbol typefaces
* Google Chart API
* KaTeX – JavaScript alternative to MathJax
References
{{Reflist, 30em
External links
Official website
* SimpleMathJax, a MediaWiki extension
*MathJax
MathJax is a cross-browser JavaScript library that displays mathematical notation in web browsers, using MathML, LaTeX, and ASCIIMathML markup. MathJax is released as open-source software under the Apache License.
The MathJax project started in ...
, a MediaWiki extension
Free mathematics software
JavaScript libraries
Software using the Apache license
Symbol typefaces