Using Moodle > Mathematics Tools discussion

52 views
Skip to first unread message

furiop

unread,
Nov 8, 2009, 3:46:40 PM11/8/09
to ASCIIMath
Mauno Korpelainen in moodle forum is talking about a fork of
asciimathml that avoid plugin installation in IE for a great quantity
of formulas.

The address http://korpelainen.net/js/AM1.js

Do anybody know if it is completely compatible with previous
asciimathml files?

Furio


--- cut here ---
http://moodle.org/mod/forum/discuss.php?d=137375
Re: Summary of the Math rendering issue
di Mauno Korpelainen - domenica, 8 novembre 2009, 16:24
Gruppo Particularly helpful Moodlers

I suppose you have the original version of AsciiMathML by Peter Jipsen
from http://www1.chapman.edu/~jipsen/mathml/asciimath.html

David Lippman wrote the first image fallback versions some years ago
and if you want to test for example Google Chart API tex fallback -
try (download) http://korpelainen.net/js/AM1.js that should be able to
render most common tex tags for all browsers without any extra browser
plugins. I will check the code for Google chart api tex syntax during
the coming weeks, some input/output values are using mathtex syntax
because my original script was/is using mathtex fallback to Texlive.

No genaral solution yet but slow progress anyway...

In addition to Google Chart API tex it is possible to rewrite that
fallback input/output code for any public tex renderer like mathTran
or tex filter, David's fallback code was written for Mimetex. Google
chart api has also color support so it's one of the parts that I will
change/add later to google chart api version of asciimathml script.

Marc Grober

unread,
Nov 8, 2009, 6:24:57 PM11/8/09
to asci...@googlegroups.com
Actually, much of the recent excitement in moodle math forum has been
with respect to alternative fallback and use of jsxgraph.

As to former, while I demonstrated use of mathtran with david's
fallback script sometime ago, google's publication of the chart API
provided probably the most robust public fallback option yet, and
Mauno has been exploring this option.

As to the latter, note my xpost to this and the jsxgraph google group
of some weeks ago. There are three moodle math threads regarding what
we have been looking at: 1) an integrated package of display and
construction tools I have called SEE, 2) use of jsxgraph for display
and 3) use of geonext. Both 2 and 3 relate back to 1.

A major concern as far as the future of asciimath is preserving it's
ability to support any "legacy" materials. I have promoted a system
that would involve two tiers of tags: the first tier would have one
tag for signalling to the asciimath parser that the enclosed text is
to be parsed. Second tier would be a set of additional tags or tokens
associated with specific libraries or plugins, as in <amp>$\sqrt{9}$
agraph plotxxxx; endagraph<\amp> This would allo the use of any legacy
notation, as well as usage of new libraries/plugins, such as jsxgraph,
which itself by passes quite a few current limitations.

But to accomplish this I have argued for a restructuring of asciimath.
For example, there might be a browser sniffer module, a parser module
(read configuration, parse tokenized expressions into a 2 by n array
of display lib and text expression and then pop and pass array
elements, and of course the various libs.

The folk at Bayreuth have also worked on compression which results in
jsxgraph having a very small foot print. This work might be able to
benefit asciimath especially as SA and others extend it

Importantly, we are not talking about a "fork" so much as calling for
developers to assist in trying to open asciimath to some new and
exciting technology. Having encourage many instructors to use
asciimath2, I certainly want to ensure that asciimath moodle adopters
are not left in the dust somehow and there is no need for that. Mauno
has been exploring code tweaks to existing code though such a path
also creates incremental complexity

Current files are experimental. We have been playing with options in
google wave, mediawiki, moodle etc focusing on trying to provide some
uniformity and transparency in providing tools for teachers and
students to use to do graphing and math notation in everything from
web 2 apps to standalone files.

Btw, MK subscribes to this list, as do I. While Alfred and Matthias
from Bayreuth i think don't, jsxgraph does have a list of it's own.

Marc
> --
>
> You received this message because you are subscribed to the Google
> Groups "ASCIIMath" group.
> To post to this group, send email to asci...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/asciimath?hl=en
> .
>
>

mauno

unread,
Nov 8, 2009, 6:55:41 PM11/8/09
to ASCIIMath
Maybe it's best that I answer myself:

AM1.js is a modification of asciimathml part of my test version AM.js
that I used for renderering image fallback with Mathtex and TexLive. I
cleaned some code, took apart David's AsciiSVG plugin code to AS1.js
and am currently checking the input/output tables for Google Chart API
tex - in fact it's much closer to original mimetex than Tex Live and
about 1/3 of mathtex symbols will be taken away from Google chart api
latexmathml values.

There is one change that does matter:

var isIE = !(navigator.oscpu && document.getElementsByClassName);

gives fallback for all other browsers than Firefox - no matter if they
use MathPlayer or not. The reason for this is that 1) Output of
MathPlayer looks worse than good image fallback and 2) I had more
trouble than advantage of MathPlayer.

