[Libreoffice] visual formula editor makes unwanted changes to command line

Jonas Finnemann Jensen jopsen at gmail.com
Thu Dec 30 08:25:49 PST 2010


This is a problem in the SmNodeToTextVisitor...
Have you tried latest version... Luke have been (and may still be)
working on this issue.
The problem is that the use of brackets in expressions is context dependent.
Notice the difference between binom { A } { B } C and { binom { A } {
B } } C, where A, B and C are expressions...

> (1) Short ^ and _ are exchanged with long rsup and rsub.
> (2)  A lot of additional braces and spaces are added.
> (3) The part "from ... to " is exchanged with csup and csub.
Definitely points to improve... The main concern at the moment is to
have a node to text visitor that preserves the resulting formula...
Luke have already removed a lot of brackets that wasn't necessary...
Leaving out whitespace is not a problem but how much whitespace do you
think is good... ?
Anyway, thanks for the suggestions... I'll add them to the easy hacks page...

--
Regards Jonas Finnemann Jensen.



On Thu, Dec 30, 2010 at 13:09, Regina Henschel <rb.henschel at t-online.de> wrote:
> Hi,
>
> next problem with the visual formula editor:
>
> Enter the formula
>
> SS_total = sum from i=1 to N {(y_i-overline X)^2}
>
> in command window. Exit editor.
> Double click formula to enter edit mode.
>
> In the visual part click left of the y and delete it and enter x.
> Watch the command line changing to
>
>  { { SS rsub total = sum csup N csub { i = 1 } { ( { { { x } rsub i -
> overline { X } } } ) rsup 2 } } }
>
> Problems:
> (1) Short ^ and _ are exchanged with long rsup and rsub. That is bad,
> because to distinguish "sub" and "sup" you have to look very exactly in
> contrast to _ and ^, and the formula becomes longer.
> (2)  A lot of additional braces and spaces are added. Bad, because the
> formula becomes longer and it is more difficult to find corresponding
> opening and closing brackets.
> (3) The part "from ... to " is exchanged with csup and csub. That is not
> acceptable, because it changes the meaning of the formula.
>
> Kind regards
> Regina
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>


More information about the LibreOffice mailing list