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

Since Tiki 20.x to view equations Tiki needs the mathjax/mathjax package installed.

Parameters

Render an equation written in LaTeX syntax as an image
Introduced in Tiki 2.
Go to the source code
Preferences required: wikiplugin_equation

Parameters
(body of plugin) - equation
no parameters

Examples

Basic syntax

Copy to clipboard
your latex formula

Copy to clipboard
$$your latex formula$$



With a famous equation

This code,

Copy to clipboard
{EQUATION()}$$e=mc^2$${EQUATION}


Would produce on this site:

$$e=mc^2$$

Another equation

This code,

Copy to clipboard
{EQUATION()} <math>\setlength{\unitlength}{1cm} \begin{picture}(4,2) \put(1,1){\circle{3}} \put(3,1){\circle*{5}} \end{picture} </math> {EQUATION}


Would produce on this site:

\setlength{\unitlength}{1cm} \begin{picture}(4,2) \put(1,1){\circle{3}} \put(3,1){\circle*{5}} \end{picture}

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.

Copy to clipboard
\documentclass[12pt]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \pagestyle{empty} \begin{document} $your sexy formula$ \end{document}

Aliases

List Slides