User Tools

Site Tools


wiki:plugins:math

Table of Contents

Math Plugin

This plugin makes use of phpmathpublisher to allow inclusion of properly rendered mathematical formulae in Dokuwiki pages. This is a completely self-contained php solution requiring no third party packages.

Usage

<m size>...mathematical formulae...</m>

size (optional) the base glyph size in pixels - default value: 12.

alignment can be controlled in the same way as dokuwiki images, one space to the left to right align, one to the right to left align, one on each side to centre.

Syntax

Adapted from http://www.xm1math.net/phpmathpublisher/doc/help.html.

To toggle to the math mode, you must use the <m>...</m> tag. Apart from this tag, any html code can be used. The math commands must be separated by a space character or surrounded by {}.

Typical commands

  • x+y : <m>x+y</m>
  • x-y : <m>x-y</m>
  • x*y : <m>x*y</m>
  • x/y : <m>x/y</m>
  • x^y : <m>x^y</m>
  • x_y : <m>x_y</m>
  • x<>y : <m>x<>y</m>
  • x>y : <m>x>y</m>
  • x>=y : <m>x>=y</m>
  • x<y : <m>x<y</m>
  • x⇐y : <m>x⇐y</m>
  • (x) : <m>(x)</m>
  • {x} : <m>{x}</m>

Space

  • a~b : <m>a~b</m>

Greek:

  • alpha : <m>alpha</m>
  • beta : <m>beta</m>
  • gamma : <m>gamma</m>
  • delta : <m>delta</m>
  • epsilon : <m>epsilon</m>
  • varepsilon : <m>varepsilon</m>
  • zeta : <m>zeta</m>
  • eta : <m>eta</m>
  • theta : <m>theta</m>
  • vartheta : <m>vartheta</m>
  • iota : <m>iota</m>
  • kappa : <m>kappa</m>
  • lambda : <m>lambda</m>
  • mu : <m>mu</m>
  • nu : <m>nu</m>
  • xi : <m>xi</m>
  • pi : <m>pi</m>
  • varpi : <m>varpi</m>
  • rho : <m>rho</m>
  • varrho : <m>varrho</m>
  • sigma : <m>sigma</m>
  • varsigma : <m>varsigma</m>
  • tau : <m>tau</m>
  • upsilon : <m>upsilon</m>
  • phi : <m>phi</m>
  • varphi : <m>varphi</m>
  • chi : <m>chi</m>
  • psi : <m>psi</m>
  • omega : <m>omega</m>
  • Gamma : <m>Gamma</m>
  • Lambda : <m>Lambda</m>
  • Sigma : <m>Sigma</m>
  • Psi : <m>Psi</m>
  • Delta : <m>Delta</m>
  • Xi : <m>Xi</m>
  • Upsilon : <m>Upsilon</m>
  • Omega : <m>Omega</m>
  • Theta : <m>Theta</m>
  • Pi : <m>Pi</m>
  • Phi : <m>Phi</m>

Symbols:

  • infty : <m>infty</m>
  • in : <m>in</m>
  • notin : <m>notin</m>
  • forall : <m>forall</m>
  • exists : <m>exists</m>
  • notexists : <m>notexists</m>
  • partial : <m>partial</m>
  • approx : <m>approx</m>
  • pm : <m>pm</m>
  • inter : <m>inter</m>
  • union : <m>union</m>
  • ortho : <m>ortho</m>
  • parallel : <m>parallel</m>
  • backslash : <m>backslash</m>
  • prime : <m>prime</m>
  • wedge : <m>wedge</m>
  • vert : <m>vert</m>
  • lbrace : <m>{</m>
  • rbrace : <m>}</m>
  • circ : <m>circ</m>
  • varnothing : <m>varnothing</m>
  • subset : <m>subset</m>
  • notsubset : <m>notsubset</m>
  • cdots : <m>cdots</m>
  • vdots : <m>vdots</m>
  • ddots : <m>ddots</m>

