[ooo-build] Equation editor improvements for GSoC

Jonas Finnemann Jensen jopsen at gmail.com
Fri Apr 2 04:59:47 PDT 2010

Yo! Hackers of ooo-build!
 - That's how your application template says this mail should start :)

I'd like to improve StarMath as a GSoC project. Having been annoyed
with the equation editing interface for years, I figured I'd draft
proposal for a WYSIWYG interface like MathType, LyX, kformula and
similar equation editors...
If people have emotional attachments to the old text interface, I see
no problem having it available too... :)

Anyway, I would like to hear what you think of the proposal and if
anybody would mentor it... Note, this is just draft, I'll post the
finished proposal on socghop.appspot.com

Project description:
Currently equations are edited using a text based interface. It's
possible to click on the equation and move the text cursor. However,
the visual cursor, visual cursor movement and input relies completely
upon the text based interface. This means that the visual cursor is
unreliable and almost useless. It also means that the visual cursor
cannot make a selection or be expected to move when you push the arrow
The solution is to make the visual cursor independent of the text
interface, accept keyinput and act according to this input. The goal
is to get an editing interface as is known from MathType and the

An easy to use visual interface for editing equations featuring:
 * An visual cursor represented by a blinking line that move correctly
 * Selections with support for copy, cut, paste and delete
 * Character and digit insertion by keyboard input with immediate

Nice to have:
 * New easier and prettier way to browser special symbols
 * Missing symbols...
 * Fixes for other issues in the StarMath, such misalignment...

Implementation strategy:
Having looked at the source, this is a brief outline of how I imagine
the goal could be accomplished.
    * Make SmGraphicWindow grab focus and disable cursor
synchronization with SmEditWindow
    * Methods on SmNode and subclasses to support visual movement
        - MoveIntoFromLeft
        - MoveIntoFromRight
        - MoveLeftOfChild
        ... Or whatever turns out to be necessary
    * Make it possible for the cursor to be within the characters of a node...
        - New cursor representation...
    * Handle keyinput on SmGraphicWindow
        - Move the visual cursor
        - Delete nodes
        - Select nodes for copy, cut, insert and delete
        - Insert characters, digits, brackets, parenthesis etc...
    * Draw a prettier cursor, e.g. a blinking line

My qualifications:
I'm a fourth semester CS student at Aalborg Universitet in Denmark. I
have reasonable C++ skills. I wrote a cross-platform distributed ray
tracer in C++ as semester project last year and is currently doing a
compiler project in C++ (So I'm also familiar with parsing). I've also
played with Qt/C++, wrote a OneNote inspired note-taking application
last summer, haven't released it...yet... This Christmas I spend the
holidays writing an equation editor for it, never finished, but got
the basics working: cursor movement, selection, deletion and
I also completed GSoC last year, writing a twitter client with PyQt
for WinLibre...
I'm Linux user since 05 or something... and have used OOO for quite a
few years... Before I became a LaTeX user... :)
Apart from C++, I'm also fairly skilled in python, various web
languages, C and C#... And have done desktop development using Qt,
pyGtk/Gtk#, Windows.Forms and a little Cocoa#... My most successful
project so far is TheLastRipper (currently unmaintained), an audio
stream recorder for Last.fm, latest version have been downloaded more
than 100k times across all platforms...
If you want to know more about me ask me... or checkout my blog

Ps. I have completed the exercise... My solution is a really ugly
hack... As a prober solution would be an simple XML change... Anyway
the nasty hack is here:
Have also figured out how to build and debug, though I have to admit
that I used a graphical debugger (beaverdbg)...

By the way having looked at the code for StarMath and bit of VCL
headers, I'm left wondering is there a policy against comments ? :)

Anyway, would like to know what you think of my proposal... Is it too
small or big? Would be better if focused on fixing misalignment and
then took care of the editing interface if I had time for it ?
Also, if you'd like it, I'll do some mock-ups before final submission...

Regards Jonas Finnemann Jensen.

More information about the ooo-build mailing list