[Tex/LaTex] Section style amsart

amsartbold

I am using amsart for writing my seminar talk. I changed the section style form scshape to bfseries by writing

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

However, this does also affect the style of things like References or Index. How can I prevent this? And why does this not affect the style of Contents as one can see here

enter image description here

Everything can be found here https://github.com/TheGeekGreek/harmonic_analysis.git. Thanks in advance.

Best Answer

You can define a style-switching macro that switches between the original style - \originalsectionstyle and your newly-defined style - \newsectionstyle:

\documentclass{amsart}

\makeatletter
\newcommand{\newsectionstyle}{%
  \renewcommand{\@secnumfont}{\bfseries}
  \renewcommand\section{\@startsection{section}{2}%
    \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
    {\normalfont\bfseries}}%
}
\let\oldsection\section% Store original \section
\let\old@secnumfont\@secnumfont% Store original \@secnumfont
\newcommand{\originalsectionstyle}{%
  \let\@secnumfont\old@secnumfont
  \let\section\oldsection
}
\makeatother

\usepackage{lipsum}

\begin{document}

\tableofcontents

\newsectionstyle

\section{Linear Operators}\lipsum[1-10]

\section{The Real Method}\lipsum[11-20]

\section{The Complex Method}\lipsum[21-30]

\subsection{Hadamard's Three Lines Lemma}\lipsum[31-40]

\section{Interpolation of Analytic Families of Operators}\lipsum[41-50]

\originalsectionstyle

\begin{thebibliography}{x}
  \bibitem{abc} Abc
\end{thebibliography}

\end{document}

\originalsectionstyle reverts to the original formatting that was stored within the preamble. Here are their respective formatting settings if you wish to update them in a similar manner to what is done inside \newsectionstyle:

\def\@secnumfont{\mdseries}
\def\section{\@startsection{section}{1}%
  \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%
  {\normalfont\scshape\centering}}
Related Question