\documentclass{minimal}
\usepackage{mhchem}
\begin{document}

%$\ce {A->[B] C}$

$\ce {pH=-\log _{10}[H+]}$

%$\ce {Ca_{3}N_{2}~+~6H_{2}O~->~Ca}}} $

\ce {NO_{x}}

$a\;b$

\end{document}