Issue 45689 - formulas with spaces are not parsed correctly
Summary: formulas with spaces are not parsed correctly
Status: ACCEPTED
Alias: None
Product: Math
Classification: Application
Component: ui (show other issues)
Version: 680m86
Hardware: All All
: P3 Trivial with 21 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 58198 58747 67296 70522 118166 126357 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-03-21 18:49 UTC by IngridvdM
Modified: 2015-06-08 16:11 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
wrong parsed formulas (62.41 KB, application/vnd.sun.xml.impress)
2005-03-21 18:51 UTC, IngridvdM
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description IngridvdM 2005-03-21 18:49:03 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.
Comment 1 IngridvdM 2005-03-21 18:51:31 UTC
Created attachment 24121 [details]
wrong parsed formulas
Comment 2 IngridvdM 2005-03-21 18:52:48 UTC
This Issue is a successor or part of  Issue 42089.
Comment 3 andreas.martens 2005-03-22 08:46:58 UTC
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.
Comment 4 thomas.lange 2005-03-22 15:54:51 UTC
.
Comment 5 andreas.martens 2005-05-25 09:13:33 UTC
Considering the effort, the priority, the risk and our resource planning I've to
retarget this issue to OOo Later.
Comment 6 Regina Henschel 2005-11-20 22:37:43 UTC
*** Issue 58198 has been marked as a duplicate of this issue. ***
Comment 7 jack.warchold 2005-12-02 13:59:10 UTC
*** Issue 58747 has been marked as a duplicate of this issue. ***
Comment 8 andyl 2005-12-15 10:29:55 UTC
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
Comment 9 Regina Henschel 2006-07-13 01:03:02 UTC
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).
Comment 10 Regina Henschel 2006-07-13 01:08:23 UTC
*** Issue 67296 has been marked as a duplicate of this issue. ***
Comment 11 lohmaier 2007-03-13 13:56:21 UTC
*** Issue 70522 has been marked as a duplicate of this issue. ***
Comment 12 eric.bachard 2008-02-03 12:59:30 UTC
interesting issue 
Comment 13 meywer 2009-11-04 22:23:08 UTC
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)


Comment 14 Regina Henschel 2011-06-12 17:17:40 UTC
*** Issue 118166 has been marked as a duplicate of this issue. ***
Comment 15 lapsap7+ooo 2011-06-12 17:50:09 UTC
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.
Comment 16 Regina Henschel 2015-06-08 15:45:30 UTC
*** Issue 126357 has been marked as a duplicate of this issue. ***
Comment 17 orcmid 2015-06-08 16:01:00 UTC
(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).
Comment 18 lapsap7+ooo 2015-06-08 16:11:07 UTC
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?