Loading...
 

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/identify and /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/ and lib/equation/pictures must be writeable by the server.


The following directories need write permissions for the plugin to work:
lib/equation/tmp
lib/equation/pictures

Parameters

Introduced in Tiki 2.
Preferences required:

wikiplugin_equation

Parameters
(body of plugin) - equation
no parameters

Examples

Basic syntax

{EQUATION()}your latex formula{EQUATION}

With a famous equation

This code,

{EQUATION()}e=mc^2{EQUATION}


Would produce on this site:


Another equation

This code,

{EQUATION()}
\setlength{\unitlength}{1cm}
 \begin{picture}(4,2)
 \put(1,1){\circle{3}}
 \put(3,1){\circle*{5}}
 \end{picture}
 
{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}

Related pages

Aliases

Created by: Last Modification: Wednesday 07 August, 2019 09:05:09 GMT-0000 by Yves Kipondo
List Slides
Show PHP error messages