6

Can this be done? I can't find anything anywhere on this -- which is very strange to me!

Alenanno
  • 37,338
Iosif Pinelis
  • 387
  • 1
  • 12
  • 1
  • Is there some particular issue with getting this to work in the title specifically? Please post a Minimal (non-)Working Example if Werner's link doesn't answer your question. – cfr Mar 24 '14 at 21:54
  • 1
    since the distinction between lightface and bold often has a meaning distinction in math, at least some math publishers reject the use of bold math in a title if it isn't also bold in the text. – barbara beeton Mar 24 '14 at 22:00
  • Please, seperate questions and answers. It would be best if you (1) specified what style file you use (including MWE) and then (2) posted the whole addendum as an answer to the question. – yo' Mar 25 '14 at 17:16

2 Answers2

7

enter image description here

\documentclass{article}

\title{$e=mc^2$ in bold}

\let\oldmaketitle\maketitle
\renewcommand\maketitle{{\bfseries\boldmath\oldmaketitle}}

\begin{document}

\maketitle

$e=mc^2 $

\end{document}
David Carlisle
  • 757,742
  • I found \boldmath helpful for section tiltles. E.g.: \section{\boldmath $e=mc^2$ in bold}. Thank you. – Cyriac Antony Apr 28 '22 at 05:37
  • @CyriacAntony you should not use \boldmath in the argument, rather use it where \bfseries is used in the declaration of the section style. Using formating in titles is bad style in genral but specifically here the markup you suggest would make the math bold in tables of contents and page running heads, even though the text in those places is not bold. – David Carlisle Apr 28 '22 at 09:18
  • Okay. Thank you. Is it okay to use \section[sec tilte in toc & running head]{Usual title}? (it looks good to me; but I may not be aware of pitfalls). – Cyriac Antony Apr 28 '22 at 11:45
0

The problem was that I was using a particular .sty file: imsart. After the modification, it works well for me now, so thank you everyone for the hints. I have replaced

\setattribute{title}      {size} {\LARGE\bfseries}

there by

\setattribute{title}      {size} {\LARGE\bfseries\boldmath}

and it works now.

Alenanno
  • 37,338
Iosif Pinelis
  • 387
  • 1
  • 12