[Tex/LaTex] Command for text in math mode that does not become italicized inside theorem statements


This has probably been answered somewhere, but I can't find it from some searching. I sometimes want to write something like Leb for lebesgue measure, and I would like it to be non-italicized, so I usually use \text{Leb} in math mode, but this has the annoyance that it changes inside of an italicized (ams) theorem environment. I usually just hack this and write \text{\emph{Leb}} but clearly this is not ideal.

Is there a replacement for \text that won't inherit this italicizing? Alternatively, is there a more clever hack, in which I can make my macro detect if its going to be italicized and then automatically put in the \emph hack? Clearly the first would be ideal, but the second would also be acceptable.

Best Answer

You can use \textnormal to switch the font to normal non-italic text independent if the outer text is set in italic or not:


Alternatively you can use \mathrm which may make the fonts used more consistent, although this will only work within math mode.

Related Question