The work I have been doing with moodle is still unfinished but Marc
has helped in testing some new plugins (with most common Tex
renderers), we have been testing also JSXGraphs together with
asciimathml and additional fallback that can be used with Firefox if
some symbols can't be used with normal code of Asciimathml/LatexMathML

The whole package should give the capability to select which rendrerer
to use (Google Chart API tex, MathTran, Mimetex, ... Mathtex or
possibly Tex filter of moodle), editor plugins for adding asciimathml,
latexmathml, latex as code or images & asciisvg or Jsxgraphs and most
likely also a common math filter for adding maths and graphs without
editor plugins - at least in moodle 2.0 but probably in all previous
versions of moodle.

I am planning to use different input/output values (with php) for
different renderers in different scripts so the compatibility depends
on what scripts you are comparing. Google Chart api is mostly normal
mimetex syntax and we should have different code for traditional and
plugin style of AsciiSVG. AM1.js renders MathML for FF(3) and images
for other browsers, AS1.js renders plugin style asciisvg for FF,
Opera, Safari and Chrome & images with David's plugin for IE.

The AsciiSVG plugin is not totally standard "Lippman" plugin - I added
class ASplugin for future use and translation code to moodle version
and may modify it further. It is also possible that sometimes next
year if developers of Jsxgraph and GeoNext have time to check the code
it might be possible to replace GD fallback code with VML fallback for
IE (it would be better to get all images as vector graphics than pmg
images) but there is no hurry with this...

Mauno

On Nov 8, 10:46 pm, furiop <furio.petro...@gmail.com> wrote:
> Mauno Korpelainen in moodle forum is talking about a fork of
> asciimathml that avoid plugin installation in IE for a great quantity
> of formulas.
>
> The addresshttp://korpelainen.net/js/AM1.js
>
> Do anybody know if it is completely compatible with previous
> asciimathml files?
>
> Furio
>
> --- cut here ---http://moodle.org/mod/forum/discuss.php?d=137375
> Re: Summary of the Math rendering issue
> di Mauno Korpelainen - domenica, 8 novembre 2009, 16:24
> Gruppo Particularly helpful Moodlers
>
> I suppose you have the original version of AsciiMathML by Peter Jipsen
> fromhttp://www1.chapman.edu/~jipsen/mathml/asciimath.html
>
> David Lippman wrote the first image fallback versions some years ago
> and if you want to test for example Google Chart API tex fallback -
> try (download)http://korpelainen.net/js/AM1.jsthat should be able to

David Lippman

unread,
Nov 8, 2009, 9:34:05 PM11/8/09
to ASCIIMath
Cool to hear the things you guys are working on. I hadn't seen that
Google Charts thing before.. maybe I'll start distributing the plugins
and imathas with that as the default renderer :)

To throw a few totally disassociated thoughts in the mix from someone
very much NOT involved with the Moodle efforts:
- I liked it better when ASCIIMathML and ASCIIsvg were separate; I
think it made more sense. I do understand there are some benefits to
having them linked, but I preferred the modularity. If you didn't
like ASCIIsvg, toss it out and use something else in its place, like
this JSXGraph thing, which is really cool, though perhaps overkill for
95% of purposes :) I'm all for re-modularizing things and allowing
users to pick which pieces they want to use.

- While I think it'd be great to have a VML option for IE in place of
an SVG plugin or image fallback, I have to say having an option for
image fallback is handy since it can be cut-and-pasted. I know
faculty who use my graph plugins to create graphs they cut-and-paste
into their in-class tests.

- I disagree that Mathplayer looks worse than image-based fallback,
especially in a printed document. But plugins are annoying. On the
other side, FireFox 3 with the STIX fonts totally botched rendering of
radicals. Grr...

-David
> > try (download)http://korpelainen.net/js/AM1.jsthatshould be able to
Reply all
Reply to author
Forward
0 new messages