I'm currently working on a report where the majority of subscripts will be non-italic. The way I know how to do this currently is via \mathrm{}, which is an absolute horror when you have to do it many times per equation. Any ways around this? I do have the mtpro2 package, but not sure if there is an option I'm overlooking.


4 Answers 4


Are the subscript materials you have in mind the names of variables? If so, the variable names should probably be set in upright mode regardless of their position relative to the math baseline. However, other subscript material, such as the letters i and t that serve to index elements of sequences, should probably continue to be set in italics. Thus, an approach that typesets all subscript material in upright-roman mode isn't entirely desirable, right?

Fortunately, typesetting all variable names in upright-roman letters can be achieved easily by taking the following two-step approach:

  1. Set up a macro named (say) \V in the preamble to denote that its argument is a variable name:

    \usepacakge{amsmath} % loads 'amstext' package, which redefines \textup to be scalable
    % Next, define various freqently-used variable names using the \V macro:
  2. In the body of the document, you might then write something like

    F_{\Final} = 3F_{\Initial} + 2F_{\V{Intermediate}}

Note that this approach lets you inform LaTeX on the fly, with a minimum of fuss, that certain strings are variable names.

Another important virtue of this two-step approach is that if you change your mind later on and decide that variable names should be typeset differently -- e.g., in text-italics instead of text-upright roman -- all you'll need to do to accomplish this is to change the definition of the \V macro.

  • since when is \textup defined by amsmath, it comes from the kernel :-P
    – daleif
    Feb 6, 2014 at 10:39
  • 2
    @Mico: I would use package amsmath (or amstext) with \textup, because the package makes \textup scalable as \text is working. Feb 6, 2014 at 10:53
  • @HeikoOberdiek, interesting to know, BTW which part of amstext is responsible for that part (normal interest)?
    – daleif
    Feb 6, 2014 at 11:01
  • 2
    @daleif: The assignment \let\nfss@text\text makes all commands that uses \nfss@text scalable. Feb 6, 2014 at 11:24

Not an answer, but what I'd usually do is to have macros defined for the most common "complex" variables: e.g., \newcommand{\GammaD}{\Gamma_{\mathrm{D}}}.


A semi-answer from personal experience, that I'm sure some people will disagree with - and to my mind more useful than Joce's (who beat me too it while I was writing this):

Define macros for the common stuff, just stick with _\mathrm{...} for the rest. For example if you use $\lambda_\mathrm{pump}$ and $\lambda_\mathrm{probe}$ you could define:


and try:


to test - the numbers look fine. It looks like you can override this by doing $\wavel{\mathit{i}}$ if you really want - but you're better off not doing that.

Edit thanks to @tohecz: {} inserted around the subscript as \mathrm{#1} doesn't provide a group to the subscript without it as I thought it did, and my original is therefore not reliable.

  • 1
    Now, if it was possible to tag answers, I would tag this one with do-not-do-this-please. It would be better to comply with the LaTeX's syntax at least a bit more, and use \lambda_{\mathrm{#1}}
    – yo'
    Feb 6, 2014 at 10:22
  • @tohecz you mean the extra {} around the \mathrm{#1}? I can add that in, but I'd like to understand why first - does the \mathrm{#1} not already [weak terminology alert] provide a group to the subscripting _? Or to put it another way: what's wrong with the syntax given that it works?
    – Chris H
    Feb 6, 2014 at 10:47
  • No, it does not provide a group. It's actually a token and a group, so if you think of _ as of a macro with one argument, x_\mathrm{y} is invalid syntax. You're right that it works, which is bceause of how TeX performs the expansion of _. It works as long as nobody tweaks _ to behave in a different way; then it will likely stop working.
    – yo'
    Feb 6, 2014 at 10:50
  • @tohecz, thanks for the explanation, I've edited it in. looking at my main macro collection I'd usually done it right anyway, just a couple of recent definitions were wrong.
    – Chris H
    Feb 6, 2014 at 11:08

What I usually have in my documents in the preamble is the following line


With this command I'm completely flexible with the variable name as well as with the index name and I don't have to define something else in the preamble.

  • While this definition is fine for variable names in subscript positions, it doesn't work if the variable names need to appear, say, on the baseline or in a superscript position.
    – Mico
    Feb 25, 2015 at 2:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .