Using MathJax

To add MathJax to ukiyoe (if not using the MathJax CDN), install (unzip) it and make an alias to its directory in the virtual host e.g.:

Alias /MathJax /<path-to>/MathJax

This is an inline equation: $e^{ix} = \cos{x} + i \sin{x}$. It uses single $ delimiters and \\ escapes (note the double escape due to Markdown). The relevant code in the template header (between <head> tags) to add MathJax and make it use those delimiters is:

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript" src="/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

Alternatively the config/default.js file can be edited to use single $ delimiters (search for the string uncomment this for standard TeX math delimiters) and simply use:

<script type="text/javascript" src="/MathJax/MathJax.js?config=default.js"></script>

in the header.

Note that Firefox seems to have a problem loading the web fonts and using image fonts instead (Konqueror and Chrome appear to have no such issue). The type of fonts which are used can be verified by right-clicking on an equation and selecting "About MathJax".

Remember to touch ukiyoe.wsgi to refresh the template cache if need be. Here are more complex examples (using $$ delimiters):

$$L' = {L}{\sqrt{1-\frac{v^2}{c^2}}}$$

$$i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$$