Thoughts on LibreOffice Math
michael.meeks at suse.com
Thu Jul 4 04:17:17 PDT 2013
On Mon, 2013-06-24 at 08:17 +0200, Frédéric WANG wrote:
> My name is Frédéric Wang and as some you may have noticed, I've recently
> contributed some patches for the LibreOffice Formula Editor.
First - thanks so much for your contribution ! :-) it's great to have
someone working on and caring about math - it seems to me like you
should have commit access if you havn't already for that ( can you poke
me with your gerrit account name ;-)
> 1) Some people like the current Math semi-WYSIWYG interface and are
> familiar with the StarMath syntax. So this interface should be
> preserved anyway.
Which of course makes life hard :-) IMHO it's fine to switch to
something more standard; but of course for back-compatibility we need to
be able to import (and probably export) (perfectly) StarMath to and from
our new representation.
> 2) Some people would like a complete WYSIWYG editor.
Which is tantelisingly close - at least in the OLE/object mode - which
is (as Khaled says) an awful UI for editing formulae - but potentially
there are easier ways to solve that than hacking formula into both the
writer and editeng editing/layout engines :-) I suspect there are some
good ways to auto-create formulae instances, avoid disrupting the UI
when they're selected, and do some clever things with cursors to make it
easier to navigate them as part of a document (?).
> I didn't look at the rendering code, but
> Khaled Hosny mentioned on bug 32362 that it would have to be rewritten
> from scratch and I suspect one issue is the StarMath internal tree.
I'm always rather nervous of from-scratch re-writes :-) having said
that starmath is only 20k LOC, and ~1Mb of binary, so - assuming that we
could share at least some UI elements, then writing an different math
core and having that in parallel would be one option that is well worth
Having said that - I'd love to see the final small pieces (IIRC. mostly
undo/redo which is quite asy) for interactive editing sorted out before
doing a deprecate/replace. The skills gained pulling the interactive
formula editing out of experimental work will be useful learning for the
There were a number of technology suggestions in the thread too: "just
re-use GtkMathView" - that seem to bring significant licensing and
dependency issues. In general, that seems deeply problematic to me.
Of course, if we can re-use some code from Firefox for a new formula
editor (I assume they only render not edit) then that would be really
ideal - though, naturally there would need to be some degree of
abstracting of rendering etc. That's something I'd love to see. Editing
is often quite unpleasant to achieve ;-)
Thoughts on that much appreciated :-) how re-usable is the firefox code
- is it a tightly coupled, vast chunk of beast tied to dozens of
megabytes / mega-lines of existing firefox infrastructure ? or is it
something smallish and re-usable ? :-)
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice