I've been using a version of jsMath and the jsMath plugin for dokuwiki for several months. Whoever, I discovered that it seemed to be implicated in errors when I tried to save new or edited pages. To debug this phenomenon, it seemed to me that it would be best to try a “vanilla” version of the plugin: if that doesn't cause the error, I can then incrementaly change and test to get back to what I was initially trying to accomplish. The features I was trying to incorporate were
I removed my version and installed the “vanilla” current release. It didn't start up!! I consulted the q&a of others experience with this issue. I've fiddled, and lost patience. I finally tried replacing its start-up script by the old-style one, and it worked. 1) There was no error message when I saved this page, either.
// full url to jsMath installation var jsMathURL = 'http://get-the.net/jsMath'; document.write('<SCRIPT>jsMath = {Controls: {cookie: {scale: 120}}}</SCRIPT>'); document.write('<SCRIPT SRC="' + jsMathURL + '/jsMath.js"></SCRIPT>'); function installJsMath() { jsMath.Process(document); } addInitEvent(installJsMath);
Following update of the plugin parameters via admin/config, local.php contains
$conf['plugin']['jsmath']['use_dollar'] = 0; $conf['plugin']['jsmath']['jsMath_url'] = 'http://get-the.net/jsMath';
This should be read by
then injected into the js command:
require('../../../conf/local.php'); $jsMathURL = $conf['plugin']['jsmath']['jsMath_url']; ?> document.write('<SCRIPT>jsMath = {Controls: {cookie: {scale: 120}}}</SCRIPT>'); document.write('<SCRIPT SRC="<?php echo($jsMathURL); ?>/jsMath.js"></SCRIPT>'); function installJsMath() { jsMath.Process(document); } addInitEvent(installJsMath);
For some reason, that doesn't seem to be completing as it should.
I've switch back to the “new procedure” – almost. I've skipped (commented out) the path lookup in install_js.php and added the line
var jsMathURL = 'http://get-the.net/jsMath';
So, install_js.php is now identical to the script.js that works, with some commented-out php at the top. And it still doesn't work. For some reason, the “call” from script.js to install_js.php is not working.
lib/exe/js.php?edit=0&write=0 contains:
document.write('<SCRIPT SRC="'+DOKU_BASE+'/lib/plugins/jsmath/install_js.php"></SCRIPT>');
which indicates it is calling the “right” file, but install_js.php seems to be empty when it arrives in the document (as JS).
Too bad. I don't have time to continue on this, at least not now: I need to get the “block” style working on my mark-up variant!
Today I made a clean, “vanilla” install of the latest version of dokuwiki and added the jsmath plugin. The only “difficulty” I had was that the plugin manager couldn't unpack it (a .tar on Windoze), I had to unpack it can copy to the right directory. But after that, I set the path using the config manager and it load immediately!. Very odd.
It is not a problem with the jsMath plugin. And I have no idea why it doesn't work on my hosted site.
Why would jsmath blocks contain code that needs substitution or formatting? That seems likely to break well-formed LaTeX that happens to resemble something some other wiki mark-up syntax “recognizes” (like newlines needed in arrays and eqarrays). I've edited out those type in syntax.php just now (28 Sep 2009) and will give it a try.