I'm trying to typeset a chemical equation using the mhchem package, and I want to bold just one part of the equation (to emphasize the product, in this case).
If I type \ce{a A + b B -> c \textbf{C} + d D}, then that produces a A + b B → c C + d D. That's perfectly fine, of course. But I cannot put any more complex chemical formulas within the \textbf{} command. If I enter, for example, \ce{NH3(g) + HCl(g) -> \textbf{NH4Cl}(s)}, ammonium chloride is typeset as NH4Cl(s), without the subscript.
I tried writing the subscript manually (NH_4Cl), but $\ce{NH3(g) + HCl(g) -> \textbf{NH_4Cl}(s)}$ did not work, and instead gave me a bunch of errors (missing $, extra } or forgotten $, missing {, and missing }).
I'm pretty new here so I'm not exactly sure how this MWE thing works — I don't have much that works, but as far as I can tell the code I was using to try things out seems to be pretty close to a MWE. Please let me know if I should provide anything else.
\documentclass{article}
\usepackage[version=4]{mhchem}
\begin{document}
\ce{a A + b B -> c C + d D}
\ce{a A + b B -> c \textbf{C} + d D}
\ce{NH3(g) + HCl(g) -> \textbf{NH4Cl}(s)}
\end{document}

