Opened 12 years ago

Closed 12 years ago

#877 closed defect (fixed)

enhance the equation editor with AsciiMath

Reported by: baijianpeng@… Owned by: gocher
Priority: high Milestone: 2.0
Component: Plugin_Equation Version: trunk
Severity: major Keywords: AsciiMath, Equation Editor
Cc:

Description

There is one plugin for xinha called AsciiMath? :

http://math.chapman.edu/~jipsen/mathml/xinhaASCIImatheditor.html

But I did not see it in the Nighty download of Xinha. Why not include this one in Xinha ? I think the current Equation Editor in Xinha is too weak.

Thank you !

Attachments (2)

AsciiMath.zip (18.6 KB) - added by gocher 12 years ago.
here is the plugin
AsciiMath.2.zip (17.5 KB) - added by ray 12 years ago.
new plugin

Download all attachments as: .zip

Change History (15)

comment:1 Changed 12 years ago by mharrisonline

The plugin info says that the license is htmlarea, but the js file the author created and allows you to download is GPL, a very restrictive license for many people, unlike the HTMLArea license. Also, it looks like you are supposed to link back to the author's site if you actualy use the js file. I couldn't find a download for the plugin, could anyone else?

comment:2 Changed 12 years ago by mharrisonline

Your best bet is probably to email the author, jipsen@…, and simply ask him.

Changed 12 years ago by gocher

here is the plugin

comment:3 Changed 12 years ago by ray

I have written a new version of an AsciiMathML based formula editor, including Peter Jipsen's click-input table, but generally better IMHO :).

Please give me some feedback.

Shall I release it under the name of AsciiMath? or Equation (= replace the old Equation)?

Changed 12 years ago by ray

new plugin

comment:4 Changed 12 years ago by ray

Note: You have to update htmlarea.js and stylist.js for this to work

comment:5 Changed 12 years ago by ray

Note: Best used with Mozilla

comment:6 Changed 12 years ago by mharrisonline

It's a wonderful plugin, but here is the problem with distributing it with Xinha, as I see it. Xinha uses the HTMLArea license, which allows it to be distributed as part of a commercial application. In other words, anyone can download Xinha, drop it into their CMS software, and sell it. That would stop because of this plugin.

The creator of the file it uses, ASCIIMathML.js, chose to distribute it under the GPL license. Unlike the LGPL license, which unfortunately he did not choose instead, this means that it cannot be distributed inside a commercial application. And it means that the plugin, as I understand it, can not be distributed as part of Xinha, because of its more liberal license. I'm not a lawyer, but I'm pretty sure that this is correct.

So, I think that unless the creator of ASCIIMathML.js changes the license, or creates some exception for Xinha, it would have to become a plugin that has to be seperately downloaded and installed in Xinha. It's really a shame, it's a great plugin. I just think that you can't distribute a GPL script or plugin inside Xinha without violating the license. What do you think?

comment:7 Changed 12 years ago by mharrisonline

So, I think that unless the license changes to LGPL or whatever, it should not replace the current Equation editor, because some people won't be able to use the new plugin. It should have a different name. This is really a shame, because it is so much more powerful than the original Equation plugin.

comment:8 Changed 12 years ago by alexkir

Concerning licensing options, please look here:
http://xinha.gogo.co.nz/punbb/viewtopic.php?pid=4150#p4150

comment:9 Changed 12 years ago by mharrisonline

That's really great news!

comment:10 Changed 12 years ago by ray

I have committed this now under the name Equation.
Changed the license to LGPL according to permission by Peter Jipsen.

Please test and comment.

comment:11 Changed 12 years ago by mharrisonline

It works great, Ray! And the preview really makes it intuitive to use.

It might be nice if someone had the ability to make the equations appear in black, rather than red though.

It might be a good idea to make sure people know that you need the math player plugin from http://www.dessci.com/en/products/mathplayer/download.htm to see mathml in IE.

I wonder why I don't see the equations in IE in Xinha, while I do see them in Firefox. I see them fine in the preview, but not in the editor.

comment:12 Changed 12 years ago by ray

It might be nice if someone had the ability to make the equations appear in
black, rather than red though. 
HTMLArea.Config.prototype.Equation =
{
	"mathcolor" : "red",       // change it to "" (to inherit) or any other color
	"mathfontfamily" : "serif" // change to "" to inherit (works in IE) 
                               // or another family (e.g. "arial")
}

This is for Xinha, for the page you have to include ASCIIMathML.js like

  var mathcolor = "black"; // You may change the color the formulae are displayed (default: red)
  var mathfontfamily = "Arial"; //and the font (default: serif, which is good I think)
  <script type="text/javascript" src="/xinha/plugins/AsciiMath/ASCIIMathML.js"></script>

(Update ASCIIMathML.js first)

It might be a good idea to make sure people know that you need the math player
plugin from http://www.dessci.com/en/products/mathplayer/download.htm
to see mathml in IE.

Isn't this built in ASCIIMathML.js?

I wonder why I don't see the equations in IE in Xinha, while I 
do see them in Firefox. I see them fine in the preview, but not 
in the editor.

Yeah, I know that this is not optimal, but the handling was a pain in the ass in IE due to JavaScript having to be executed in the editor and other problems, so I boldly decided not to support showing in IE, sorry. Maybe somebody has ideas to make it possible?

comment:13 Changed 12 years ago by ray

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.