How to put units in Libreoffice Math

I understand that “LibreOffice Math” is the subwindow in LibreOffice Writer to write equations and such. What I cannot find is a way to write an equation with a numerical result. Say, y=5m. The thing is ‘y’ has to be in italic because it is a variable, but ‘m’ has to be in normal format because it is a unit, but I cannot find a way to make it non-italic. I’m in LibreOffice 4.2. Any help?

Thanks a lot.

You can write the unit as text y=5"m" or you can determine the style y=5 nitalic{m}. For a detailed guide to Math get “LibreOffice Math Guide” from https://wiki.documentfoundation.org/Documentation/Publications. It contains a complete Math commands reference.