[Tex/LaTex] Make font of \subsubsection bold in amsart

amsartfonts

I have the following code

\documentclass{amsart}

\makeatletter
\newcommand{\mainsectionstyle}{%
  \renewcommand{\@secnumfont}{\bfseries}
  \renewcommand\section{\@startsection{section}{2}%
    \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
    {\normalfont\bfseries}}%
}
\makeatother

\begin{document}
    \mainsectionstyle
    \section{klasdjklasd}
    \subsection{daksdjasdj}
    \subsubsection{adjklsjkasdjklas}
\end{document}

which produces

enter image description here

How do I change the italic font to bold font in the subsubsection? (Maybe also the font in the subsection, because it is by default bold)

Best Answer

easy to change the fonts for the sectioning commands; they're all independently defined.

from `amsart.cls':

\def\subsection{\@startsection{subsection}{2}%
  \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
  {\normalfont\bfseries}}
\def\subsubsection{\@startsection{subsubsection}{3}%
  \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
  {\normalfont\itshape}}

for \subsubsection, change \itshape to \bfseries.

you say "maybe also the font in the subsection, because if is by default bold", but you don't say what you want to change it to. in any event, it should be fairly obvious what to do -- replace \bfseries by whatever you want.

this change (and all similar definitions) should go in the preamble. they also need to be wrapped in \makeatletter ... \makeatother since they contain commands with @ as part of the name.