Arrows:

  • left : <m>left</m>
  • right : <m>right</m>
  • leftright : <m>leftright</m>
  • doubleleft : <m>doubleleft</m>
  • doubleright : <m>doubleright</m>
  • doubleleftright : <m>doubleleftright</m>
  • nearrow : <m>nearrow</m>
  • searrow : <m>searrow</m>

Sets:

  • bbR : <m>bbR</m>
  • bbN : <m>bbN</m>
  • bbZ : <m>bbZ</m>
  • bbC : <m>bbC</m>

Roots and Limits:

  • sqrt{a} : <m>sqrt{a}</m>
  • root{n}{a} : <m>root{n}{a}</m>
  • lim{a}{x} : <m>lim{a}{x}</m>

Big Operators:

  • int{a}{b}{x} : <m>int{a}{b}{x}</m>
  • doubleint{a}{b}{x} : <m>doubleint{a}{b}{x}</m>
  • tripleint{a}{b}{x} : <m>tripleint{a}{b}{x}</m>
  • oint{a}{b}{x} : <m>oint{a}{b}{x}</m>
  • sum{a}{b}{x} : <m>sum{a}{b}{x}</m>
  • prod{a}{b}{x} : <m>prod{a}{b}{x}</m>
  • bigcup{a}{b}{x} : <m>bigcup{a}{b}{x}</m>
  • bigcap{a}{b}{x} : <m>bigcap{a}{b}{x}</m>

Delimiters:

  • delim{[}{x}{]} : <m>delim{[}{x}{]}</m>
  • delim{]}{x}{]} : <m>delim{]}{x}{]}</m>
  • delim{[}{x}{[} : <m>delim{[}{x}{[}</m>
  • delim{]}{x}{[} : <m>delim{]}{x}{[}</m>
  • delim{lbrace}{x}{rbrace} : <m>delim{lbrace}{x}{rbrace}</m>
  • delim{|}{x}{|} : <m>delim{|}{x}{|}</m>
  • delim{vert}{x}{vert} : <m>delim{vert}{x}{vert}</m>

Matrix:

  • Syntax : matrix{num of lines}{num of columns}{first_element … last_element}
  • matrix{2}{3}{a b c d e f g} : <m>matrix{2}{3}{a b c d e f g}</m>

Tabular:

  • Syntax : tabular{lines description}{columns description}{first_element … last_element}
  • lines : sequence of 1 (draw the horizontal line) or 0 (don't draw the horizontal line) - the length of the sequence=num of lines+1
  • columns : sequence of 1 (draw the vertical line) or 0 (don't draw the vertical line) - the length of the sequence=num of columns+1
  • tabular{111}{1111}{a b c d e f g} : <m>tabular{111}{1111}{a b c d e f g}</m>
  • tabular{1001}{101}{1 2 3 4 5 6} : <m>tabular{1001}{101}{1 2 3 4 5 6}</m>

Constructions:

  • vec{express} : <m>vec{express}</m>
  • {express}under{foo} : <m>{express}under{foo}</m>
  • {express}over{foo} : <m>{express}over{foo}</m>
  • overline{express} : <m>overline{express}</m>
  • underline{express} : <m>underline{express}</m>
  • hat{express} : <m>hat{express}</m>

Demo

<m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m> 

<m>S(f)(t)=a_{0}+sum{n=1}{+infty}{a_{n} cos(n omega t)+b_{n} sin(n omega t)}</m>

<m 8>delim{lbrace}{matrix{3}{1}{{3x-5y+z=0} {sqrt{2}x-7y+8z=0} {x-8y+9z=0}}}{ }</m>

<m 8>delim{lbrace}{matrix{3}{1}3x-5y_z_0_sqrt_2_x-7y_8z_0_x-8y_9z_0}{ }</m>

<m 32>delim{|}{{1/N} sum{n=1}{N}{gamma(u_n)} - 1/{2 pi} int{0}{2 pi}{gamma(t) dt}}{|} <= epsilon/3</m>

<m 32>delim{|}1_n_sum_n_1_n_gamma_u_n_-_1_2_pi_int_0_2_pi_gamma_t_dt{|} ⇐ epsilon/3</m>

wiki/plugins/math.txt · Last modified: 2007/08/14 15:52 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki