wiki:EquationEditor/Blog
Last modified 13 months ago Last modified on 04/18/11 09:15:14

2011-04-18 Initial thoughts on the Equation Editor project

by Markus

Dear Calixte and Simon,

let me introduce the two of you as we will be working together as part of the Equation Editor project in GSoC 2011:

  • Calixte is the developer of JLaTeXMath, a very nice equation rendering library that we are using in GeoGebra since a while now to display 2D equations (fractions, square roots, exponents, etc.).
  • Simon is a student at my university in Linz who has been working with me since several months on the GeoGebraCAS project. He is in my programming team with Philipp Birklbauer (implicit curves) and Thomas Unterhiner (mpreduce CAS) for GSoC here at my university.

The goal of the equation editor project is to get an easy to use WYSIWYG (what you see is what you get) equation editor for GeoGebra that will be used in (at least) two places:

  • in the input bar (or better all input fields of GeoGebra)
  • in the text dialog

Note that we do NOT want an editor where users can see LaTeX or MathML code. We really want WYSIWYG where these details are hidden from the user.

The editor should allow linear input like the current input bar (e.g. typing in of commands) but also 2D equations (fractions, roots, exponents, etc.). Probably a combination of the following two ways to do so would be ideal: (1) using buttons for fractions, roots, etc. A good example is the Google Docs equation editor: https://docs.google.com, create a new text document, menu Insert, Equation. Another example is TutorMates. (2) by reacting to special operators like ^ or / to create exponents or fractions, respectively. Please enter some equations in http://url3.tk/graph.tk/ to see what I mean.

Ad technical details: In my opinion, we should try to use (or at least base our work on) an existing equation editor and not develop our own from scratch to get something decent working quickly. I have played with DragMath and think that it didn't really find it's dragging idea intuitiv and prefer buttons like other standard editors. Part of the project is to play with existing editors and find a solution that will

  • quickly get us a working equation editor and is
  • maintainable, i.e. build on an existing equation editor with strong backing from its developers

For this reason, Simon should have a close look at TutorMates because this is a commercial project (selling curriculum materials in Spain) built on open source software (Maxima, GeoGebra, etc.) which needs to take care of their equation editor in order to be able to sell their product. I know the people from TutorMates, they are nice and they have promised me to develop a Swing version of their SWT editor. "Ignacio Celaya" <ignacio.celaya@…> has developed their SWT editor and now found a solution to automatically convert it to Swing, he will also help us if we have questions or suggestions. So, TutorMates might be a good fit because we can be sure that they will continue to develop it. A possible disadvantage could be that we may not be able to use this editor in our applets as the file size might be too big. However, we are moving away from Java applets towards HTML5 applets anyway, so for applets we will probably need to be using another HTML5 equation editor anyway. This is also something, Simon could be looking into.

Ad role of JLaTeXmath: no matter which editor we choose to use, we will probably still base our rendering of equations on JLaTeXmath. So, for example we could use TutorMates for editing equations and JLaTeXmath for rendering them. It is also possible that we might find a solution to turn JLaTeXmath into a WYSIWYG editor (possibly based on the TutorMates editor). Many things are possibly, but we need one that can be achieved quickly and with maximum sustainability.

In any case we will need format conversions between the different pieces. GeoGebra can already output its expressions as LaTeX. With an editor (e.g. TutorMates) we will probably need MathML output (should be easy to add) but also be able to read MathML back into GeoGebra. In the case of TutorMates, they already have a (partly) solution. @Simon: Ignacio knows all about the details and will help us.

Alright, enough for now. GSoC will start officially after April 25, from that time on Simon will start to investigate our options (in Java and HTML5). All ideas are very welcome.

Best wishes, Markus