11

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.

  • 1
    It really is easiest to present a Minimum Working Example that illustrates your problem; this is especially true when you are pulling in code from another question (that itself refers to yet another question)... – cslstr Mar 28 '14 at 04:09
  • 1
    Note that \it is somewhat deprecated ... better to use \itshape. See http://tex.stackexchange.com/a/11200/47522. – cslstr Mar 28 '14 at 04:45
  • Good to know, thanks for pointing that out. – Randy Randerson Mar 28 '14 at 04:50
  • @cslstr: I've posted a related question, about how to italicize the heading and optional title of a theorem. I'd appreciate it if you'd take a look at it. Your answers are very good. – Randy Randerson Mar 28 '14 at 04:54

1 Answers1

10

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

cslstr
  • 6,545