# Subscript placement after \def containing superscript [closed]

If I do

\def\foo{V'}
$\foo_{i+1}$


the subscript gets wrongly placed, as if there were invisible parentheses around V'. I want the output to be the same as V'_{i+1}. How to get it?

## closed as off-topic by Mico, Kurt, Stefan Pinnow, barbara beeton, GuMDec 2 '16 at 21:05

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm voting to close this question as off-topic because, according to a comment the OP left under David's answer, the problem was not caused by the code that was posted but by an invisible character. As such, this posting is not likely to be of much interest to future readers. – Mico Dec 2 '16 at 19:19

\def\foo{V'}
$\foo_{i+1}$
$V'_{i+1}$
${V'}_{i+1}$