Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-07-21 20:54:30

jipsen
New member
Registered: 2005-07-21
Posts: 1

AsciiMath plugin for Xinha

First of all: Thanks for making Xinha such a fantastic HTML editor, and thanks also to all the people that have worked on its htmlarea predecessor.

I have adapted the CharacterMap plugin to be a plugin for ASCIIMathML so that Xinha can be used easily to create webpages with mathematical formulas on them (sorry, the Equation plugin isn't general enough, does not accept ASCIIMath and latex input and does not produce MathML).

Note: on IE viewing pages with MathML requires the MathPlayer plugin from http://www.dessci.com/en/products/mathplayer/ (on Firefox the page listed below should work directly).

Please have a look at http://math.chapman.edu/~jipsen/mathml/ … ample.html and let me know if there is interest in having some version of this plugin be part of Xinha.

ASCIIMathML.js is a JavaScript that I wrote to translate a simple ascii math formula language to MathML while a webpage loads (see asciimathml.sourceforge.net). With the AsciiMath plugin for Xinha it becomes easier for beginners to type the formulas (by clicking buttons) and it is possible to get a preview of the typeset formulas.

Obviously I am not an expert on JavaScript or Xinha architecture, so there are still a number of improvements that are possible:

-- Allowing the file to be saved with all ASCIIMathML formulas translated to MathML (this should be easy, although the Save dialog seems to work only in IE)

-- Allowing the typeset MathML formulas to be displayed in the iframe, but converting a formula back to ascii for further editing when the cursor is positioned over (or in) it (this is currently beyond me since I don't see how to read the cursor position in an iframe)

-- The plugin at the moment requires that htmlarea.js be modified (3 lines inserted at line 2521, and the header of the iframe was modified). The inserted code makes the preview possible, but it is probably not done in an optimal way. Can this plugin be made to achieve a similar effect without editing htmlarea.js? (Modified copy at http://math.chapman.edu/~jipsen/mathml/ … tmlarea.js )

-- I'm also interested to hear further suggestions that users might have.

Regards,
Peter

Offline

#2 2005-07-22 21:18:49

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: AsciiMath plugin for Xinha

If you would like this included in Xinha, please create a ticket and attach your plugin (zipped) to it, and include the changes that are necessary (don't post the whole file smile) to the htmlarea.js file and note the revision of htmlarea.js you made the changes against (you can find the revision in the top few lines of the file, or the About dialog in Xinha itself).

Somebody will review it as soon as we can.


James Sleeman

Offline

#3 2005-07-23 18:06:47

kram
Xinha Community Member
Registered: 2005-03-26
Posts: 21

Re: AsciiMath plugin for Xinha

Brilliant! Our users would love that - at least the maths & sciencey ones. Well done Peter. big_smile

Click on the 'New' option in the popup to begin.

Offline

#4 2005-07-23 23:58:48

mharrisonline
Xinha Administrator
From: Denver, Colorado
Registered: 2005-04-11
Posts: 110
Website

Re: AsciiMath plugin for Xinha

It's an incredible achievement!  If you submit this to Xinha, educators all over the world will use it.

Michael Harris
Jones International University

Offline

Board footer

Powered by FluxBB