1

I would like to use subscripts in text and display it non-italic. When using the $_{} the text is rendered italic. Can I change that behavior? How to achieve that (preferably as a default in TeXStudio).

Thanks!

Bernard
  • 271,350
MaxS
  • 123
  • 5
    Math variables are normally in italic, so perhaps you should be a bit more specific about what it is you are trying to do. It is true that textual subscripts should be not only upright but probably also in the text font not the math font, but that should not require setting the entire math in upright – daleif May 27 '19 at 12:57
  • Thanks @daleif. I wanted to write chemical equations, for example. They tend to have a lot of subscripts but are not expected to be italic. So maybe the actual question would be more precise: How to get subscripts in non-italic? – MaxS May 27 '19 at 13:09
  • 1
  • 2
    There are specialised packages for this, not need at all do to that by hand, see campas comment. But this information is very relevant to your question and your title, so you might want to update those. – daleif May 27 '19 at 13:25
  • Welcome to TeX.SE. You can use the package mhchem for chemical formulas, as mentioned in the question linked by @campa. But in general, if you are not writing chemical equations/formulas, you can use some solutions provided in https://tex.stackexchange.com/questions/1013/how-to-typeset-subscript-in-usual-text-mode. – Marijn May 27 '19 at 15:40
  • Thanks @ Marijn. That was actually what I was looking for – MaxS May 27 '19 at 15:55
  • A more general approach is to wrap the subscript in \text{} from amsmath. – Davislor May 27 '19 at 21:05
  • With the new package subtext, you can achieve your request with the syntax x_[i] instead of x_{i}. – quark67 May 28 '19 at 00:40

0 Answers0