It seems to be the de facto standard to use \mathrm
for upright letter notation in math mode as opposed to \text
. Would it not be better to use \text
in general?
One particular problem I am thinking of is when writing in a sans serif-style document (e.g. beamer
). In many cases here, your text and math is set in a sans serif font (for screen readability, I guess). Using \mathrm
in this case causes the argument to appear in a roman font (with serifs), whereas using \text
seems to correctly pick up that the text style in the document is sans serif and display the argument in upright sans serif.
So, would it not be better to generally use \text
instead of \mathrm
for "upright" notation in math mode?
\text{}
returns to the text mode and so it uses the current font. Also, try to type\alpha+\text{A_1}+x
.\mathrm
still contains mathematical symbols, whereas\text
explicitly marks text and as such returns to text mode (which is different from math mode). In math mode you have different typesetting rules (e.g. spacing) and on top of that by using them interchangeably you don't make use of the semantic mark-up either. Bottomline: I strongly advise aginst this practice!\mathrm
. Upright letters only appear in operators for me, so I use\DeclareMathOperator
. Otherwise it is text, so I use\text
.$\rho_\textrm{Water}$
. Descriptive indices aren't variables, as opposed to, e. g., i in $x_i$ which is clearly a variable.\rho_{\text{Water}}
won't give you uprightWater
in an italic context, so wouldn't\mathrm
be the better choice? (Personally, I use the plain\rm
...)