0

How can the output of the \ce{} macro of mhchem be typeset as bold?

  • Add a MWE, please with an image (optional). – Sebastiano Jan 16 '17 at 8:29
3

Glancing at the manual, you can set this globally by adding

\mhchemoptions{textfontcommand=\bfseries,mathfontcommand=\mathbf}

to the preamble.

For single instances in text mode, you can use \textbf{\ce{..}}.

\documentclass{scrartcl}
\usepackage[version=4]{mhchem}
\begin{document}
\ce{H2O} %not bold

\textbf{\ce{H2O}} % bold

\mhchemoptions{textfontcommand=\bfseries,mathfontcommand=\mathbf}

\ce{H2O} %bold

$\ce{H2O}$ %bold
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.