Cookbook /

# MathJax

Summary: Add markup to embed math using TeX syntax.

Version: 20110307

Prerequisites:

Status: Stable

Maintainer: AMyles

Discussion: MathJax-Talk

## Questions answered by this recipe

- How can I embed math in a wiki page using MathJax which is the successor of jsMath?

## Description

Embed math in wiki pages using scalable fonts.

## Notes

Disable the jsMath plugin (if you are already using it) before using the MathJax plugin below.

- Download MathJax from http://www.mathjax.org/. Install the MathJax package into your PmWiki's pub/ directory, as pub/MathJax/ . Or, you can install MathJax wherever you wish, and set $MathJaxURL to the url of the MathJax directory.
- Unless backward compatibility with old browsers is a must, consider removing the
`MathJax/fonts/HTML-CSS/TeX/png`

directory since it has too many files and may slow down the server. - Download MathJax.phpΔ into the
`cookbook/`

directory. - Add the following line to a local customization file:
include_once("$FarmD/cookbook/MathJax.php");

## Additional MathJax settings

The MathJax settings file `MathJax/config/MathJax.js`

has many more settings to play around with, including setting the HTML tags (e.g. script, pre, etc) within which MathJax will not translate the text to mathematics. Take a look there.

## Release notes

**20101218**: Took Domingo Redal's suggestion into account, simplifying installation and MathJax upgrades.**20110307**: Support for equation`\label`

and`\eqref`

added by Richard Shaw.

## See also

- Cookbook /
- AMmathjax Add markup to embed math using ASCII MATH by MathJax. (Stable)
- ASCIIMath Display MathML rendered ascii formula into PmWiki 2.x pages (Stable)
- Formula Lightweight rendering of mathematical formulas in wiki pages (Beta)
- FractionsPlus Adds simple markup to write fractions. (Maintained)
- JsMath Add markup to display and embed mathematical formulas in wiki pages using TeX. (Obsolete - use MathJax)
- LaTeXMathJax MathJax support for PmWiki (stable)
- LaTeXMathML Translating LaTeX math notation dynamically to Presentation MathML (Stable)
- LinuxTex Enable TeX markup
- LuaExecute Lets Lua scripts dynamically generate parts of your wiki page (Beta)
- Mathtex Add markup to display and embed several lines of mathematical formulas in wiki pages (testing)
- MimeTeX Add markup to display and embed mathematical formulas in wiki pages (Stable)
- SageCell This allows you to embed an interactive SageCell into your webpage. Sage is an open source alternative to MathLab, Mathematica, and Maple. (Stable)
- SimpleJsMath Notes on modifying the jsMath for a skin (not a complete recipe)
- TrueLatex Enables interpretation and rendering of real LaTeX markups in PmWiki. Support for XeLaTex included in v1.8. (Working perfectly. Very simple to use, customizable and comes with lots of options.)

## Contributors

## Comments

See discussion at MathJax-Talk

**User notes** +2: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.