[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: GSOC: KFormula Shape
From:       Alfredo Beaumont <alfredo.beaumont () gmail ! com>
Date:       2009-03-26 19:27:58
Message-ID: 200903262027.58815.alfredo.beaumont () gmail ! com
[Download RAW message or body]

Overall i like the proposal, some quick thoughts:

Thursday 26 March 2009(e)an, Jeremias Epperlein(e)k idatzi zuen:
[...]
> Implementation Details:
> For the editing part, I will add the missing logic in FormulaCursor
> and KoFormulaTool
> as well as implement the missing methods in the classes, that
> represent the MathML
> elements. For inserting mathematical objects I will select useful
> MathML templates
> and add a possibility to insert them to the tool docker.
>
> Tentative Timeline:
> 2 weeks getting keyboard navigation working

The main issue with mathml navigation is that there're many elements are 
'extensible'. With text processing you usually just write text, which is 
itself a chain of characters. In math each character you write may be part of 
a chain or the beginning of the next. E.g: you write 'a', this is an 
identifier. Next you write 'b', you have the a two letter identifier: 'ab'.
But if you write '=' instead of 'b', then you have _one_ identifier and _one_ 
operator: 'a' '='

Now consider you have that chain as a numerator in a fraction (using tex 
syntax with intended spaces for clarification):

$\frac{a =}{}$

This means that the user may want to put the cursor (some cases are ignored, 
becase the problem would be the same):

1. After 'a', to complete the identifier. E.g:
$\frac{ab =}{}$
2. Before '=', to complete the operator. E.g:
$\frac{a <=}{}$
3. After '=', to complete the operator. E.g (doesn't make sense in this 
particular example, but you get the idea):
$\frac{a =<}{}$
3. After '=', to add a new kind of element, as another identifier. E.g.:
$\frac{a = b}{}$

To make all this a bit more complex, there's no rule that prohibits a user to 
make an identifier (or operator, or whatever) like 'a=', or whatever. So this 
a user may aswell _intend_ to write:

$\frac{a= != a}{}$
$\frac{a b= c}{}$
$\frac{a = <}{}$
$\frac{a= b}{}$
$\frac{a =b}{}$

This makes keyboard navigation design pretty complex.

Take a look at mathml spec talking about mrow, inferred mrows and token 
elements.

> 3 weeks add mouse interaction, drag&drop, selecting and moving elements

The same complexity appies here. Take for example:

$\frac{a b= c}{}$

The user may want to copy&paste:

1. Whole fraction
2. Numerator
3. 'a'
4. 'b='
5. 'c'
6. 'a b='
7. 'b= c'

But, should it be allowed to select, for example, 'a b'? If so, consider that 
you should copy one identifier and _part_ of an operator.

> 3 weeks investigate, how other math software designs the interface for
> inserting mathematical objects,
>        design and implementing the ToolWidget

Due to complexities i comment above, i think it'd be a good idea to take a 
look at how other people solve this from the beginning.

This would include, i guess, UI elements to allow matrix/tables creation, 
under/over elements and so on. It should also include ways to include 
operators, greek letters, etc. (including math unicode symbols).

> 3 weeks improve the loading of MathML, add Unit tests
> 1 week clean up the code, add missing documentation

There's already a bunch of unit tests, so it would be enough with passing them 
:). Anyway, i think that UI has enough work to do, and i'd consider a success 
having the previous points completed. This should be considered an extra :)

Cheers.
-- 
Alfredo Beaumont Sainz
http://www.alfredobeaumont.org/blog.cgi
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic