Writing text in equation

equationstext;

I can correctly write equation containing text, in latex equation editor online.
So:

\text{Micro-averaged Precision} = \frac{TP_{total}}{TP_{total} + FP_{total}}

Gives:
enter image description here

In Overleaf, this is displayed somehow not as intended (without space):

enter image description here

With the Undefined control sequence. error.

Best Answer

don't ignore errors, you presumably got an error that \text was not defined, load amsmath package. Also use _{\mathrm{total}} don't use math italic for words

Related Question