The title basically describes the problem. Here is a minimal example:
\documentclass{article}
\usepackage{xcolor}
\begin{document}
$$X_{\color{red}{135}}^{\color{cyan}{345}}$$
\end{document}
When I compile this, the 135 is down and to the left of the 345, rather than directly below it. I get the same issue when I use color instead of xcolor. Any fixes?
aftergroupusage) weird placement of sub-index when color is used - TeX - LaTeX Stack Exchange and tex core - how does xcolor's \color work? - TeX - LaTeX Stack Exchange – user202729 Dec 11 '21 at 05:10