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.
[Tex/LaTex] way to make math mode subscripts automatically non-italic
math-modesubscripts
Best Answer
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
andt
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:
Set up a macro named (say)
\V
in the preamble to denote that its argument is a variable name:In the body of the document, you might then write something like
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.