Hi,
I'm working on a project for school and I'm trying to using a Javascript
package called jsMath (http://www.math.union.edu/~dpvc/jsMath/) to parse
LaTeX tags within my Pyjamas application. Unfortunately, I have seen the
warnings to use at little pure javascript stuff as possible but I don't
know of any other solutions. That said I'm trying import jsMath in a way I
can use two functions called jsMath.process() and
jsMath.processBeforeShowing() so that I can grab text via RPC update the
page and then have jsMath parse the new contents.
Typically all you do to get just math working is include the line
<SCRIPT SRC="*path-to-jsMath*/easy/load.js"></SCRIPT>
and it goes off and does its thing.
I seen the examples of loading simple external javascript files using
import so I tried
import jsMath.easy.load.js
and then tried to use my functions with JS
JS(""" jsMath.processBeforeShowing(); """)
but all I'm getting is "jsMath is not defined." I assumed part of this was
because they weren't in the same directory so I tried moving them to the
same directory and correcting to "import load.js" with the same results.
I also looked at jsimport() and tried that method (which seems to be
deprecated?) and had no success either.
Am I doing something simple wrong?
Does this even seem possible or is jsMath just to large of a JS package to
work correctly with Pyjamas?
Thanks,
Matt