Loading...
 
Skip to main content

History: PluginFormula

Preview of version: 13

This plugin includes a mathematical formula in a wiki page.

Usage

{FORMULA()}formula{FORMULA}

"formula" is a formula written in ))LaTeX(( syntax. Some examples can be seen in this Wikipedia page.

Requirements


This plugin depends on external programs and will not work in php safe mode. At present only *nix servers can use it. Your 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.

Examples


{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)

Setup and Install Recipe


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

FIXME: This directoins are not correct if you get the plugin from mods.tikiwiki.org. 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

History

Information Version
drsassafras Mass search and replace 32
View
drsassafras Mass search and replace 31
View
drsassafras Mass search and replace 30
View
Marc Laporte 29
View
Marc Laporte 28
View
Marc Laporte 27
View
Marc Laporte 26
View
Marc Laporte new URL 25
View
Xavier de Pedro 24
View
Xavier de Pedro 23
View
alexice 22
View
bprager 21
View
Danny Staple 20
View
george.geller 19
View
george.geller 18
View
Gustavo Muslera 17
View
george.geller 16
View
george.geller 15
View
george.geller 14
View
george.geller 13
View
Gustavo Muslera 12
View
george.geller 11
View
george.geller 9
View
george.geller 8
View
george.geller 7
View