To enable math, e.g., LaTeX on wikipages, first make sure that you have texvc.
There are two ways to get texvc. The first one is to compile the source using Ocaml. [recommended. If you find any problem later, you can always re-compile to resolve problems.]
While another possibility is to use a precompiled binary file texvc directly, which can be downloaded from here. To test if texvc worksvia command lines, try: texvc /tmp /tmp '\LaTeX' 'utf-8', and you should see a png file in /tmp. (texvc is not site-available, add it to the /math directly, and set its permissin 755)
Now change the LocalSetting.php to enable math (false by default):$wgUseTeX = true;
Under the wiki directory, create the directories for tex and image files: /images/tmp if not yet created. Also note that /images/math is needed. Note to set the permission of the two folders to 755!
It should work by now. However, I have been seeking a solution for this error:
Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert)