Loading...
 
Skip to main content

History: PluginEquation

Source of version: 31 (current)

Copy to clipboard
            ! 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+-

{RBOX()}
Since Tiki 20.x to view equations Tiki needs __the mathjax/mathjax package installed__.
{RBOX}

!! Parameters
{pluginmanager plugin="equation"}
!! Examples
!!!Basic syntax
{TABS(tabs="Before Tiki 20.x|Tiki 20.x+")}
{CODE(colors="tiki")}
{EQUATION()}your latex formula{EQUATION}
{CODE}
/////
{CODE(colors="tiki")}
{EQUATION()}$$your latex formula$${EQUATION}
{CODE}
{TABS}

!!!With a famous equation
''This code,''
{CODE(colors="mathematica" theme="default")}{EQUATION()}$$e=mc^2$${EQUATION}
{CODE}

''Would produce on this site:''

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

!!! Another equation
''This code,''
{CODE(colors="tiki")}
{EQUATION()}
<math>\setlength{\unitlength}{1cm}
 \begin{picture}(4,2)
 \put(1,1){\circle{3}}
 \put(3,1){\circle*{5}}
 \end{picture}
 </math>
{EQUATION}
{CODE}

''Would produce on this site:''

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

{CODE(colors="null")}
\documentclass[12pt]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\pagestyle{empty}
\begin{document}
$your sexy formula$
\end{document}

{CODE}
!!Related pages
* ((MathJax))
!!Aliases
*(alias(Latex))