2

i have a subsection named

\subsection{$\Lambda$CDM}

is there a way to show \Lambda as a bold symbol? I have tried with \bm{}

\subsection{$\bm{\Lambda}$CDM}

but I got errors and textbf doesn't seem to help

Mico
  • 506,678
Alucard
  • 129
  • But, isn't the whole title of a \subsection bold by default? –  Jan 09 '22 at 05:35
  • A statement such as "I got errors" is not helpful -- unless a reader is blessed with unusually keen psychic divination powers. (Sadly, I'm not in that august set.) Which error(s) did you get? – Mico Jan 09 '22 at 05:51
  • @Mico it absolutely annihilated my pdf with a long list of pratically every kind of possible error that it would take an impractical amount of time to write xD – Alucard Jan 09 '22 at 07:33
  • @Alucard - Generally, the very first error is the most important one. (Downstream error messages can be mostly gibberish.) – Mico Jan 09 '22 at 07:37

1 Answers1

6

The \boldmath command, to be issued before you enter math mode, is your friend here, as in

\subsection{\boldmath $\Lambda$CDM}

enter image description here

However, if your document features a table of contents, you should write

\subsection[$\Lambda$CDM]{\boldmath $\Lambda$CDM}

in order to avoid getting \Lambda typeset in bold in the ToC entry.

\documentclass{article}
\begin{document}
\stepcounter{section}
\subsection{\boldmath $\Lambda$CDM}
\end{document}
Mico
  • 506,678
  • 1
    it works but now i get "Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing math shift' on input line 385." and 'Package hyperref Warning: Token not allowed in a PDF string (Unicode): removing\Lambda' on input line 385.' . is there a way to avoid this warnings? – Alucard Jan 09 '22 at 08:02
  • 2
    @Alucard - Please see the posting Hyperref - Token not allowed for information on what to do to get rid of this warning message. Incidentally, your phrasing "...but now I get..." is somewhat misleading. The hyperref-related warning message you mention as getting now is actually entirely orthogonal to the main issue of your query. Indeed, the "token not allowed" warning message must have been there as soon as you included $\Lambda$ in the argument of \subsection. You may have simply missed that it was there until just now... – Mico Jan 09 '22 at 09:13