]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/teximg.mdwn
docuent need for mhchem.sty
[ikiwiki.git] / doc / plugins / teximg.mdwn
1 [[template id=plugin name=teximg author="[[PatrickWinnertz]]"]]
2 [[tag type/chrome type/slow]]
3
4 This plugin renders LaTeX formulas into images.
5
6 Of course you will need LaTeX installed for this to work. The plugin
7 also uses mhchem.sty, which in Debian is in the texlive-science package and
8 may not be part of a regular texlive installation.
9
10 ## examples
11
12         \[[teximg code="\ce{[Cu(NH3)3]^{2+}}"]]
13         \[[teximg code="\frac{1}{2}"]]
14         \[[teximg code="E = - \frac{Z^2 \cdot  \mu \cdot e^4}{32\pi^2 \epsilon_0^2 \hbar^2 n^2}" ]]
15
16 To scale the image, use height=x:
17
18         \[[teximg code="\ce{[Cu(NH3)3]^{2+}}" height="17"]]
19         \[[teximg code="\ce{[Cu(NH3)3]^{2+}}" height="8"]]
20
21 If no height is choosen the default height 12 is used. Valid heights are: 8, 9,
22 10, 11, 12, 14, 17, 20. If another height is entered, the closest available
23 height is used.
24
25 To add an alt text to the image, use alt="text":
26
27         \[[teximg code="\frac{1}{2}" alt="1/2"]]
28
29 See [this site](http://www.der-winnie.de/opensource/gsoc2007) for rendered images.