A quick way to get high quality math equations displayed on your website is MathTran. They provide a webservice which will render a given LaTeX equation as a PNG for you. All you need to do is place the following line inside the <head> tags of your website:
<script type="text/javascript" src="http://www.mathtran.org/js/mathtran.js"></script>
Once you have done this all <img> tags of the form
<img alt="tex:e^{i\pi} = -1" />will be replaced by the corresponding LaTeX equation.
MoinMoin macro
If you are using MoinMoin as your wiki here is a basic macro which allows you to insert MathTran rendered equations into your wiki pages. Place the following two lines in a file named MathTran.py in the data/plugin/macro directory of your wiki.
1 def execute(macro, formula):
2 return macro.formatter.image(alt=r"tex:"+ formula)
At first sight this appears to allow cross-site scripting attacks, however I believe that formula is automagically escaped by the wiki. See the end of this page for an example.
The MoinMoin MacroMarket page for MathTran is http://moinmo.in/MacroMarket/MathTran
From now on the macro MathTran is available, to use it just type:
[[MathTran(e^{i\pi} = -1)]]Which will give you .
We all recognise the expression of a Taylor series , but it is a bit cramped. Luckily MathTran can also display things display style:
You might also recognise:
Feel free to add more examples.
XSS attacks?
