Fullscreen
[Show/Hide Right Column]

Renders an equation written in LaTeX syntax as an image.

Plugin Equation

This Wiki Plugin renders an equation written in LaTeX syntax as an image.




Usage and Parameters

To use this plugin in a wiki page, use the syntax:
Syntax for the EQUATION plugin
{EQUATION()}your latex formula{EQUATION}


Parameter Accepted values Default Effect Required? Since
size (number) (100) Percentage of increase from normal size. 100 produces the default size. 200 produces an image twice as large n --


Example

This code,
Example...
{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:

e=mc^2

Another example

This code,
Example...
{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:

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

Requirements

  • 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 plugin works with write permissions on directories
lib/equation/tmp
lib/equation/pictures


so ensure they are writable or make them so in order to have the plugin working.

About LaTex

This plugin actually wraps a minimalistic LaTex arround the formula. For instance, you can customize lib/equation/class.latexrender.php if you want other fonts.

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



An example:
http://help.csregistry.org/tiki-index.php?page=LatexExample


alias

Contributors to this page: Marc Laporte9138 points  , xavi67871 points  , lindon132 points  , Roberto López159 points  and sylvie7387 points  .
Page last modified on Wednesday 04 April, 2012 15:41:01 UTC by Marc Laporte9138 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki