9

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 4:09
  • 1
    Note that \it is somewhat deprecated ... better to use \itshape. See tex.stackexchange.com/a/11200/47522. – cslstr Mar 28 '14 at 4:45
  • Good to know, thanks for pointing that out. – Randy Randerson Mar 28 '14 at 4: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 4:54
8

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

  • Cool, thanks. One more thing: How can I make a space between the subsection title and the content, as in the regular Article document class? – Randy Randerson Mar 28 '14 at 4:32
  • see update. :-) – cslstr Mar 28 '14 at 4:37
  • Damn. That was fast. :) – Randy Randerson Mar 28 '14 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.