Skip to content

MathML Support In Browsers

Frédéric Wang edited this page May 5, 2012 · 12 revisions

MathML Support in Browsers and MathML output Jax

Introduction

This page describes MathML support in browsers and how well they display the code generated by MathJax. Compared to MathJax the browser's MathML rendering engines are generally faster but of lower quality.

It is intended to serve as a help for people who have plan to use mathematical formulas in their applications or Web content and are trying to find the best solution between a MathML output or other output formats provided by MathJax. It is also a way for the MathJax team to decide on which browser the MathML output processor should be enabled by default and for the users to determine which rendering mode to choose. This document may eventually encourage browser vendors to improve their MathML layout engines by suggesting them to focus on MathJax's needs.

General remarks

Internet Explorer

Internet Explorer does not support MathML and there are no apparent plans to add such support, although others of their products like Microsoft Word have long been able to handle this language.

To remedy this situation, Design Science provides the MathPlayer plug-in which gives a good MathML support to Internet Explorer. The Design Science and MathJax teams collaborate to ensure that MathPlayer works well with MathJax and keep MathPlayer's layout engine the default renderer for Internet Explorer.

MathJax works with MathPlayer to make math accessible to screen readers, to screen magnifiers, and to learning disability software. See Accessible Pages with MathJax for details.

Firefox

Firefox has a good MathML support and should work well with the code generated by MathJax in most situation provided you install mathematical fonts. However because of some rendering issues, the MathJax team decided to disable Firefox's native MathML by default. In particular we do not recommend to use this rendering if you plan to make heavy use of equation labelling or formula linebreaking.

See also the MathML-in-MathJax tracking bug.

Webkit

Webkit has an experimental MathML implementation which is enabled in Safari but the support is still limited and the rendering quality not very high. This implementation has not passed Google's security review and so is not integrated yet in Chrome.

See also the MathML-in-MathJax tracking bug.

Opera

Opera has a support for a subset of MathML implemented using a CSS stylesheet. This choice of implementation design implies several issues, including a bad quality. This may be acceptable for elementary mathematical notations but is not recommended for complex formulas or in cases where the rendering quality is an essential point.

Supported input commands and MathML elements

We give tables indicating support for various MathJax input commands provided by the TeX and AsciiMath processors and mention potential issues. In theory, one can use the MathML input processor to enter arbitrary input allowed by the MathML 3 recommendation. We give a general overview for elements, attributes or general MathML features supported by MathJax. For details, please read the browser vendors documentation.

TeX input processor

