Tools to Display Math on Web

By Xah Lee. Date: . Last updated: .

WolframLang, Mathematica

Mathematica is a powerful tool for math presentation as well as computing math. This is the most robust, convenient, powerful, professional, solution. you can export your file to LaTeX, or HTML or PDF.

WolframLang_typesetting_icon_vjTNq
WolframLang Typesetting Math

List Unicode Math Symbols

Search Unicode Math Symbols

MathJax for Web Publishing

MathJax is a JavaScript library for displaying math in browsers.

MathJax home page at https://www.mathjax.org/

You can use any of {MathML, LaTeX, ASCIIMathML} markup for input.

Here is a example of using it. Put the following in your HTML page.

<script defer src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

then, in your web page, you can enter this plain text:

$$
\Pr\left(\bigcup_i \Omega_i\right)=\sum_i \Pr(\Omega_i)=\sum_i\Pr(X=u_i)=1
$$

it'll display like this:

$$ \Pr\left(\bigcup_i \Omega_i\right)=\sum_i \Pr(\Omega_i)=\sum_i\Pr(X=u_i)=1 $$

if your math expression has any of {&, >, <} symbols, you need to put space on both sides of the symbol. Or, to be absolutely safe, change them to { &amp;, &gt;, &lt; }. [see HTML XML Entities]

MathJax Examples

math formula MathJax
math formula rendered by MathJax

here's what your browser shows:

$$ \sum_{n=1}^k \frac{1}{n} ≻ \int_1^{k+1} \frac{1}{x} dx = \ln(k+1) $$
$$ \sum_{n = 0}^\infty \frac{(-1)^{n}}{2n+1} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots = \frac{\pi}{4} $$
$$ \int_a^b \! f(x) dx = F(b) - F(a) $$
$$ f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h} $$
$$ \overline{(z/w)} = \bar{z}/\bar{w} $$
$$ \textstyle r=|z|=\sqrt{x^2+y^2} $$
$$ \begin{bmatrix} 1 & 2\\ 3 & 4\\ \end{bmatrix} \begin{bmatrix} 0 & 1\\ 0 & 0\\ \end{bmatrix}= \begin{bmatrix} 0 & 1\\ 0 & 3\\ \end{bmatrix} $$

right click on the formula to get its TeX input.

Creating Keyboard Layout for Inputing Math Symbols

GNU TeXmacs

A word-processor-like program that renders 2D math formulas, using graphical user interface. TeXmacs borrows ideas from TeX and Emacs but is not dependent on TeX nor Emacs.

FireMath, a MathML Editor for Firefox

FireMath is a MathML editor as a Firefox plugin. Home at www.firemath.info

Why is it Difficult to Type Math Online

The technology to display math notation on the web browser, is really dismal. [ MathML ] [ https://en.wikipedia.org/wiki/MathML ] is released in 1998. Now, it is over 10 years, but it is still not widely supported in web browsers. Authors need to invest huge amount of time experimenting with several solutions, and in most cases, requires knowledge of HTML, CSS, XML, MathML, JavaScript, TeX, to various degrees. One early solution is to resort to some tool to turn math notations into images. This means, the browser needs to load a huge bunch of images, and the images are ugly, not scalable, cannot be copy and pasted. Images for math notation are still widely practiced today. Another solution requires readers to download some special plug-in. Another solution is to simply discard the web and use PDF instead.

In the past 10 years, huge amount of web technologies have developed, from blog to wiki to instant messaging to Twitter to interactive road maps to online videos to voice and video chats. Digital video is much more technically complex than math display system, but when it comes to math, sadly, the situation is rather stagnant. This is, of course, because relatively very few people need it. Perhaps 0.01% of web users. While online video, is huge money to be made.