Bold headers in math mode

boldmath-mode

I am working in a scrreprt file and I would like to have two things:

  1. in chapter, section and subsection headers to show the math symbol in a bold font like the normal text
  2. to still then show those chapter, section, subsection names in the table of contents in the usual font.

e.g. in \chapter{Hello $1$} the 1 should be displayed in bold font like the Hello and that whole header should be displayed in usual font in the toc.

Hope it's clear what I would like to have!
Thanks and br!

Best Answer

You can add \boldmath to disposition.

Of course, if you want math in titles, you must also disable sans serif.

\documentclass[egregdoesnotlikesansseriftitles]{scrreprt}

\addtokomafont{disposition}{\boldmath}

\begin{document}

\chapter{Example $x=1$}

\end{document}

enter image description here

With the default sans serif titles it would be

enter image description here

which is frankly unacceptable: inconsistent and largely awful.

Related Question