[Tex/LaTex] Making bold subsection-headings in math, but not bold in ToC

boldmath-modesectioningtable of contents

I am writing in the document type article, and I wish to have my subsection appear in bold itself, but appear normal in the ToC. I am trying to write a chemical formula, which automatically converts the text to non-bold, when using \ce. I chose to do it like this:

\subsection{formation of $\mathbf{N_2O}$ during $\mathbf{NH_3 - SCR}$}

This will make the subsection appear bold, but also it will make the text in \mathbf appear bold in the ToC. I would like to just have the sections appear bold, and the subsections to appear normal in the ToC

Best Answer

If \ce is used, there's no need to use either \mathbf nor the optional argument of the \subsection command at all.

\documentclass{article}


\usepackage[version=4]{mhchem}
\begin{document}
\tableofcontents
\section{Foo}
\subsection{Foobar}
\subsection{formation of \ce{N2O} during \ce{NH3}-SCR}

\end{document}

enter image description here

Related Question