I would like to use smaller fonts for the subscripts and superscripts in a user-defined LaTeX command. Do you have any ideas how to scale down the subscripts/superscripts proportionally? My MWE is the following:
\documentclass{article}
\usepackage{etoolbox}
\usepackage{ifmtarg}
\newcommand{\defineSpecies}[2]{\csdef{spec@#1}{#2}}
\newrobustcmd{\spec}[1]{%
\ifcsname spec@#1\endcsname%
\csuse{spec@#1}%
\else
\GenericError{}{Undefined species `#1'}{}{}
\fi
}
\defineSpecies{hhe3+}{HHe$_3^+$}
\begin{document}
\fontsize{5}{6}\selectfont
\spec{hhe3+}
\end{document}
Here I would like to have much smaller subscript 3 and superscript +. A solution modifying the \spec{} command globally would be preferred, as I have a lot of species defined such a way. I would not switch to other 'chemistry' packages but stick to this command.

\DeclareMathSizesfor each text size. – Willie Wong Jun 06 '23 at 17:22