TeX equations can be added to Instiki pages using jsMath. Right now, this requires a simple modification to the source code, but it could be made an option in Edit Web.
First, download and unpack jsMath as per the documentation. Since we want this in Instiki, a good place to put it is in the public javascript folder of your Instiki: instiki/public/javascripts/jsMath
Next, put the necessary code to call up jsMath in the default layout: instiki/app/views/layouts/default.rhtml. I prefer using the tex2math plugin, so that’s what’s here, but modify the calls to jsMath to suit your needs. Be sure to modify the scripts sources to wherever your jsMath scripts reside:
Between the opening body tag and the div Container:
<body>
<SCRIPT SRC="http://instiki.domain/javascripts/jsMath/jsMath.js"></SCRIPT>
<NOSCRIPT>
<DIV STYLE="color:#CC0000; text-align:center">
<B>Warning: <A HREF="http://www.math.union.edu/locate/jsMath">jsMath</A>
requires JavaScript to process the mathematics on this page.<BR>
If your browser supports JavaScript, be sure it is enabled.</B>
</DIV>
<HR>
</NOSCRIPT>
<SCRIPT> jsMath.Setup.Script("http://instiki.domain/javascripts/jsMath/plugins/tex2math.js") </SCRIPT>
<div id="Container">
Between the closing body tag and the closing html tag:
</body>
<SCRIPT> jsMath.ConvertTeX() </SCRIPT>
<SCRIPT> jsMath.Process() </SCRIPT>
</html>
Now, math can be entered on any page by enclosing equations in dollar signs.
With this setup, the rather large (~200K) script file will be downloaded by every page. This could be streamlined using the jsMath’s autoload plugin, but perhaps an option could be added to Instiki as well.
In Safari the jsMath floater interferes with rendering the formatting tips in the edit screen, but on Firefox it works okay.
Textile and Markdown don’t understand that some of your page will be math, so you’ll need to escape underscores, asterisks, &c.
$a_2 + b_2 = c_2$
\[324\]