Textual subscripts like in W_{total}
should be typeset in an upright text font (so that code isn't good practice), as has been discussed in various questions here. Now there are several ways to achieve this, and I'm somewhat confused which I should use:
W_{\rm total}
is nice and short, and appears to work in all circumstances, but I expect LaTeX people will frown upon it:-)
Is there any good reason against this?W_{\mathrm{total}}
– is this the LaTeX equivalent of the\rm
approach?W_{\textnormal{total}}
sounds reasonable astotal
is text and not math ...In this answer, Ulrike Fischer suggests a more complicated approach.
Even
W_{\operatorname{total}}
appears to work, but it seems inappropriate.
Note: I always assume here that amsmath
is loaded.
I've already asked some questions above, but my main question is: which of these options is the best practice for textual subscripts?
Let me point out why I haven't mentioned \text
, \textrm
or \textup
above. Those commands (mostly) keep the font of the context they're used in, e.g., in an italic context, \text
and \textrm
would give italic subscripts, and all three yield bold subscripts in a bold context.
Final note: This question is similar to, but not the same as all those questions about the differences between \mbox
, \text
, \textrm
, \mathrm
, \operatorname
that have been asked before. Maybe it's still a duplicate ...
\rm
and\mathrm
are out of the question because they will render-
as a minus sign not a dash.-
!! (But otherwise, for the standard CM fonts, the upright text and math fonts are just the same, aren't they?)\textnormal
: text (-
and space), roman, upright, medium). If one has different fonts for math and text they should fit well anyway and\textnormal
should still produce a good-looking output.