Overlining subscripts

Hello. I am trying to use overlining future (Format → Character → Font effects → Overlining) for formulae with subscripts. I need one straight line without breaks (this is how my math formulae shold look like).

However, the line above the text breaks above subscripts or superscripts. It just becomes lower for subscripts as if I am using a smaller font. Above superscripts it becomes higher. Any hints to make it straight?

I am using Libreoffice Writer If newer version can help, I will switch, but I could not find anything in the documentation concerning my problem. Thank you in advance for your help.

Are you writing your formulae as normal text or using the formula editor, Math? The effect you need (a continuous overline) cannot be done on normal text, so try with Insert → Object → Formula and write the following code

overline{ A_ij }

to get this

image description

Thank you, it works! The line seems to be thicker for some reason, but I can live with that.