Skip to main content

# Math Works Now

Do­cu­tils has sup­port­ed math ren­der­ing for a while now. That means Niko­la should have sup­port­ed it for a while too, but nev­er did cor­rect­ly be­cause ... well, be­cause noone ev­er tried, may­be?

Well, it does now, be­cause Dami­an Avi­la has fixed it!

For example, I can now casually mention Euler's formula, which is $e^{ix} = \cos x + i\sin x$ and it just works. How did I do that? Like this:

I can now casually mention Euler's formula, which is :math:e^{ix} = \cos x + i\sin x

And I can show whole equa­tion­s!

\begin{equation*} \int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C \end{equation*}

That was done like this:

.. math::

\int \frac{dx}{1+ax}=\frac{1}{a}\ln(1+ax)+C

And all you need to do to make this work is tag your posts as "math­jax" so the right javascript is load­ed. If you don't do that, then your page has no math­e­mat­i­cal javascript at all :-)

/ 2013-02-20 14:55:

I am glad to have contributed a little bit, I hope to do it again soon... ;-)

/ 2013-02-21 01:30:

I just ran into this problem today but my solution wasn't as classy. I just added the mathjax script loader to my template head

/ 2013-02-21 03:57:

Doing it in that way, you will probably have some problems with the rendering... we can discuss it if you want but I encourage to use this solution...

Cheers.

/ 2013-02-22 05:32:

Well done, Damian and Roberto! This is the feature I've been waiting for! My rst2html static site is showing its age and the latex math rendering broke long ago.

/ 2013-02-22 21:20:

cool :-)

Contents © 2000-2021 Roberto Alsina