1

The list of chemical reactions are written using align environment

    \begin{align}
                \ce{
                Ca(OH)_{2} + 2 HCl &\rightarrow CaCl$_2$ + 2 H_{2}O \nonumber \\ 
                Ca(OH)_{2} + HCl &\rightarrow CaOHCl + H_{2}O \nonumber \\
                Ca(OH)_{2} + CaCl_{2} &\rightarrow 2 CaOHCl \nonumber 
                   }
                \end{align}         

It compiles without any problems but for the third reaction on the product side, '2' appears somewhat as subscript but the same does not happen with the `2' of the first reaction on the reactant side. How can we resolve this problem and why does this happen?

The same thing happens when I write

    \begin{equation}
            \ce{
                Ca(OH)_{2} + CaCl_{2}.2H_{2}O \rightarrow 2CaOHCl.2H_{2}O \nonumber 
            }
            \end{equation}

'2' on the product side (of CaOHCl) appears as subscript but not '2' of HCl. Do we have any solution for this?

2
  • mhchem comes with its own version of an arroe pointing from left to right: -> as in \ce{Ca(OH)_{2} + CaCl_{2}.2H_{2}O -> 2 CaOHCl.2H_{2}O}. If you, for whatever reason, have to use \rightarrow, go for \rightarrow{}.
    – leandriis
    Mar 26, 2020 at 17:48
  • 1
    Ca(OH)_{2} could be written as Ca(OH)2. H_{2}O could be H2O. I recommend the documentation at mirrors.ctan.org/macros/latex/contrib/mhchem/mhchem.pdf
    – mhchem
    Mar 26, 2020 at 20:29

1 Answer 1

1

mhchem comes with its own set of reaction arrows that you can access via the following shortcuts:

enter image description here

Therefore, simply replace \rightarrow with ->. If you want to stick to the shorter \rightarrow, you can use \rightarrow{} in order to make sure a number following the arrow is not shown as a subscript:

\documentclass{article}
\usepackage[version=4]{mhchem}
\begin{document}

\begin{align*}
\ce{Ca(OH)_{2} + CaCl_{2} & \rightarrow 2 CaOHCl} \\
\ce{Ca(OH)_{2} + CaCl_{2} & \rightarrow{} 2 CaOHCl} \\
\ce{Ca(OH)_{2} + CaCl_{2} & -> 2 CaOHCl}
\end{align*}

\begin{align*}
    \ce{
    Ca(OH)_{2} + 2 HCl &-> CaCl$_2$ + 2 H_{2}O  \\ 
    Ca(OH)_{2} + HCl &-> CaOHCl + H_{2}O  \\
    Ca(OH)_{2} + CaCl_{2} & -> 2 CaOHCl  
       }
\end{align*}

\ce{Ca(OH)_{2} + CaCl_{2}.2H_{2}O -> 2 CaOHCl.2H_{2}O}

\end{document}

enter image description here

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .