Chemistry Equations

Can you please post a MWE? I can't reproduce your problem; the following simple code

\documentclass{article}
\usepackage{mhchem}

\begin{document}
  \ce{2LiOH_{(s)} + CO_{2(g)} -> Li_{2}CO_{3(s)} + H_{2}O_{(g)}}
\end{document}

gives me:

enter image description here

Perhaps you are using some outdated package(s)?


You could use \rightarrow instead of ->, if that doesn't work.

\ce{2LiOH_{(s)} + CO_{2(g)} {\rightarrow} Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}

Since you are writing chemistry, you might be interested in the command \chemarrow provided by the chemarrow package.


The mhchem package is sensitive to spaces and I think the problem you were having was just due to some spaces in the wrong places. Compare:

\ce{2LiOH_{(s)} + CO_{2(g)} - >Li_{2}CO_{3(s)}+ H_{2}O_{(g)}}

\ce{2LiOH_{(s)} + CO_{2(g)} -> Li_{2}CO_{3(s)} +H_{2}O_{(g)}}

Also it is worth noting that in this package numbers in chemical formulas are assumed to be subscripts, this saves some typing

\ce{2LiOH_{(s)} +CO2_{(g)} -> Li2CO3_{(s)} +H2O_{(g)}}