Download it now!
Bug 103866 - Formula Vertical Alignment issue
Summary: Formula Vertical Alignment issue
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
Reported: 2016-11-11 14:45 UTC by Ben
Modified: 2019-10-07 03:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Misaligned formulas (3.39 KB, image/png)
2016-11-11 14:46 UTC, Ben
Alignment (1.26 KB, image/png)
2016-11-12 14:20 UTC, Ben
odt document with mis-alignment issues (80.77 KB, application/xml)
2017-06-19 22:27 UTC, Ben
PDF document with mis-alignment issues (106.47 KB, application/pdf)
2017-06-19 22:28 UTC, Ben
Vertical mis-alignment in table (1.25 KB, image/png)
2017-07-03 16:20 UTC, Ben
Misalignment in table (1.25 KB, image/png)
2017-07-03 16:26 UTC, Ben
Formula aligment in footnote (4.78 KB, image/png)
2017-07-07 20:44 UTC, Ben

Note You need to log in before you can comment on or make changes to this bug.
Description Ben 2016-11-11 14:45:33 UTC
Whenever an inline formula is created, it often does not vertically center with the inline text. Even if even an equal number of subscripts and superscripts are used this often does not completely vertically center the formula relative the surrounding regular text. Manual centering using Alt-up/down key is possible but this is very time-consuming and the results are often not good to get professionally looking results. This issue has been present for many years and has caused much extra editing work of large documents. Other editors like MS Word and LATEX don't have this issue.

Steps to Reproduce:
1. In Writer editor, create text
2. Create a math formula behind it
3. Formula may or may not be vertically aligned with the text (behavior seems random)

Actual Results:  
See attachment

Expected Results:
Formulas that look like the surrounding text in terms of formatting

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.35 Safari/537.36
Comment 1 Ben 2016-11-11 14:46:28 UTC
Created attachment 128662 [details]
Misaligned formulas
Comment 2 A (Andy) 2016-11-12 07:24:35 UTC
Reproducible with LO (Win 8.1).  The characters in the math formula (with the same font settings) seem to be about 1 or 1/2 (unfortunately I can not measure it because it is quite small) milimeter lower than the normal text.  Even if it is a small difference you can recognise it with your eyes (see also the attachment).

But I also have the feeling that the rendering of the characters is a little bit different.  If I have the text and the formula in italics then text seems to be more italicised (more slanting) that the formula (take the same character and font settings to test it).
Comment 3 Ben 2016-11-12 14:20:20 UTC

I agree with your observation the rendering of character is a bit different sometimes. I will try to provide more examples.

On my original alignment item; see attachment:
- The first and last P sub 0 are text
- The second one is P sub 0 and is not properly aligned
- The third one is P sub 0 sup 0 and seems to be properly aligned but I have seen cases where this is not so
Comment 4 Ben 2016-11-12 14:20:50 UTC
Created attachment 128693 [details]
Comment 5 Ben 2017-05-17 22:56:40 UTC
Issue still occurs in Version: (x64)
Comment 6 Ben 2017-06-10 21:29:59 UTC
Any idea when the vertical alignment issue of formulas will be resolved? I have a very large document with hundreds of formulas with this issue and am getting close to a publication deadline.
Comment 7 Ben 2017-06-19 22:26:07 UTC
Version: (x64)

More issues identified in the attached document. It also ripples over into the PDF document (also attached) where you can see the alignment issues even better.

I also created formulas in a completely new document with the same effect.

In the latest development version, when clicking on some formulas, the mis-alignment issue seemed to be reduced a bit.

I hope this issue gets resolved soon. It has been around for many years and i'm getting close to a publication deadline.
Comment 8 Ben 2017-06-19 22:27:38 UTC
Created attachment 134142 [details]
odt document with mis-alignment issues
Comment 9 Ben 2017-06-19 22:28:16 UTC
Created attachment 134143 [details]
PDF document with mis-alignment issues
Comment 10 Ben 2017-06-24 20:27:26 UTC
Since this also occurs in the PDF, does the odt file store the vertical displacement of each formula? If so, then the rule used to calculate the necessary vertical displacement appears to be incorrect.

Note that I have the math baseline alignment checked. In the past, I had this unchecked and tried to get the alignment manually correct. With the math baseline alignment checked this cannot be done manually.
Comment 11 Ben 2017-07-03 16:18:28 UTC
Issue also occurs in tables. The vertical alignment if off when creating different formulas on the same row on a table, see attachment.
Comment 12 Ben 2017-07-03 16:20:06 UTC
Created attachment 134458 [details]
Vertical mis-alignment in table
Comment 13 Ben 2017-07-03 16:26:45 UTC
Created attachment 134459 [details]
Misalignment in table
Comment 14 Ben 2017-07-03 16:28:25 UTC
This bug already exists since 2001: 16 years
Comment 15 Ben 2017-07-07 20:43:46 UTC
Formula alignment in footnote is also incorrect, even with symmetrical sub+superscript. See attachment.

size 10
setR sup N sub " " 
Comment 16 Ben 2017-07-07 20:44:35 UTC
Created attachment 134535 [details]
Formula aligment in footnote
Comment 17 Ben 2017-10-05 00:01:24 UTC
Can an indication be provided when this issues might be resolved? I'm working on a book and the final editing process has started. This is a pervasive issue that appears across the whole book.
Comment 18 QA Administrators 2018-10-06 02:50:55 UTC Comment hidden (obsolete)
Comment 19 Roman Kuznetsov 2018-10-06 08:10:08 UTC

Build ID: 1aa37aa6bee19099b57555a6d839992b054aa405
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-09-23_10:17:54
Locale: ru-RU (ru_RU); Calc: threaded

I don't see this problem

Ben, Can you retest your problem yourself?
Comment 20 QA Administrators 2019-10-07 03:03:12 UTC
Dear Ben,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat:

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team