Possible Duplicate:
Using simple quotes “” instead of \text{}
For subscripts I usally use \textup but if you have many of them it's much to write and read.
\documentclass{article}
\usepackage{siunitx}
\usepackage{amsmath}
\begin{document}
The density of water is $\rho_{\textup{Water}} = \SI{1.0}{kg\per d\cubic m}$.
\end{document}
So instead of that, similar to the new formular editor of Word, I'd like to write:
$\rho_"Water"$
or
$\rho__{Water}$
But I prefer the first version because it is more flexible you could also write:
$x_{"Person",i}$
Is there a package that provides something like that? I have seen this question: Redefine underscore to produce roman subscript without breaking file names, but I don't want to change the default behavior for indices/subscripts.
\mathrmrather than\textupto be consistent with other uses of roman font on math expressions (rather than use the possibly different text font family current outside the expression) – David Carlisle Jan 26 '13 at 21:54\textupby\mathrm). – Manuel Jan 26 '13 at 22:05$x_{"Person",i}$, but it works pretty well likex_|Person|. I discovered a few days ago. Moreover, it doesn't chage the meaning of|, only if you put it on a sub/sup script. – Manuel Jan 26 '13 at 22:30