[ooo-build] Equation editor improvements for GSoC

eric b eric.bachard at free.fr
Sat Apr 3 01:57:12 PDT 2010


Le 2 avr. 10 à 13:59, Jonas Finnemann Jensen a écrit :

> Yo! Hackers of ooo-build!

Hi,


Apologies for answering you lately, but I was away from keyboard (and  
home) most of the week.


>  - 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...
>

Ok.

Did you already finished the exercice ?

if so, please send me the diff as written below, else please read the  
archives : Fridrich and Cédric certainly proposed the link a lot of  
times ;)



> 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...


About who will mentor it, that's probably me. Now, to be honest, I  
must tell you that there are a lot of candidates (we'll try to select  
the best one for every application), and not that much of slots, so  
we cannot promise anything yet.

Nevertheless, thank you very much for the proposal, and continue to  
proof you are the one !


See the comments inline.


> Note, this is just draft, I'll post the
> finished proposal on socghop.appspot.com
>

Ok.


> 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
> keys...

Indeed, good remark.


> 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  
> likes...
>

Ok. FYI, the MathML export is one of the Writer Team todos.


> Deliverables:
> 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
> update/repaint
>

Ok

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

Currently, some symbols are missing (I got two in mind). So,  
implement one or several is really the same.


> 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


This must be investigated more, due to possible side effects of  
"grabing focus".



>     * Methods on SmNode and subclasses to support visual movement
>         - MoveIntoFromLeft
>         - MoveIntoFromRight
>         - MoveLeftOfChild
>         ... Or whatever turns out to be necessary


If I remember correctly, this visual movement already exists ? (but  
not as cursor, I agree)


>     * Make it possible for the cursor to be within the characters  
> of a node...


Ok I see the idea, but I wonder: when in editing mode, the cursor can  
go whereever already ? I can be wrong there, but I'm not sure this  
effort worth it.



>         - New cursor representation...


Looks interesting (but needs more investigations)


>     * 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
>


I don't see : equation alignement ? Did you already tried to reopen  
ancient documents ? There is an obvious bug, since 2001 (OMG .. :-/ )  
and who needs to be fixed urgently, before the (nice) proposals you  
did IMHO.



> 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
> insertions...


Thanks for the information. The code you'll dive in, is mostly C++,  
so, on the skill side, your profile looks ok.



> I also completed GSoC last year, writing a twitter client with PyQt  
> for WinLibre...


Great to see you already applied. Noticed.



> 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
> (http://jopsen.dk/blog/)...
>

Will do :)


>
> 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:
> http://jopsen.dk/downloads/go-oo_exercise.diff
> Have also figured out how to build and debug, though I have to admit
> that I used a graphical debugger (beaverdbg)...
>

Can you please send me the diff ?  (please speak us patch language  ;-)



> 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 ? :)

There is a coding guideline already with OOo (search in OOo wiki).

The common rule (to my knowledge/experience) is to comment the role  
of something important (not obvious) in the headers, and when the  
information is mandatory, or for a bugfix (add the issue number  
*helps* ) to add the important info in the implementation, but only  
when necessary.  Hope this helps.



> Anyway, would like to know what you think of my proposal... Is it  
> too small or big?


Looks acceptable.

Did you work with mathematics professors/teachers ?  To avoid useless  
changes, and since those professors are "prescriptors" for this  
feature, I strongly think we need their opinions for any Math  
improvement as starting point.


> Would be better if focused on fixing misalignment and then took  
> care of the editing interface if I had time for it ?
>

Yes, since this is the first request.


> Also, if you'd like it, I'll do some mock-ups before final  
> submission...
>

Please improve the proposal adding what you propose, in first place,  
for the equation misalignment.



Thanks in advance !

Eric Bachard

-- 
qɔᴉɹə




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ooo-build/attachments/20100403/e5d067f0/attachment-0001.html>


More information about the ooo-build mailing list