5

This is what I have for my codes:

\section{MAIN RESULTS}
\subsection{Graphical Analysis}

I am getting this in the pdf: enter image description here

Instead I want the subsection in Italic non-bold form with no period at the end.

This is what I have in my preamble:

\documentclass[11pt,reqno]{amsart}

% Packages
\usepackage{graphicx}
\usepackage{amssymb,amsthm}
\usepackage{natbib}
\bibpunct{(}{)}{;}{;}{,}{,}
\usepackage{xr-hyper}
\usepackage[
  colorlinks=true,
  citecolor=blue,
  urlcolor=blue,
  linkcolor=blue
]{hyperref}
\usepackage{bm}
\usepackage{fullpage}
\usepackage{ amssymb }
\usepackage{caption} \captionsetup[figure]{labelfont=normalfont,labelsep=colon}
\usepackage{mathabx}

\pagestyle{plain}

\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{12pt}

\setcounter{secnumdepth}{2}

\allowdisplaybreaks[4]

% Commenting/debugging
\let\IG\iffalse
\let\ENDIG\fi

%% Shortcuts
\newcommand{\td}[2]{\dfrac{d #1}{d #2}}
\newcommand{\std}[2]{\dfrac{d^2 #1}{d {#2}^2}}
\newcommand{\ctd}[3]{\dfrac{d^2 #1}{d #2 d #3}}

\newcommand{\pd}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\spd}[2]{\dfrac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\cpd}[3]{\dfrac{\partial^2 #1}{\partial #2 \partial #3}}

\newcommand{\pdi}[2]{\partial #1/\partial #2}

\newcommand{\LR}{\Leftrightarrow}
\newcommand{\Lg}{\mathcal{L}}
\newcommand{\half}{\tfrac{1}{2}}
\newcommand{\eqp}{\phantom{=}}
\newcommand{\eqs}{\buildrel s \over =}
\newcommand{\me}{\mathrm{e}}
3
  • titlesec? (Not sure if it agrees with amsart?)
    – cfr
    Dec 1, 2014 at 2:42
  • @cfr Tried it, but didn't work.
    – OGC
    Dec 1, 2014 at 2:46
  • 1
    @cfr AMS document classes and titlesec are not compatible. Dec 1, 2014 at 2:57

2 Answers 2

6

The formatting you are trying to change was tailored by the AMS to suit its editorial style; since AMS document classes do things in their own way, such changes cannot be made using packages that would cooperate with standard classes and some redefinitions of internal commands will be required.

Redefining \subsection you can get non-bolded, italics font for subsections; a redefinition of \@sect to suppress \@addpunct. will kill the final period.

enter image description here

The code:

\documentclass{amsart}

\makeatletter
\def\subsection{\@startsection{subsection}{1}%
  \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
  {\normalfont\itshape}}
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}%
  \ifnum #2>\c@secnumdepth \let\@secnumber\@empty
  \else \@xp\let\@xp\@secnumber\csname the#1\endcsname\fi
  \@tempskipa #5\relax
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \edef\@secnumpunct{%
      \ifdim\@tempskipa>\z@ % not a run-in section heading
        \@ifnotempty{#8}{.\@nx\enspace}%
      \else
        \@ifempty{#8}{.}{.\@nx\enspace}%
      \fi
    }%
    \@ifempty{#8}{%
      \ifnum #2=\tw@ \def\@secnumfont{\bfseries}\fi}{}%
    \protected@edef\@svsec{%
      \ifnum#2<\@m
        \@ifundefined{#1name}{}{%
          \ignorespaces\csname #1name\endcsname\space
        }%
      \fi
      \@seccntformat{#1}%
    }%
  \fi
  \ifdim \@tempskipa>\z@ % then this is not a run-in section heading
    \begingroup #6\relax
    \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty\@M #8\par}%
    \endgroup
    \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi
  \else
  \def\@svsechd{#6\hskip #3\@svsec
    \@ifnotempty{#8}{\ignorespaces#8\unskip
       %\@addpunct.
       }%
    \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi
  }%
  \fi
  \global\@nobreaktrue
  \@xsect{#5}}
\makeatother

\begin{document}

\section{MAIN RESULTS}
\subsection{Graphical Analysis}

\end{document}

A patch can reduce the code:

\documentclass{amsart}
\usepackage{etoolbox}

\makeatletter
\def\subsection{\@startsection{subsection}{1}%
  \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
  {\normalfont\itshape}}
\patchcmd{\@sect}
  {\@addpunct.}
  {}
  {}
  {}
\makeatother

\begin{document}

\section{MAIN RESULTS}
\subsection{Graphical Analysis}

\end{document}
3
  • This works perfectly. Thanks. It's actually a lot of coding for a little thing.
    – OGC
    Dec 1, 2014 at 2:56
  • @user36829 You're welcome! I edited the answer to add the italics for subsection titles. Dec 1, 2014 at 3:01
  • @user36829 I've added a shorter version (patching \@sect) in my newly updated answer. Dec 1, 2014 at 3:07
4

Here's a solution that's based on loading the etoolbox package and executing its \patchcmd macro a couple of times.

enter image description here

\documentclass[11pt,reqno]{amsart}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\subsection}{\bfseries}{\itshape}{}{}
\patchcmd{\@sect}{\@addpunct.}{}{}{}
\makeatother

\begin{document}
\setcounter{section}{2} % just for this example
\section{Main Results}
\subsection{Graphical Analysis}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .