Bug 163074 - sum and integral symbol size issue in formula
Summary: sum and integral symbol size issue in formula
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.6.7.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-21 08:41 UTC by john
Modified: 2025-07-28 14:14 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
image showing issue with summation symbols sizes. (20.64 KB, image/png)
2024-09-21 08:42 UTC, john
Details
OP formulas as OLE in Impress (271.76 KB, image/png)
2024-09-21 13:55 UTC, V Stuart Foote
Details
example file (31.27 KB, application/vnd.oasis.opendocument.presentation)
2024-09-22 02:34 UTC, john
Details
video showing the error occuring in LO 24.2.7.2 (Ubuntu 24.04) (1.81 MB, video/x-matroska)
2025-07-28 14:14 UTC, john
Details

Note You need to log in before you can comment on or make changes to this bug.
Description john 2024-09-21 08:41:42 UTC
Description:
In Impress, I have two formulae:

U_2 - U_1 = sum from i=1 to j n_i left[{bar u}_i(T_2) - {bar u}_i(T_1) right] 

and

H_2 - H_1 = sum from i=1 to j n_i left[{bar h}_i(T_2) - {bar h}_i(T_1) right]

And strangely, one of them renders with a correctly-sized 'sum' (Σ) and the other with a smaller one. I have observed this repeatedly across hundreds to equations entered, and I almost default now to just writing "size 18" before my integrals and sums. However this is a bad solution, and the real solution must be somewhere in the logic of the layout engine for formulas.


Steps to Reproduce:
This bug is a bit intermittent, but it will certainly crop up more than once in a session of editing work.
1. create equation 'H_2 - H_1 = sum from i=1 to j n_i left[{bar h}_i(T_2) - {bar h}_i(T_1) right]'
2. create equation 'U_2 - U_1 = sum from i=1 to j n_i left[{bar u}_i(T_2) - {bar u}_i(T_1) right]'
3. Do not change any settings relating to font sizes etc between the two formulas.

Actual Results:
See attached PNG file. Summation symbols are different in each case. 

Expected Results:
They should clearly be the same size. 


Reproducible: Sometimes


User Profile Reset: No

Additional Info:
Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.7-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 john 2024-09-21 08:42:25 UTC
Created attachment 196581 [details]
image showing issue with summation symbols sizes.
Comment 2 V Stuart Foote 2024-09-21 13:55:48 UTC
Created attachment 196587 [details]
OP formulas as OLE in Impress

