Render mathematical expressions in Trac using ​MathJax

Notice: This plugin is unmaintained and available for adoption.


This is a plugin for rendering mathematical expressions in Trac using MathJax. MathJax is issued by the MathJax Consortium, which is a joint venture of the American Mathematical Society (AMS) and the Society for Industrial and Applied Mathematics (SIAM) to advance mathematical and scientific content on the web. MathJax works across a wide range of browsers. Unlike the TracMathPlugin, this plugin performs all rendering on the client side using web fonts.

It exists in two implementations, each with a different syntax: inline or block.

To display a mathematical expression inline, enter the LaTeX equation between a pair of \( and \) brackets:

Here is an inline equation: \( y = x^2 \)

To display a mathematical expression in a block, either enter it between a pair of $$ characters:

Here is a block equation: $$ y = x^2 $$

or use the latex preprocessor:

y = x^2

Each of these examples will be displayed as follows:

MathJAX example

See also: TracMathPlugin, LatexFormulaMacro, Trac2LatexPlugin, LatexMacro or below for an alternative implementation and which may be more up to date.

Bugs/Feature Requests

Existing bugs and feature requests for TracMathJaxPlugin are here.

If you have any issues, create a new ticket.


8 / 10


0 / 2


2 / 2


Download the latest release in zip, gz, or bz2 format.


For the latest changes, check out the source using Hg, or browse it on Bitbucket.


Unpack your download. Go to the top level directory of TracMathJax and type:

python bdist_egg

This should create an egg file under the dist subdirectory of your current directory. Copy the egg to the plugins directory of your Trac project. If you have any difficulties installing, then consult these trac plugin installation steps.

As of version 0.4 of this plugin you no longer need to download MathJax to your web server. The plugin will use version of MathJax from their secure CDN.


To activate the component, edit your project's trac.ini file to include:

tracmathjax.* = enabled

For additional customization of the display output, see the MathJax documentation.

Release Notes

0.4: Update CDN URL

0.3: Use the MathJax CDN to serve MathJax

0.2: Fixed bugs with inline macro syntax (#8500)

0.1: Initial release

Alternative Implementation

There exist an alternative implementation which uses math keyword in wiki syntax so that it does not conflict with TracMathPlugin. This could be used for real LaTeX rendering, including TikZ. This alternative implementation is AGPL-licensed.

Inline syntax is also different, simply using WikiMacros. Examples:


x = \frac{1}{2}

Otherwise, implementations should be functionally equivalent. If it is not so, please inform us.

Bugs/Feature Requests

Please use GitHub for any issues you have with this implementation.


Download the zipped source from here.

The plugin is also available on PyPI.


You can clone this implementation from here using git, or the source on GitHub.


pip install MathJaxPlugin

For more information, please follow documentation on how to install Trac plugins.


Depending on the version of MathJax you require you may have to update the MATHJAX_URL to the library, for example to


Authors: kisielk, mitar
Maintainer: none (needsadoption)

Last modified 8 months ago Last modified on Apr 10, 2020, 7:42:18 AM

Attachments (1)

Download all attachments as: .zip