[Tex/LaTex] How to make the optional title of a theorem bold with amsthm

amsthmfontsformattingtheorems

I use the code mentioned in Title of the theorem:

\begin{theorem}[The title]
Some statement
\end{theorem}

However with amsthm the optional title — above: "The title" — is neither bold nor italic, but (ordinary) roman. I prefer to work with amsthm, so how can I solve the problem?


Update: After applying the code

\newtheoremstyle{mystyle}%                % Name
  {}%                                     % Space above
  {}%                                     % Space below
  {\itshape}%                                     % Body font
  {}%                                     % Indent amount
  {\bfseries}%                            % Theorem head font
  {.}%                                    % Punctuation after theorem head
  { }%                                    % Space after theorem head, ' ', or \newline
  {}%                                     % Theorem head spec (can be left empty, meaning `normal')

\theoremstyle{mystyle}
\newtheorem{theorem}{Theorem}

\begin{document}

\begin{theorem}[abcd]\label{firstlabel}%
111
\end{theorem}

The output looks like this:

enter image description here

The content in the bracket is still not bold. How can I change it?

It can be solved by

\begin{theorem}[\bfseries abcd]\label{firstlabel}%
111
\end{theorem}

although I'd like to have it set universally.

Best Answer

You can put this in the preamble, without the need to define new theorem styles; in fact this redefines the plain and definition theorem styles in order that the theorem title has the same font attributes as the theorem heading:

\usepackage{amsthm}
\makeatletter
\def\th@plain{%
  \thm@notefont{}% same as heading font
  \itshape % body font
}
\def\th@definition{%
  \thm@notefont{}% same as heading font
  \normalfont % body font
}
\makeatother