Disable autochange "int" into integral symbol in LibreOffice Writer Math equation

When i open .docx document using libreoffice writer it change “int” into integral symbol in all math equations. Its needed for this string to be writen on italic font. How can i disable this autoswap?

Can’t be done easily.

First of all, your document is a .docx one and it goes through a conversion when loading and yet another one when saving. This means Math encoding is translated to some foreign format and may incur damage or at least inaccuracy. I’ll give my workaround which is valid in ODF contect, i.e. when document is saved .odt. Check to see if it works on your side and, please, give feedback.

int is a reserved word in Math and unfortunately reserved words can’t be escaped to give them “variable” meaning.


You can cheat Math as follows:

  • quote the reserved word as "int" to make it a string
  • prefix it with operator ital to make it look like a variable


 ital "int"


You may have customised Math rendering in Format|Fonts where the font face for Text may not be the same as for Variables. This can be fixed by used the “custom” fonts in Serif or Sans-serif categories. Let’s do this on Serif you’ll set to the same face as Variables. Note that you can’t add bold or italic attributes on the custom fonts.

Your formula becomes

 ital font serif "int"

Tnx for answer. Better way to get clear math in LibreOffice while open file in .odt is using text in italic without quotes and ital operators, like:
But then i take another trouble - i loose my second equation while save that file to .doc document (i do it to get Microsoft Equation 3.0 from Math ML, dont ask me why =) )

So I concluded to open from .docx using that variant:
ital “int” (no matter in italic font or not).
One question is stay opened - in libreoffice it displayed as:
ital " int " (with two whitespace - one before and one after “int”).
In this way i need to write macro to change all text " int " into “int” in LibreOffice Math.

If you don’t care for the extra spaces, leave it as is.

I’ve never written one, so i can’t help you.

it’s misunderstanding, i am not ask to help :slightly_smiling_face:
Find this. Maybe will be helpful for others

You can file a bug report about this, and an enhancement request (an invaluable one to be sure), at the proper place. This is a place where users meet and help other users of LibreOffice.
Even if an enhancement is implemented or the bug, if it is one, gets fixed, it will take a while before that happens. Until then, you have to make do with a workaround. One way is to work exclusively with the odt format and to save in the docx format only when you really have to, like to send or upload it to an instance that requires that format.
I have worked a bit with MathType a long time ago, and it works in just the same way as the Math module in Libre - each formula is inserted as if it were a graphic object.

1 Like