How can I modify the command below to obtain a version (of the question: recursive multiple subscript and superscript with xparse) which does not stack the sub/superscripts horizontally but moves all together
like
T_{bc}^{arf}
I tried to remove the \object but this did not work "double superscript error"
I don't want to change the command syntax (so that I am flexible :-)!
\documentclass{article}
\usepackage{xparse}
\NewDocumentCommand{\tensorkor}{m >{\SplitList{,}}O{}}
{\begingroup
\mathsf{#1}%
\newcommand\object{\vphantom{\mathsf{#1}}}%
\ProcessList{#2}{\dotensorkor}%
\endgroup}
\NewDocumentCommand{\dotensorkor}{m}
{%
\object#1%
}
\begin{document}
$\tensorkor{T}[^a,_b,_c,^r,^f]$
what I want is $T_{bc}^{arf}$
\end{document}


\somemacro{T}[^a,_b,_c,^r,^f]$produces the same result as$\mathsf{T}^{arf}_{bc}$? – egreg May 10 '13 at 14:10