JSMath - a pure Javascript CSS solution for web math

JSMath - a pure Javascript CSS solution for web math

by Zbigniew Fiedorowicz -
Number of replies: 8
I have just learned of an attractive Javascript/CSS solution for displaying mathematics on the web. Here is the url: http://www.math.union.edu/~dpvc/jsMath/ The WeBWorK developers are planning to switch to using this system.

This would do away with the need for using a separate mimeTeX binary executable.  A possible drawback is that there are probably some incompatibilities between the dialects of TeX supported by the two systems. Thus switching to a JSMath based filter might break some existing course content.

Any thoughts, Martin, Gustav, Andreas?
Average of ratings: -
In reply to Zbigniew Fiedorowicz

Re: JSMath - a pure Javascript CSS solution for web math

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sweet-looking!   Certainly worth a trial run as an alternative, but I'm not feeling ready dump the mimetex solution just yet (it works so well!)

Have you tried a quick filter to convert $$$...$$$ format to these <div> tags?
In reply to Martin Dougiamas

Re: JSMath - a pure Javascript CSS solution for web math

by Zbigniew Fiedorowicz -
I have implemented the filter and it seems to work quite well with IE.  It doesn't work as well with Mozilla, where often parts of the characters in the formula are cut off.  Sometimes but not always, reloading the page fixes the problem.  (See Andreas' post.)  I haven't tried installing the TeX fonts as recommended.

I also needed to make some changes in the print_header() and print_footer() functions in weblib.php

In reply to Zbigniew Fiedorowicz

Re: JSMath - a pure Javascript CSS solution for web math

by Don Quixote -
Hi Zig,

this looks quite good.

Two concerns:
(1) Why are the formulas sometimes truncated at the bottom? (see example pages, for instance: http://www.math.union.edu/~dpvc/jsMath/examples/Henrici.html)
(2) Could it be a problem that users should better install new fonts?

Greetings
Andreas

PS:
But if we switch to it, I will work for the reference documents again wink
In reply to Don Quixote

Re: JSMath - a pure Javascript CSS solution for web math

by Don Quixote -
btw, I just noticed that this truncation problem seems to be related with scrolling down in my Netscape 7.1 browser... Forced refresh fixes it while scrolling again makes it reappear. Strange...
In reply to Zbigniew Fiedorowicz

Re: JSMath - a pure Javascript CSS solution for web math

by Mark Hughes -

Zig,
     There's a usefulness to your script that I too would hate to see lost -- turning an equation into a picture you're 100% guaranteed you'll get exactly the same thing out of the other end, and it works through email.  How about just adding this on with another set of tags for the time being to beta test it?

Mark

In reply to Zbigniew Fiedorowicz

Re: JSMath - a pure Javascript CSS solution for web math

by Nadja Kutz -
Hi all

i also got the impression that in order to see
everything properly one HAS TO install the fonts.mixed

nadja
In reply to Nadja Kutz

Re: JSMath - a pure Javascript CSS solution for web math

by Don Quixote -
I think basically it would also be possible to link dynamically to a font repository on the web. The user won't need to install them in this case.

Grüsse nach Berlin