The MathJax home page

How are equations rendered in LaTeX2Web ?

Equations are rendered by MathJax.

MathJax is a JavaScript library which parses the HTML code of a web page and renders LaTeX equations in the browser. By default, MathJax detects inline math by looking for the opening delimiter \( and the closing delimiter \), and displaymath by looking for the opening delimiter \[ and the closing delimiter \]. Then it parses the LaTeX code and renders it in the web page using one in several possible methods.

All the equations in LaTeX2Web are rendered by MathJax. This is also true for HTML documents in arXiv.

The current stable version is version 3. Version 4 is around the corner with a beta-7 version, and brings the following improvements:

  • Automatic line breaking in equations. This is a big improvement when equations are displayed on mobile.
  • multiple fonts for equation rendering. The following fonts are currently supported
    • modern
    • asana
    • bonum
    • dejavu
    • pagella
    • schola
    • termes
    • stix2
    • fira
    • tex

When you are viewing a document in LaTeX2Web, there is now a Switch to Mathjax x menu item in the view menu, which lets you switch between the two MathJax versions. This is also available on mobile.

If you have selected MathJax 4, the default font is tex, which corresponds to the version 3 font. To select another font, append ?mathjax=4&font= , followed by the font name, to the document URL.

As a final remark, and since the equation rendering is done in the device's browser, its speed will depend on the combined speeds of the browser's JavaScript engine and the general speed of the device. It is completely independent of LaTeX2Web (although LaTeX2Web is responsible for the MathJax configuration).


Tags
Year

Year / Month

Authors

Index
Archive