# How to write virtually aligned superscript and subscript [duplicate]

I have this line:

\textbf{Adv}\textsuperscript{downgrade}\textsubscript{$Pi$, DP, X}


But I get this output:

And I want it like this:

Can you help me with simple solutions as much as possible plz.

With \rlap and some \raisebox because of ascenders and descenders in the us/superscript:

\documentclass[12pt]{article}

\begin{document}

\textbf{Adv}\textsubscript{\raisebox{-1pt}{\rlap{$\Pi$, DP, X}}}\textsuperscript{\raisebox{1pt}{downgrade}}

\end{document}


The code given above supposes the user knows which is shortest, of the superscript or the subscript text. The shortest has to to be enterd in the code first, the \rlapped. The following code, based on eqparbox makes it automatic:
\textbf{Adv}\textsuperscript{\raisebox{1pt}{\rlap{\eqmakebox[subp][l]{downgrade}}}}\textsubscript{\raisebox{-1pt}{\eqmakebox[subp][l]{$\Pi$, DP, X}}}

• \textsuperscript and \textsubscript do rely on math mode anyway. – egreg Jul 11 '16 at 21:29