[Tex/LaTex] Not having “Chapter” appear in chapter names

amsbookchaptersnamingtable of contents

If, in amsbook, I write something like

\chapter{My great chapter}

it appears in the text as

Chapter 1. My great chapter

I would like to make it appear simply as

1. My great chapter

Anyone have any suggestions? It would be great if it reflected the same change in the ToC too.

Best Answer

One possibility is to redefine the command \chaptername. Here is a minimal working example:

\documentclass{amsbook}

\renewcommand{\chaptername}{}

\begin{document}
\tableofcontents

\chapter{My great chapter}

\end{document}

For more advanced customization, you may also be interested in packages such as titlesec. Note that there may also be customization possibilities built-in the amsbook class that I am not aware of (for instance memoir provides such abilities).

EDIT: as noted in the comments, one should in fact be a little more careful because of the presence of an \enspace in @makechapterhead in the class amsbook.cls. Perhaps the best option to redefine the @makechapterhead command as a whole is to use etoolbox, as egreg suggests:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@makechapterhead}{\uppercase\@xp{\chaptername}\enspace}{}{}{}
\makeatother 
Related Question