Can't confirm, added the pair of formulas into a single OLE on an Impress slide. Also as individual OLE formula objects. I did add braces and newline for each.


Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d14e79bf7680db2180e40ba52fc3305a84c586f6
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 3 V Stuart Foote 2024-09-21 13:58:20 UTC
(In reply to V Stuart Foote from comment #2)
 s/add braces and newline/add _surrounding_ braces and a newline/
Comment 4 Regina Henschel 2024-09-21 14:27:55 UTC
To investigate, I need a file that shows the different size of the sum symbol.
Comment 5 V Stuart Foote 2024-09-21 15:18:14 UTC
@john, the needinfo to you for an example formula. Also, saving-as the Flat ODF presentation format can be helpful to review the styling and MathML of the OLE in a single XML text file.
Comment 6 Regina Henschel 2024-09-21 18:04:14 UTC
(In reply to V Stuart Foote from comment #5)
> @john, the needinfo to you for an example formula. Also, saving-as the Flat
> ODF presentation format can be helpful to review the styling and MathML of
> the OLE in a single XML text file.

The flat format does not contain the settings.xml of the Math OLE. Therefore a file in normal .odp format is needed in any case.
Comment 7 john 2024-09-22 02:34:54 UTC
Created attachment 196597 [details]
example file

I've attached a file with the problematic equations, having copy-pasted one slide from a much larger deck, then removing other content from the same slide.

There does seem to be something 'weird' about the 'U' equation -- attempting to edit it (eg add a space at the end) results in a wrongly-sized rendering, something wrong with the aspect ratio. But it no longer behaves exactly as it did when I was creating it.

The point is that I see these small summation signs and also small integration signs frequently during my editing, and I need to manually apply sizing to correct it.
Comment 8 V Stuart Foote 2024-09-22 11:27:44 UTC
Thanks for the test doc.

See a size issue in the formula, positions match but heights/scaling of the two OLE formulas differ.

But I couldn't visually spot difference in the XML.

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d14e79bf7680db2180e40ba52fc3305a84c586f6
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 9 Regina Henschel 2024-09-22 18:07:26 UTC
I don't know why the sigma character is rendered too small. A simple edit in the formula does not solve the problem. But when you alter the "Base size" in the font size dialog, the rendering is corrected.

There is no difference in the content.xml.

I don't know whether an item in the settings.xml might cause the problem.

@John: It would be good if you continued to observe the problem and added your observations here after some time. Note the origin of the formula for the cases where the sigma sign is too small.

Does changing "Base size" for and back acts as workaround for you too?
Comment 10 john 2024-10-06 00:33:53 UTC
Changing the base size does correct the rendering of the summation (capital sigma) sign as you suggested, Regina. However there is still something weird with my 'U' equation, since after correcting the summation sign, the aspect ratio of the rendered equation goes out of whack.
Comment 11 john 2024-10-09 11:30:24 UTC
I found a reproducible case for this error just now:

0. I have my default font size for equations in LO set to 20 pt, FYI. this is necessary for typesetting in Impress, else equations are silly small.
1. open a new empty Impress document.
2. create a new formula. I have a keyboard shortcut ctrl-alt-shift-Z set for that.
3. type the following erroneous equation: "sim from i=1 to j %mu_i dn_i = 0" and press escape.
4. double-click the equation, correct "sim" to "sum", and escape again.
5. the summation will render with an incorrectly small-size summation sign.
6. re-enter the equation and adjust the font size for the equation to 20 pt (ie set it back to its current value). this will force LO the correct the mis-rendering of the summation sign.
Comment 12 V Stuart Foote 2024-10-09 13:09:47 UTC
For me, on Win10 with recent master against 25.2 those STR do not produce the missized capital Sigma "Summation" symbol. On OLE edit to correct the "i" with "u" see the correctly size Sigma on the canvas "peeking through" the single line OLE frame, and on <Esc> to close OLE formula its frame on document canvas pops to the correct size for the full height of the sum.

Likewise with 24.8.2.1 release build 

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7198c5e49eff0b82cb423424eaed0ee94d66db7d
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 13 john 2024-10-13 11:13:15 UTC
Thanks for checking... I guess I'll have to try with 24.x or 25.x.
Comment 14 john 2025-07-28 06:10:11 UTC
I can confirm this bug in LO 24.2.7.2, following my instructions from 2024-10-09 11:30:24 UTC above. Running on Ubuntu 24.04.

Version: 24.2.7.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.7-0ubuntu0.24.04.4
Calc: threaded
Comment 15 Regina Henschel 2025-07-28 13:35:16 UTC
The formula has set a size on OLE level. To remove this, use "Original Size" from context menu. Then enter edit mode and exit it for to adapt the size to the content. Tested with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7f4868348c14b305fcd75744e1e3544d0d3a5d61
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 16 john 2025-07-28 14:01:51 UTC
It's not about the size of the formula as a whole. It's about the size of specifically the summation sign (the normally very big 'SIGMA' sign.
Comment 17 john 2025-07-28 14:11:10 UTC
I checked, choosing 'Original size' doesn't change the size of the summation sign. New minimal example:

1. new Impress doc
2. insert formula
3. enter 'sum from i=1 to j %mu_i dn_i = 0'
4. escape -- formula size is not correct, summation sign is too small
5. edit formula again, enter font size dialog and press enter (no changes)
6. escape -- formula is rendered correctly with large summation sign,.

It seems that when the default font size is changed (I have it set to 20 pt when I'm working in Impress), somehow the default size of 'sum' and other operators doesn't change. only when manually entering the 'font size' dialog in Formula editor does the sum sign size get recalculated correctly.
Comment 18 john 2025-07-28 14:14:02 UTC
Created attachment 202036 [details]
video showing the error occuring in LO 24.2.7.2 (Ubuntu 24.04)