History: PluginFormula
Preview of version: 12
This plugin includes a mathematical formula in a wiki page.
{FORMULA()}formula{FORMULA}
"formula" is a formula written in ))LaTeX(( syntax. Some examples can be seen in this Wikipedia page.
This plugin depends on external programs and will not work in php safe mode. At present only *nix servers can use it. You path must include latex, dvips, the convert programs. Also the plugin comes from GPL'd code, and that conflicts with TikiWiki LGPL license.
Consequently, the plugin is not installed in Tiki by default, but can be found in the download wiki plugins section of http://mods.tikiwiki.org.
{FORMULA()}e=mc^2{FORMULA} (render in text the formula)
{FORMULA()}\sqrt{2}\approx 1.4{FORMULA} (includes a .png showing that the square root of 2 is approx. 1.4)
This recipe give the steps needed to set up and run the formula pluggin assuming you have root access on your server and tiki otherwise installed and running.
Check for the latex, dvips and convert commands with:
# which latex
# which dvips
# which convert
If you don't have one or more of them, you must install them. On ))RedHat((, version8, these commands come from the tetex-dvips, tetex-fonts, tetex-latex and tetex packages. If your system does not have X installed, which can be the case for servers, you may also need to install the following rpms:
dialog
psutils
netpbm-progs
netpbm
))ImageMagik((
ghostscript
ghostscript-fonts
VFlib2
urw-fonts
Omni
cups-libs
gimp-print
XFree86-truetype-fonts
chkfontpath
XFree86-font-utils
XFree86-xfs
After the necessary support software is installed, install the plugin by coping the files into the necessary locations:
# cd <tiki-root-dir>/lib
# cp wiki-plugins-dist/wikiplugin_formula.php wiki-plugins/
# cp wiki-plugins-dist/tex2png .
Make sure tex2png has executable permission.
If you run into trouble you can debug it by running tex2png from the bash shell and looking at the output.
The server for Tikiwiki.org does not have the plugin insalled, but george.geller has set up a test page for this pluggin at http://teach.wikiplanet.com/tiki-index.php?page=ForumlaPluginTest