I want to put some short words in certain subscripts when I am in math mode, for example:

\[W_{total} = \sum{W_i}\]

but I think LaTeX understands this as the product of t, o, t, a and l.

Is in any case this way the right way, or is there any other one?

By the way, I have tried


but it is not fine for me. (A bit ugly) Forget that.

  • 10
    Could you elaborate why you find it ugly.
    – Caramdir
    Jan 23, 2011 at 16:59
  • 2
    @Caramdir bah, I made a mistake. Forget that Jan 23, 2011 at 21:31

1 Answer 1


What you have tried is the right way. You can simplify it slightly and play with other fonts:

$$ W_\textrm{total} = \sum_i W_i $$

To make it prettier I'd suggest to think about the use of variables and indices in your work. For example, you could reserve W (without index) for the total which is the sum of w_i (lowercase w). This way you can avoid long subscripts.

  • 6
    As this is a LaTeX question, stick with \[ ... \] rather than $$ ... $$. Also, I'd recommend W_{\textrm{total}} with braces around the subscript text.
    – Joseph Wright
    Jan 23, 2011 at 18:01
  • 2
    Thank you for your answer; your suggestion about subscripts was useful too :) By the way, is there any difference between \textrm and \text? Jan 23, 2011 at 21:34
  • 7
    @Juan Yes, \textrm make the text whatever is defined as the serifed text font. \text respects the local text environment. So \sffamily $W_\text{total}$ will give you a sans serifed subscript, while \sffamily $W_\textrm{total}$ will still give you a serifed subscript.
    – Alan Munn
    Jan 23, 2011 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.