This library contains functions for rendering and computing mathematical expressions. 関連リンク: Extension Overview, DekiScript Overview, Extension Demos.
Assembly: mindtouch.deki.services
SID: http://services.mindtouch.com/deki/draft/2007/06/math
Configuration:
| Config Key | Description |
| latex-path | Path to latex application |
| dvips-path | Path to dvips application |
| imagemagick-path | Path to convert application |
Microsoft Windows Setup
Install the following applications before using the Math service under Microsoft Windows XP and Windows Server 2003.
- Install MiKTeX
- Install ImageMagick
- Install Ghostscript
- Set 'latex-path' to point to latex.exe installed by MiKTex (e.g. C:\Program Files\MiKTeX 2.5\miktex\bin\latex.exe)
- Set 'dvips-path' to ponit to dvips.exe installed by MiKTex (e.g. C:\Program Files\MiKTeX 2.5\miktex\bin\dvips.exe)
- Set 'imagemagick-path' to convert.exe installed by ImageMagick (e.g. C:\Program Files\ImageMagick\convert.exe)
Debian Setup
Install the following before using the Math service under Debian Linux
- Execute:
apt-get install tetex-extra gs-gpl imagemagick
- Set 'latex-path' to /usr/bin/latex
- Set 'dvips-path' to /usr/bin/dvips
- Set 'imagemagick-path' to /usr/bin/convert
Functions:
- math.formula
- math.sheet
math.formula(formula : str) : uri
Render math formula.
Parameters:
| Name | Type | Description |
formula
| str
| Formula in Latex-AMS notation |
Remarks: Refer here for a math guide for Latex.
Samples:
| Output |
| To embed a simple equation: {{ math.formula("\\alpha^2+\\beta^2*\\gamma^3=1") }} | |  |
| To embed a more complicated equation: {{ math.formula("\\Re{z} =\\frac{n\\pi \\dfrac{\\theta +\\psi}{2} } {\\left(\\dfrac{\\theta +\\psi}{2}\\right)^2 + \\left( \\dfrac{1}{2} \\log \\left\\lvert\\dfrac{B}{A}\\right\\rvert\\right)^2}") }} | |
 |
math.sheet(sheet : uri, width : num, height : num) : xml
Embed an InstaCalc sheet.
Parameters:
| Name | Type | Description |
sheet
| uri
| URI to InstaCalc sheet. |
width
| num
| Optional. Width of sheet (default: 425) |
height
| num
| Optional. Height of sheet (default: 300) |
Remarks: Refer here for more information on InstaCalc.
Samples:
| Output |
| To embed an InstaCalc sheet: {{ math.sheet("http://instacalc.com/?d=&c=MTAwICogNTB8MioyICsgMy80fHxzYWxlcyA9IDMwMCBtaWxsaW9uICsgMTAlfDEwIGluY2hlcyB0byBjbXwxNTAgbGJzIGluIGtnfDUgTUIvc2VjIGluIEdCL2hvdXI&s=sssssss&v=0.9") }} | |
|