Next: Text areas in HTML export, Previous: Images in HTML export, Up: HTML Export [Contents][Index]

LaTeX math snippets (see LaTeX fragments) can be displayed in two
different ways on HTML pages. The default is to use the MathJax,
which should work out of the box with Org^{128}^{129}. Some MathJax
display options can be configured via `org-html-mathjax-options`

, or
in the buffer. For example, with the following settings,

#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler #+HTML_MATHJAX: cancel.js noErrors.js

equation labels are displayed on the left margin and equations are
five em from the left margin. In addition, it loads the two MathJax
extensions ‘`cancel.js`’ and ‘`noErrors.js`’^{130}.

See the docstring of `org-html-mathjax-options`

for all supported
variables. The MathJax template can be configure via
`org-html-mathjax-template`

.

If you prefer, you can also request that LaTeX fragments are processed into small images that will be inserted into the browser page. Before the availability of MathJax, this was the default method for Org files. This method requires that the dvipng program, dvisvgm or ImageMagick suite is available on your system. You can still get this processing with

#+OPTIONS: tex:dvipng

#+OPTIONS: tex:dvisvgm

or

#+OPTIONS: tex:imagemagick

By default Org loads MathJax from cdnjs.com as recommended by MathJax.

Please note that exported formulas are part of an HTML
document, and that signs such as ‘`<`’, ‘`>`’, or ‘`&`’ have special
meanings. See MathJax TeX and LaTeX support.

See TeX and LaTeX extensions in the MathJax manual to learn about extensions.