if (!defined('PmWiki')) exit ();
/*
Integrating ASCIIMathML.js into PMWiki
Copyright by Peter Jipsen 2007.
Based on the jsMath cookbook by Ben Woodruff.
You may use this code as you want, and change it as much as you want.
The ASCIIMathML package offers some benefits over ASCIIMathPHP, such as
being more up to date and easier to install.
The ASCIIMathML.js file is available from http://asciimathml.sourceforge.net or
http://math.chapman.edu/~jipsen/math/pub/ASCIIMathML/ASCIIMathML.js
For more information see http://www.chapman.edu/~jipsen/asciimath.html
In order to use this recipe:
1. Download the ASCIIMathML.js file e.g. into your PmWiki's
pub/ directory, as pub/ASCIIMathML.js. Or, you can save it
wherever you wish, and set $ASCIIMathMLUrl to the url of the
directory that contains the file.
2. Add the following line to a local customization file:
include_once('cookbook/ASCIIMathML.php');
That's it!
- The math graphic for the GUI toolbar is available at
http://www.pmichaud.com/pmwiki/pub/guiedit/math.gif .
*/
SDV($RecipeInfo['Cookbook.ASCIIMathML']['Version'], '20070913');
// $ASCIIMathMLUrl contains the url to the directory on the server.
// Defaults to pub/ASCIIMathML.
SDV($ASCIIMathMLUrl, "$PubDirUrl/ASCIIMathML");
//SDV($ASCIIMathMLUrl, "http://mathcs.chapman.edu/~jipsen/mathml");
$HTMLHeaderFmt['ASCIIMathML'] = '
';
SDV($GUIButtons['ASCIIsvg'],array(1000, '\\\begin{graph} ', ' \\\end{graph}', 'width=300; height=200; xmin=-6.3; xmax=6.3; xscl=1; plot(sin(x));',
'$ASCIIMathMLUrl/graph.gif"$[ASCIIsvg-graph]"'));
SDV($GUIButtons['ASCIImath'],array(1000, '`', '`', 'sqrtn',
'$GUIButtonDirUrlFmt/math.gif"$[Math formula (ASCIIMath)]"'));