Apache OpenOffice (AOO) Bugzilla – Issue 45689
formulas with spaces are not parsed correctly
Last modified: 2015-06-08 16:11:07 UTC
Load the attached doc -> 2 errors occur while parsing the formulas: 1) In the first formula there is 'c' between '%varepsilon_0' and 'hbar'. In StarOffice7.0 the three variables were written as three variables at the same high. In src680m86 the c is written as small attachment next to the 0 of the epsioon. Inserting a space in front of the 'c' solves the problem, but this is only a workaround. 2) In the last formula there after the equal sign we have ' 1over '. In StarOffice 7.0 this leads to a fraction bar in src680m86 it does not. Instead there stands in words '1over' in the parsed formula. Inserting a space betwenn '1' and 'over' solves the problem, but this is again only a workaround. Formulas working in StarOffice7.0 should also be parsed correctly in the following versions.
Created attachment 24121 [details] wrong parsed formulas
This Issue is a successor or part of Issue 42089.
Mmh, of course the parser of OOo2.0 should parse correctly formulas from OOo1.0. But the question is: What is correct?? We did some changes in the parser some time ago and an side effect was that we do not split terms like "1over" automatically like before. The question is, is the behaviour of OOo1.0 correct or OOo2.0? The risk to change the parser just now is too high, so I retarget this issue to OOo2.0.1. But we have to think about the "correct" behaviour if we really want to fix this for OOo2.0.1.
.
Considering the effort, the priority, the risk and our resource planning I've to retarget this issue to OOo Later.
*** Issue 58198 has been marked as a duplicate of this issue. ***
*** Issue 58747 has been marked as a duplicate of this issue. ***
This seems to me to be a regression from OOo 1.1.x. With regard to the comments from ama about "what is correct", I agree that it is debatable whether "1over2" should be accepted as a fraction. However, consider the case of polynomials. In OOo 1.1.x, with an expression such as x^2+3x+5 (with the usual font settings: italic for variables, non-italic for numbers), both "x"s are rendered in italic (correctly). In OOo 2.0, with an expression such as x^2+3x+5, the first "x" is rendered in italic but the second is not. Suely this should not be regarded as the correct behaviour? It seems that the expression 3x is treated as a number rather than being recognised as a number followed by a variable. A workaround is to enter a space between the 3 and the x ie x^2+3 x+5, but (a) this is irritating to remember every time (b) it makes formulae harder to read in the formula editor
The new behavior, that you need a space, is inconsistently used. If you write 2x the x is not recognized as variable; you have to write 2 x. But if you write 2,1x the x is recognized as variable (in German with , as decimal separator).
*** Issue 67296 has been marked as a duplicate of this issue. ***
*** Issue 70522 has been marked as a duplicate of this issue. ***
interesting issue
Please add „italic“ to summary! (One finds this issue only by duplicates.) The comment from regina Thu Jul 13 00:03:02 +0000 2006 (and the one before from andy) holds until today. That's bad. Please make it consistent. in 5x x should be italic too (strange, that in 0,5x it already is)
*** Issue 118166 has been marked as a duplicate of this issue. ***
The title of this bug is quite misleading... The problem doesn't happen *with* spaces, but it does happen *WITHOUT* spaces. On the other hand, since Math markup is supposed to be read similar to English (whenever possible), personally, I would consider 1over2 not acceptable, and thus OOO behaves correctly not to render it. Consider: covert should it be read as covert or c over t? Of course, covert! So, for me, it's OK that there should be spaces before and after the keyword "over" to make sense.
*** Issue 126357 has been marked as a duplicate of this issue. ***
(In reply to lapsap7+ooo from comment #15) > On the other hand, since Math markup is supposed to be read similar to > English (whenever possible), personally, I would consider > 1over2 > not acceptable, and thus OOO behaves correctly not to render it. The problem is that StarMath was a home-brew approach based roughly on what was done for the TeX math expressions. I don't know about consistency of MathML. Coming back to how one handles such things as 2ab and coverb, there is an ambiguity when spaces needed to set of keywords are ignored and other cases where it looks like an intended space (as in "2 ab" versus "2ab"). My question: Does the AOO math editor allow techniques such as {2}{a}{b} and {c}over{b} as a way of making the separation of terms explicit and clear. Note that this is also important in distinguishing between {ab} and {a}{b} even though the results might be typographically indistinguishable. (The trick here is that {...} are used for syntactical grouping and do not introduce visible bracketings.) I would think this is necessary, in legible Math notation to have, for example, {a+b} over {factorial {n}} work (whatever the correct keywords are).
IMHO, 2ab is a different use-case than covert, because ab is not a special keyword while over is an existing keyword. Nevertheless, I admit that it's really a mess with this "home-brew" language/approach. On a side-note: {2}{a}{b} is rendered differently than 2ab there are additional spaces around 2, a and b. I mean, the "syntactical grouping" brackets { and } introduce additional visual spaces. Maybe this is the root of the problem?