# Displaying a Carbonate Ion with mhchem

I want to write out the formula for the aqueous carbonate ion using the mhchem package. If I write out CO3^{2-}, it looks the way it should be. (See image.)

However, I want to write out: CO3^{2-}_{(aq)}. The 2- charge gets shifted along to the right of the (aq) state symbol. (See image.)

Is there any means of fixing this?

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Astrinus Feb 18 '15 at 11:36
• This is an interesting use case. 1. I'll try to find a solution for the next version of mhchem. 2. You could try the (still unofficial) option superscriptstacked. 3. As already pointed out, the IUPAC notation for that would be CO3^{2-}(aq). (author of mhchem) – mh543 Feb 21 '15 at 18:35

\documentclass[a4paper,12pt]{article}
\usepackage{mhchem}

\begin{document}
\ce{CO3^{2-}_{\rlap{(aq)}}\; ->}
\end{document}


\rlap suppresses the width of the content, so you need a \; to get the correct spacing.

• This does not quite sound as a consistent solution. How do you know that \; is the right amount of space? (Hint: you do not.) – yo' Feb 18 '15 at 11:41
• @yo' Yes, I do not. It is the wrong one for sure. But it is reasonable. If you have a better answer, please post here ;-) – Astrinus Feb 18 '15 at 17:40

You can use {}_{(aq)}

\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}
\noindent IUPAC recommendation:\\
\ce{2H+(aq) + CO3^{2-}(aq) -> CO2(g) + H2O(l)}

\bigskip

\noindent Subscript:\\
\ce{2H+{}_{(aq)} + CO3^{2-}{}_{(aq)} -> CO2{}_{(g)} + H2O{}_{(l)}}
\end{document}


If you don't mind switching packages: the chemformula package in combination with the chemmacros package allows for a variety of different outputs:

\documentclass{article}
\usepackage{chemmacros}

\begin{document}

IUPAC recommendation:\par
\ch{2 H+ \aq{} + CO3^2- \aq -> CO2 \gas{} + H2O \lqd}

\bigskip

\chemsetup{phases/pos=sub}
subscript phase descriptors after the compounds:\par
\ch{2 H+ \aq{} + CO3^2- \aq -> CO2 \gas{} + H2O \lqd}

\bigskip

phase descriptors as subscripts to the compounds directly:\par
\ch{2 H^+_{(aq)} + CO3^{2-}_{(aq)} -> CO2_{(g)} + H2O_{(l)}}

\bigskip

as before but disabled horizontal shift of the charge of \ch{H+}:\par
\ch{@{charge-hshift=0pt} 2 H^+_{(aq)} + CO3^{2-}_{(aq)} -> CO2_{(g)} + H2O_{(l)}}

\end{document}