Tag Archive for 'math'

LaTeX in WordPress

Alright, after a long while I finally was able to get LaTeX support in this site. Two plugins made it somewhat easy: WP-Latex and its dependency, fauxML. I now just needed latex itself and dvipng. However, I couldn’t get past the configure script because it was complaining about a missing dependency, libkpathsea. After some searching, I wasn’t able to find anything but binary packages for it. I finally found teTeX, whatever the heck it is, it included dvipng and libkpathsea. The ./configure took ages, and the actual compiling took even longer, but in the end I was left with a nice little dvipng binary.

I then hurried to WP-Latex’ settings page, and filled in the paths to the binaries. That same page tries to execute a command to test if everything is working fine, but it kept throwing an exit code 1 though, and after man‘ing the dvipng binary, I realized that one of the parameters to it that the plugin was giving it, –halt-on-error, wasn’t even in there. So I went to automattic-latex.php and in line 171 removed it from the command string. I then refreshed the page and everything seemed to be working fine.

Some might wonder why I went through all this trouble, but I don’t know, I just really like how math formulas look in LaTeX, and I just kinda like the idea of being able to do it whenever I’d feel like doing it. To make sure this is working:

e^{\i \pi} + 1 = 0

\mathop {\lim }\limits_{x \to \infty } \frac{{\sin (\pi  - h) - \sin (\pi )}}{h}