Superscript and subscript together in text mode
Duplicate the definition of \textsuperscript
:
\documentclass{article}
\makeatletter
\DeclareRobustCommand{\textsupsub}[2]{{%
\m@th\ensuremath{%
^{\mbox{\fontsize\sf@size\z@#1}}%
_{\mbox{\fontsize\sf@size\z@#2}}%
}%
}}
\makeatother
\begin{document}
X\textsupsub{ab}{c}X\textsupsub{c}{ab}X
\end{document}
Add \strut
to the second argument if you prefer.