Math formula spacing for terms like "2xy"

The way LibreOffice formulas add spacing around terms in math equations doesn’t seem to follow the industry’s general flow. For example:

Sample formula software

Other software adds no space between coefficients and variables in a term, like “12xyz” instead of “12 xyz”. LibreOffice’s formula renderer adds space between the “12” and the “xyz”. In the examples above, only LibreOffice adds space between “12” and “x^2” and bewteen “18” and “xy”, for example.

Can this be altered or is there a setting to control it? Was this a deliberate formatting choice, or just the effect of other general formatting rules? Thanks!

tdf#140729

So what happens now, e. g. with regard to tdf#55853 ?

You can set the spacing between number and variable to zero. That is in menu Format > Spacing when you are in Math formula edit mode. But you might then need to add a small gap manually at other places.
spacing

Thanks for replying so quickly!

I played around with percent values and extra spaces. Here are good results:

(yellow highlighting added by me for readability)

Looks like the best way to mimic what other typesetters do is to set the percent to zero and add backtick spacing around operators. It’s a reasonable work-around that looks good.

The “12x^2” is tight, but the “18xy” and “23y” don’t look as tight, but it could just be my eyes.

I can also set the 0% as the default so I only have to do it once per document, which is nice.

1 Like

I know LibreOffice formatting isn’t expected to look or act like other software, but every other textbook and website I can find formats terms the same and keeps the variables in terms tight against their coefficients.

For good conversation, does anyone know why LibreOffice chose to have such loose kerning in this case? I’m wondering if it was deliberate or this is a place for improvement?

To me, it looks jarring, but that could just be me being a pain in the butt.

By way of comparison and to be a little funny:

looks_jarring_table

(the left is LibreOffice and it looks good. The right is me in Gimp just to illustrate a point)

Correct spacing really feels like an important thing for math formulas. Is my original image at the top of this thread uncomfortable to everyone else or is it just me?

Should I bring it up as a potential bug or feature request, or is the consensus to just let it go?

1 Like

Personally, I prefer some tiny spacing between coefficient and variable (and a slightly wider space around operators).

However, Math is stone age. File a feature request for more spacing control but don’t expect too much. Math does not seem to receive the attention it deserves.

1 Like