Plugin Equation
Use this wiki plugin, introduced in Tiki2, to render an equation written in LaTeX syntax as an image. See also MathJax.
Prerequisites
PHP
This plugin must have the php function EXEC enabled on the server for it to work.
LaTex
LaTex distribution must be installed on your server. Check you have installed the following LaTex packages:
-
inputenc -
amsmath -
amsfonts -
amssymb - You should have a :
-
/usr/bin/latex,/usr/bin/dvips,/usr/bin/convert,/usr/bin/identifyand/usr/bin/convert - If the path of these tasks are incorrect, you must adjust the php code in
lib/equation/class.latexrender.php
-
- the directories
lib/equation/tmp/andlib/equation/picturesmust be writeable by the server.
The following directories need write permissions for the plugin to work:
lib/equation/tmp
lib/equation/pictures
- title
Parameters
Render an equation written in LaTeX syntax as an imageIntroduced in Tiki 2.
Go to the source code
Preferences required: wikiplugin_equation
| Parameters |
|---|
| (body of plugin) - equation |
| no parameters |
Examples
Basic syntax
{EQUATION()}your latex formula{EQUATION}
{EQUATION()}$$your latex formula$${EQUATION}
With a famous equation
This code,
{EQUATION()}$$e=mc^2$${EQUATION}
Would produce on this site:
Customizations
This plugin actually wraps a minimalistic LaTex around the formula. For instance, you can customize lib/equation/class.latexrender.php if you want other fonts.
\documentclass[12pt]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \pagestyle{empty} \begin{document} $your sexy formula$ \end{document}