Apache OpenOffice (AOO) Bugzilla – Issue 21484

Problems with missing operator arguments in formulas imported from MS Equations

Last modified: 2013-08-07 14:54:45 UTC

When converting from Ms Equation some formulas have * sign in the superscript. This sign is used often to distinguish values or for imaginary number. After converting Formulae editor understands as multiply sign thus formulae showed not correctly. The second thin that is closely connected with this bug that some times formulae begins from equal sign (=). After converting formulas are not shown correctly bisplaying what there are some problems with it. I think that they can be easely solved by changing <?> sign to {?} for the errors in formulas converting from Ms Equation.

Please attach a Word doc file which contains an appropriate formula for us to be able to reproduce your problem. Thanks

Created attachment 10608 [details] These are the formulas I use that are converted showing errors

Thanks. Which is the formula that shows the described problem? Please attach a file which contains this formula only. Background: We need OOo to import the formulas so that they can be edited by OOo Math Editor, which would then allow us to have a look at the translated source code. But sometimes - and in my case it is - , importing MathType formulas can be very very slow (which is known) so it would speed up the process considerably if you provide a doc with only one of the formulas in question. Thanks again.

Created attachment 10614 [details] Bug with superscript

Created attachment 10615 [details] Example of error with aboutsign

Created attachment 10616 [details] Example of error with systems

Created attachment 10617 [details] Example with everage value sign or state sign in quantum mechanics

Created attachment 10618 [details] Example of error with divide sign

Created attachment 10619 [details] Example with text in the formula

I've posted sample docs with formulas. All they are from my master degree work. So these thigns are usefull... Without these error fixed I won't persuade my bosses to shift to openoffice from MSOffice.

Thanks a lot, this is a nice collection of MathType fonts. I will have a look through them and will either open a new Issue for each or find a duplicate within the existing Issues. As for your persuading your bosses: > Tools > Options > Load/Save > MSOffice > disable both options in "...MathType...". The formulas will open without faults, but you wonÂ´t be able to edit them as long as you havenÂ´t MathType installed on your PC. (I had a look at your first formula in OOo without importing it, it looks fine.) And, you are always able to create fine looking formulas like these within OOo Math Formula Editor. The problem lies simply in loading the MathType formulas into OOo *and* being able to edit them. I hope this helps as a start.

Gora, from other Issues I gather that certain version of MathType formulas are presently not supported by OOo. Could you tell what version you used to create these formulas? Thanks!

I used Ms word 2000 with standart MS Equation Editor version 3.01 to create these formulas.

The problem is that many of Math operators/function know about the number of arguments they need (or at least want) ans insists on having them or otherwise the parser will produce an error (that head over tails question mark). This is a very old behaviour probably introduced with the very first version of Math. I wouldn't have implemented it that way myself but it happened to be that way and I'm never sure if this should be considered to be a feature (reminding the user ha has missed something) or a bug (making things to complicated). However there are two ways the import problem can be solved. a) The import has to be improved and provide the missing arguments by supplying empty arguments. E.g. the single * operator from the sample document has to be converted to {} * {} or even {{}*}{}}. This a tedious task to check for and won't make the formula text more human readable. b) We have to change the parser to allow for missing arguments. This would take some time since it is not just omitting some code but rather rewriting the parser. But it would be more the way other tools (e.g.like TeX) handle this. I'm not sure if an import for the old style needs to be done but currently I think not since the parser would be less restrictive. But that remains to be checked more closely once the parser is changed. I think we should go for the latter solution. That is the target will probably be OOo later since there are currently more urgent tasks in other areas at hand. TL->BH: To you for decision.

Some characters which in OOo are used as operators obviously need be treated as text, while being imported. Issue 15545, which is fixed already, dealt with a similar problem. I will rewrite the summary to have this Issue focused on the operator character -> text character problem, and will set to new. As to the other formula import problems, they need to be checked for duplicates, and probably being dealt with in new Issues.

Sorry for rewriting the summary again, but I had a more thorough look through the attached examples again. They are a good collection of examples to show the different aspects of how to deal with importing formulas with characters which can have different meanings in different contexts. Ambigous characters: superscript.doc: Here * is meant to be text, not a multiplication operator which would need arguments. average.doc: Here < is meant to be some sort of left bracket ("average value sign"), but not a "lower than" sign which would need arguments. Arguments left out deliberately: about.doc: Here approx is meant to be the approx relation where the left argument is missing. Wrong importing of operators: divide.doc: Here the divisor operator / is meant to be a divisor operator. It does have both arguments but OOo only recognises the right. Matrices messed up (probably not related to the former issues): system.doc and textin.doc: Both contain a matrix which have a left lbrace but not a closing right lbrace.

*** Issue 23459 has been marked as a duplicate of this issue. ***

*** Issue 27195 has been marked as a duplicate of this issue. ***

I have a very similar problem with 1.0.3 on OSX: all the symbolic signs (+, -, =, and more fancy stuff like square roots and integrals) don't display, although they seem to print ok.

Issue type and target set.

What was the reason of changing issue type from defect to enhancement? Comments whould be appreciated. And I wanted to know approximate time of this bug to be fixed. Because I don't want it to stay for several years as new. (Because my favourite "three year old new" bug in mozilla haven't been fixed yet)

.