Visual formula editor

Jonas Finnemann Jensen jopsen at gmail.com
Tue May 21 03:08:48 PDT 2013


Hi,

As Miklos says, I'm not actively working on the starmath module anymore...
But feel free to CC me on any questions/problems you run into.
I'm still on the mailing-list but I don't manage to read
everything/anything, so CC me if you want to reach me.

Has there in fact been any discussion on how these things should feel
> like? Or is there any documentation about this?
>
I had some ideas about things I wanted to do:
http://cgit.freedesktop.org/libreoffice/core/tree/starmath/visual-editor-todo
But I'd imagine any improvements are welcome.

The experimental formula editor is quite complicated because the "abstract"
syntax tree it operates on is more concrete than abstract.
In order to observe how the formula object tree looks and is changed, you
might want to take a look at:
http://cgit.freedesktop.org/libreoffice/core/tree/starmath/workben/smath-dump-watch.sh


> Also, could someone give some pointers on where all this stuff is
> located in the code?

Key input is handled in
http://cgit.freedesktop.org/libreoffice/core/tree/starmath/source/view.cxx#n422
When handling key input an instance of SmCursor is used to modify the tree,
SmCursor is defined in:
http://cgit.freedesktop.org/libreoffice/core/tree/starmath/source/cursor.cxx

You can get an overview of how the visual formula editor works from my
presentation at OpenSuSE conference 2010:
http://jonasfj.dk/downloads/GSoC2010/slide-osc10.pdf

WARNING:
The visual formula editor is quite complicated, in fact over complicated.
As I said before this is a result of the abstract syntax tree not being
very abstract.
Ideally, I think the nodes that make up the formula object tree should be
refactored.
If you look at my slides you'll see that a line in the formula editor is
not a list of elements,
but a tree consisting of binary operator nodes. So when editing a line, it
is parsed into a LineList
which is a list of elements. Then the LineList is modified and a tree
consisting of binary operator nodes
is constructed from it.
This is quite horrible, ideally, a line should be a single node consisting
of a list of elements.
But refactoring this seemed quite scary to me at the time...


--
Regards Jonas Finnemann Jensen.


On Tue, May 21, 2013 at 11:00 AM, Miklos Vajna <vmiklos at suse.cz> wrote:

> On Fri, May 17, 2013 at 09:47:06PM +0400, Ruslan Kabatsayev <
> b7.10110111 at gmail.com> wrote:
> > Is visual formula editor still being worked on?
>
> Jonas created the visual formula editor feature -- and AFAIK he's not
> actively working on it these days. OTOH, hopefully he can get you
> started if you have specific questions. :-)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130521/f4d92000/attachment.html>


More information about the LibreOffice mailing list