Commands Test pages Comments MathPlayer Firefox Webkit Opera
Accents accents-1 ? Yes ? ?
\skew accents-2 ? ? ? ?
\buildrel, \overbrace, \overset, \sideset, \stackrel, \subarray, \substack, \underbrace, \underset buildrel-1, overbrace-1, overset-1, sideset-1, stackrel-1, subarray-1, underbrace-1, underset-1 ? ? ? ?
\mathtip, \texttip, \toggle mathtip-1, texttip-1, toggle-1 ? ? ? ?
Arrows arrows-1, arrows-2, arrows-3, arrows-4, arrows-5, Newextarrrow-1 ? ? ? ?
\mathbin, \mathinner, \mathop, \mathop \mathopenclose, \mathord, \mathpunct, \mathrel mathbin-1, mathinner-1, mathop-1a, mathop-1b, mathop-2, mathopenclose-1, mathord-1, mathpunct-1, mathrel-1 These commands only define the type of an atom, so simply require basic support for token MathML elements. Yes Yes Yes Yes
\!, \#, \$, \%, \&, \, \:, \;, \>, \_, \{, \|, \}, +, -, =, !, ', :, ., /, ^, _, {, }, ~, #, &, \\, % backslashed-1, basic-operators-1, basic-operators-2 ? ? ? ?
\color, \colorbox, \fcolorbox, \definecolor color-1, color-2, colorbox-1, fcolorbox-1, definecolor-1a, definecolor-2, namedcolors-1, ? ? ? ?
Delimiters big-1, big-2, big-3, delimiters-1, delimiters-2, left-right-1, ? ? ? ?
Environments align, alignat, aligned, eqalign, eqalignno, eqnarray, equation, gather, gathered, leqalignno, multiline, split align-1a, align-1b, alignat-1a, alignat-1b, aligned-1, aligned-2, alignedat-1, eqalign-1, eqalignno-1, eqnarray-1a, eqnarray-1b, equation-1, equation-2, gather-1a, gather-1b, gathered-1, gathered-2, leqalignno-1, multiline-1a, multiline-1b, multiline-2a, multiline-2b, split-1, ? ? ? ?
\above, \abovewithdelims, \atop, \atopwithdelims, \binom, \brace, \brack, \cfrac, \choose, \dbinom, \dfrac, \frac, \genfrac, \tbinom, \tfrac, \overwithdelims above-1 abovewithdelims-1 atop-1 atopwithdelims-1 binom-1 brace-1 brack-1 cfrac-1 choose-1 dbinom-1 dfrac-1 frac-1a frac-1b genfrac-1 tbinom-1 tfrac-1 overwithdelims-1 ? ? ? ?
\boxes, \kern, \llap, \lower, \mathstrut, \moveleft, \moveright, \newline, \phantom, \raise, \rlap, \shove, \skip, \skip, \smash, \spaces, \strut, \vcenter root-1, boxes-1, kern-1a, kern-1b, llap-1, lower-1, mathstrut-1, moveleft-1, , newline-1, phantom-1, raise-1, rlap-1, shove-1, skip-1a, skip-1b, smash-1, spaces-1, strut-1, vcenter-1 ? ? ? ?
Greek and Hebrew letters greek-1, greek-2, greek-3 greek-4 hebrew-1 ? ? ? ?
\begingroup, \endgroup, \def, \let, \newcommand, \renewcommand, \newenvironment begingroup-1, def-1, let-1, macro-1a, macro-1b, macro-2, macro-3, macro-4, macro-5 macro-6, macro-7 These commands allow to define macros and do not require any particular MathML features. Yes Yes Yes Yes
\Bbb, \bf, \boldsymbol, \cal, \frak, \it, \mathbb, \mathbf, \mathbf, \mathbf, \mathcal, \mathfrak, \mathit, \mathrm, \mathsf, \mathtt, \mit, \pmb, \rm, \sf, \text, \textbf, \textit, \textrm, \tt Bbb-1, bf-1, boldsymbol-1, cal-1, frak-1, it-1, mathbb-1, mathbf-1a, mathbf-1b, mathbf-2, mathcal-1, mathfrak-1, mathit-1, mathrm-1, mathsf-1, mathtt-1, mit-1, pmb-1, rm-1, sf-1, text-1, textbf-1, textit-1, textrm-1, tt-1 ? ? ? ?
Environments array, bmatrix, matrix, pmatrix, smallmatrix, vmatrix array-1a, array-1b, array-2, array-3, bmatrix-1, bmatrix-2, matrix-1, matrix-2, pmatrix-1, pmatrix-2 smallmatrix-1, vmatrix-1, vmatrix-2, ? ? ? ?
mhchem package isotopes-1, advanced-2, basics-1, bonds-1, symbols-1, arrows-1 ? ? ? ?
\class, \cssId, \href, \require, \Rule, \style, \Tiny, \unicode Rule-1, Tiny-1, class-1, cssId-1, href-1, href-2, require-1 style-1, unicode-1 ? ? ? ?
\eqref, \label, \notag, \nonumber, \ref, \tag eqref-1, label-1, notag-1, ref-1a, ref-1b, ref-2, ref-3, tag-1, tag-2 ? ? ? ?
\root\of, \leftroot, \uproot root-1, root-2, root-3 ? ? ? ?
\sqrt sqrt-1, sqrt-2 ? ? ? ?
Large operators largeops-1 ? ? ? ?
Other symbols... binaryops-1, dots-1, relations-1, symbols-1, symbols-2, symbols-3, symbols-4, symbols-5, symbols-6 ? ? ? ?
\TeX, \LaTeX LaTeX-1 ? ? ? ?
\bbox bbox-1 ? ? ? ?
\boxed boxed-1 ? ? ? ?
\cancel, \bcancel, \xcancel, \cancelto cancel-1 ? ? ? ?
\cases cases-1 ? ? ? ?
\displaylines displaylines-1 ? ? ? ?
\enclose enclose-1 ? ? ? ?
\mod, \bmod, \pmod mod-1 ? ? ? ?
\not not-1 ? ? ? ?
\pod pod-1 ? ? ? ?
Primes, \backprime \prime primes-1 ? ? ? ?
\tiny, \small, \normalsize, \large, \Large, \LARGE, \huge, \Huge, \scriptsize mathsize-1 ? ? ? ?
\textstyle, \displaystyle, \scriptscriptstyle, \scriptstyle, \oldstyle style-1, style-2 ? ? ? ?
\verb verb-1 ? ? ? ?
\arccos, \arcsin, \arctan, \arg, \cos, \cosh, \cot, \coth, \csc, \deg, \det, \dim, \exp, \gcd, \inf, \hom, \ker, \lg, \lim, \liminf, \limsup, \ln, \log, \max, \min, \Pr, \sec, \sin, \sinh, \sup, \tan, \tanh, functions-1 ? ? ? ?
\limits, \nolimits, \injlim, \projlim, \varinjlim, \varliminf, \varlimsup, \varprojlim limits-1, limits-2, limits-3, limits-4 ? ? ? ?

AsciiMath input processor

Command MathPlayer Firefox Webkit Opera
sqrt ? ? ? ?

MathML input processor

Elements (basic support) MathPlayer Firefox Webkit Opera
<mi>, <mn>, <mo>, <mtext>, <ms> Yes Yes ? ?
<mrow> Yes Yes ? ?
<mfrac> Yes Yes ? ?
<msqrt> Yes Yes ? ?
<mroot> Yes Yes ? ?
<mstyle> Yes Yes ? ?
<merror> Yes Yes ? ?
<mpadded> Yes Yes ? ?
<mphantom> Yes Yes ? ?
<mfenced> Yes Yes ? ?
<menclose> Yes Yes ? ?
<msub>, <msup>, <msubsup> Yes Yes ? ?
<munder>, <mover>, <munderover> Yes Yes ? ?
<mmultiscripts> Yes Yes ? Limited
<mtable> Yes Yes ? ?
<mtr> Yes Yes ? ?
<mtd> Yes Yes ? ?
<maligngroup> ? No ? ?
<malignmark> ? No ? ?
<mstack> ? No ? ?
<mlongdiv> ? No ? ?
<msgroup> ? No ? ?
<msrow> ? No ? ?
<mscarries> ? No ? ?
<mscarry> ? No ? ?
<msline> ? No ? ?
<mglyph> ? No ? ?
<maction> ? Yes ? ?
<semantics> ? Partial ? ?
Feature MathPlayer Firefox Webkit Opera
Operator Stretching Yes Yes Partial No
Embellished Operators Yes Yes No No
Clone this wiki locally