jsmath plugin by Stephen Gould
Plugin for displaying LaTeX equations using jsMath or MathJax
Last updated on 2010-03-15. Provides Syntax.
Compatible with DokuWiki 2009-02-14.
Similar to asciimath, asciimathml, format, latex, math, math2, svgedit.
For convenience, the plugin is available in two different archive formats.
| Download | plugin-jsmath.tar | plugin-jsmath.zip |
|---|
To setup your DokuWiki for displaying LaTeX, you need to upload some files to your webspace and install the jsmath plugin.
The jsmath plugin for DokuWiki does not render the LaTeX-code itself. Instead it uses a JavaScript backend that renders the code in the client's browser. Two different JavaScript backends are currently supported:
You only need to install one of those libraries. If unsure, choose jsMath.
Follow the installation instructions. In short:
To get the cutting edge version of MathJax, checkout the most recent version from the developer's page. In short:
svn co https://mathjax.svn.sourceforge.net/svnroot/mathjax mathjax cd mathjax unzip fonts.zip
Now move the mathjax directory to your webspace. You can test your installation by going to URL/mathjax/test/
Note: When trying to display latex formulas for the first time, it may help to clear the browser cache. In Firefox, just press 'Ctrl-Shift-R'. Also try adding somewhere in your latex test page the following code to clear DokuWiki's cache:
~~NOCACHE~~
Once jsmath and a backend are correctly installed, you can embed LaTeX code into your wiki pages.
This will display an equation in block format, on its own line:
<jsmath>\lim_{n\to\infty}\sum_{i=1}^{n} \frac{1}{i}=\infty</jsmath>
Alternatively, the square bracket syntax is completely equivalent:
\[\lim_{n\to\infty}\sum_{i=1}^{n} \frac{1}{i}=\infty\]
The following example will cause jmath to display the formula inline:
<jsm>\lim_{n\to\infty}\sum_{i=1}^{n} \frac{1}{i}</jsm>
Alternatively, the dollar syntax is completely equivalent:
$\lim_{n\to\infty}\sum_{i=1}^{n} \frac{1}{i}$
If you want to contribute to this plugin, go to the project page of this plugin or contact Holger.
Please report your issues to the issue tracker.
Hi,
When asciisvg is installed, jsmath does not work anymore.
Any workaround? Thanks.
Answer: Please report details to the issue tracker. – Holger.
Hello, I recently switched to jsmath plugin (first I had an hack for that). I've noticed that in array environment the new line command (double backslash) is interpreted by DokuWiki and not by jsmath plugin, causing a new line in the source code rather than in the array environment.
Is there anybody else with the same issue?
Thank you, Emanuele
ANSWER: Hi Emanuele, I saw the same thing; if you escape your backslashes, it should work, a la: \\\\
Update: I forgot, also other DokuWiki commands are overwritten before the code is passed to jsmath plugin. In example, with this code
\sigma(c)
I get a copyright symbol in the formula.
I opened a bug ticket in the project page.