[Tex/LaTex] Superscript/subscript fonts different from body font

fontssubscriptssuperscripts

The following minimal example:

\documentclass{article}
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
10$^5$ and CO$_2$.
\end{document}

produces the following:

enter image description here

The superscript and subscript fonts are different from the body font. Why is this happening, and how can I ensure that those fonts are the same as the body font?

Best Answer

In my view, it's abusing the math environment to use it only to make superscript and subscript numbers in a context that is not math. So I would use \textsuperscript and \textsubscript instead.

\documentclass{article}
\usepackage{fixltx2e}
\renewcommand{\familydefault}{\sfdefault}

\begin{document}
10\textsuperscript{5} and CO\textsubscript{2}.
\end{document}

enter image description here