Apache OpenOffice (AOO) Bugzilla – Issue 104337
Formula elements displayed differently in metafile then in edit mode
Last modified: 2013-08-07 14:54:29 UTC
Hello. I've found a defect in the way Formulas are displayed whenever you insert them as objects into any kind of ODF Document (Drawing, Text Document, Presentation, etc...). As long as the Formula object is open in Edit mode, it is perfectly rendered, just like it normally appears by using the Math application. But every time you close the Edit mode, so that to come back to the main document, the Formula object gets distorted and loses the proper shape it has in Edit mode instead. This deformation is noticeable especially where font dimensions are small (i.e. , for example, in subscripts and superscripts) and it grows more marked if you choose to reduce font dimension with the Math command “ size * ”. Altogether the spacings between characters (including fences and brackets) get narrower or larger; moreover, some special symbols are often displayed in a improper manner. Such strange behaviour lasts even if you save and reopen the file containing Formula object, and even if you print or export it as PDF; making these operations could usually diversify the type and the extent of distortion but doesn't eliminate it. In order to demonstrate the deformation that occurs when switching from the Edit window towards the main document, I created an ODF Text Document (version: 3.1.0) in which I've only placed an example of Math equation. I will append several attachments with regard to this.
Created attachment 64254 [details] The Text Document (.odt) with a Formula object inside.
Created attachment 64255 [details] This first screenshot shows that, in Edit mode, all the spacings and symbols are exact, homogeneous and shapely.
The next screenshot will show how the same equation is displayed by the main application (Writer) after closing Edit mode. You can see that the roots are badly represented at their upper left corner: this appears broken as for square root, while there's a sort of cross as for cube root. Besides, both horizontal and vertical placements of symbols are messed up.
Created attachment 64256 [details] -
The next attachment is a simple animated GIF in which I have collected (after cutting them out) the two previous screenshots, in order to highlight the differences in shape.
Created attachment 64257 [details] -
Can confirm this, good to see with the attached sample. The root symbols have small gaps at their left top.
I can confirm this issue and may add that zooming in on the formula-object does not change the spacing. The issue was most evident with roots and it seems that the spacing between the upper line and the left-hand part depends on the size of theo ojects or the number of lines under the root (ie a single character shows different spacing than a fraction).
When the object is active Math itself is drawing the formula. If the object gets deactivated only a preview image is shown that was generated from what Math rendered. TL->SJ: Can you please have a look? I don't know if this is an issue with the metafile or if it even can be expected that the preview image should look absolutely identical.
Also it might be a problem here that Math renders it output with a zoom factor of 16 (I beleive) since otherwise (IIRC) e.g. the gap between some attributes and their text was to wide in the output window above. HDU: Any comments about this from your side?
Thanks to everybody. Finally, I'm going to add another attachment, that is the PDF document created, from the ODT file, precisely through the program Writer. As you can see, the deformation doesn't go away and is clearly visible by increasing the zoom. Besides the problem of the roots, for example, the variable "z" placed inside the expression "sin(xyz)" is wrongly too close to the right round parenthesis.
Created attachment 64340 [details] -