[Tex/LaTex] How to change the appearance of subsections, subsubsections, etc. in an AMS Article

amsartformattingtitlesec

Suppose I have the following document:

\documentclass{amsart}
\begin{document}

\subsection{Subsection}
Content.

\end{document}

How can I modify the code so that the subsection heading is italic instead of bold? I tried to use the titlesec package, but I don't think it is compatible with the AMS document classes:

\documentclass{amsart}
\usepackage{titlesec}

\titleformat*{\subsection}{\it}

\begin{document}

\subsection{Subsection}
Content.

\end{document}

It works with the Article document class, but it produces errors in an AMS Article.

Edit: I would also like a space between the subsection title and the content, as in the typical Article document class.

Best Answer

The \subsection is defined in amsart.cls as:

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

This definition can be patched to redefine the font with etoolbox:

\documentclass{amsart}

\usepackage{etoolbox}
\patchcmd{\subsection}{\bfseries}{\itshape}{}{}

\begin{document}

\subsection{Subsection}
Content.

\end{document}

This will give the subsection style as:

enter image description here

Edit: Remove in-line heading

The in-line heading is caused by the -.5em distance that is given for separation. A negative number is interpreted as "horizontal distance to skip". To have the section start on the next line (and the number interpreted as "vertical distance to skip"), this must be a positive number. This can be accomplished by adding:

\patchcmd{\subsection}{-.5em}{.5em}{}{}

The full example (with a bit more text) becomes:

\documentclass{amsart}

\usepackage{lipsum} % just for extra text
\usepackage{etoolbox}
\patchcmd{\subsection}{\bfseries}{\itshape}{}{}
\patchcmd{\subsection}{-.5em}{.5em}{}{}


\begin{document}

\subsection{Subsection}
Content. \lipsum

\end{document}

newparagraph