[Tex/LaTex] Bold math symbol in caption

boldboldmathboldsymbolcaptionstable of contents

\documentclass{report}
\usepackage{float}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[font=bf]{caption}
\begin{document}
\listoffigures
\newpage
\begin{figure}[H]
\caption{Line plot of SE of $\pmb{\hat\beta_0}$ at cp\pmb{=}0.1, 0.2, 0.3}
\end{figure}
\end{document}

I am trying to bold the math symbol\hat\beta_0 by using \pmb but doing this will cause \hat\beta_0 in my list of figures appear to be bold too. is there a way to bold the math symbol in caption without affecting the caption appear in the list of figures? My caption need to be bold, but to bold the math symbol in caption, I have to use \pmb. enter image description here

Best Answer

You should use \boldmath:

\documentclass{report}
\usepackage{amsmath}
\usepackage{caption}

\DeclareCaptionFont{xbf}{\bfseries\boldmath}
\captionsetup{font=xbf}

\begin{document}
\listoffigures
\clearpage
\begin{figure}
\caption{Line plot of SE of $\hat\beta_0$ at $\mathrm{cp}=0.1, 0.2, 0.3$}
\end{figure}
\end{document}

For producing the image, I used \usepackage[paper=a6paper,landscape]{geometry}.

enter image description here