ASCII-Math: Convert ASCII to MathML


This macro allows mathematical expressions to be written in a simple text format using a subset of the ASCIIMathML syntax and subsequently displayed on your Trac wiki page. When the page is requested, the ASCII text is transformed into MathML, which can be rendered in any capable browser: Firefox for sure, IE with the MathPlayer plugin, maybe Opera. See Can I use for current browser support.

To create a MathML representation of the Pythagorean theorem:

a^2 + b^2 = c^2

and the resulting wiki page's source should now contain properly formatted MathML code for display:

Image of Pythagorean formula

For more information about formatting the ASCII code describing the equation, see the ASCIIMathML documentation. See also for more info, or for an older version.

No other executables, modules, or plugins are necessary for this to work. However, where items do not display exactly as shown, a better alternative is TracMathJaxPlugin, which relies on an external library and has global support by the scientific community.

Bugs/Feature Requests

Existing bugs and feature requests for AsciiMathMacro are here.

If you have any issues, create a new ticket.


1 / 1


Download the zipped source from here.


You can check out AsciiMathMacro from here using Subversion, or browse the source with Trac.


General instructions on installing Trac plugins can be found on the TracPlugins page.

Recent Changes

18583 by jun66j5 on 2023-11-04 05:15:46
AsciiMathMacro: make compatible with Python 3 (closes #14153)
18582 by jun66j5 on 2023-11-04 01:16:18
AsciiMathMacro: follow-up to r15927, correct project URL
15929 by rjollos on 2016-10-17 22:27:00
1.0: Change format of version metadata


Author: ArmstrongJ
Maintainer: Jeffrey Armstrong

Last modified 2 years ago Last modified on Feb 17, 2022, 7:04:39 PM

Attachments (1)

Download all attachments as: .zip