By default, Instiki uses the itex2MML engine, which displays LaTeX mathematical expressions as MathML. However, because some browsers (e.g., Safari) don’t support MathML, mathematics may not be displayed properly for some users. Using BlahTeX, Instiki instead renders these mathematical expressions as ordinary PNG bitmap images. The result, in most cases, is not as good as the native MathML rendering. But it does, on the other hand, display consistently across a much wider range of browsers.
Prerequisite: a working TeX distribution, such as TeX Live or MacTeX. (BlahTeX needs this because it renders mathematical expressions on the server side—as opposed to MathML, which offloads this task onto the browser.)^{1}
The blahtex
command line utility takes a LaTeX expression, renders it (using an existing TeX distribution), and outputs the result as a small, cropped PNG image. To install it, follow these steps:
Go to the Blahtex(ml) Home Page, and download the blahtexml source code (version 0.6 or later).
Type make linux
or make mac
(as appropriate) to compile the blahtex
binary. (See section 3.2 of the Blahtex(ml) documentation for more details, if needed.)
Place the blahtex
binary somewhere in your command path, e.g., in /usr/local/bin/blahtex
.
Go to “Edit Web” to configure your wiki. In the “Specialize > Markup
” drop-down menu, select “Markdown+blahtex/PNG
”. That’s it!
The BlahTeX syntax is mostly, but not entirely, compatible with itex. So switching back and forth between the Markdown+itex2MML
and the Markdown+blahtex/PNG
filters will not be entirely glitch-free.
If you have questions about the BlahTeX/PNG support (as opposed to more general questions about Instiki), contact Ari Stern, who’s the maintainer of Instiki’s BlahTeX/PNG support.
BlahTeX support is tested to work with TeX Live and MacTeX, which contain all of the necessary LaTeX packages. If your TeX distribution is missing certain essential packages (such as preview-latex
), BlahTeX may not work properly. ↩