Amsbook – Using the Amsbook Class

amsbook

I am trying to figure out how to tweak various stylistic aspects of the amsbook class. For example, I would like for the chapter and section headers to be left-aligned instead of centered. Also, using the plain theorem style, I would like for the words "theorem", "proof" etc. to be bold. I would also like to figure out how to make theorems not be indented. So, are there simple ways of accomplishing these things or would I be better off basing a custom book class based on the amsbook class? Are there other book classes available that would perhaps be easier to style than the amsbook class?

Best Answer

There are several questions here.

  1. You can define a new page style to change the header format. In my example code this is done defining \ps@spheadings.

  2. You can define a new theorem style to change the format for the theorem-like structures. In my example code this is done defining \th@spplain.I defined this new style using low-level commands, but you could use the features provided by the amsthm package.

    \documentclass{amsbook}
    \usepackage{lipsum}
    
    \makeatletter
    \def\ps@spheadings{\ps@empty
      \def\@evenhead{\normalfont\scriptsize
          \rlap{\thepage}\hfil \leftmark{}{}}%
      \def\@oddhead{\normalfont\scriptsize
          \rightmark{}{}\hfil \llap{\thepage}}%
      \let\@mkboth\markboth
      \def\partmark{\@secmark\markboth\partrunhead\partname}%
      \def\chaptermark{%
        \@secmark\markboth\chapterrunhead{}}%
      \def\sectionmark{%
        \@secmark\markright\sectionrunhead\sectionname}%
    }
    \def\th@spplain{%
      \let\thm@indent\relax
      \thm@headfont{\bfseries}% heading font bold face
      \let\thmhead\thmhead@plain \let\swappedhead\swappedhead@plain
      \thm@preskip.5\baselineskip\@plus.2\baselineskip
                                        \@minus.2\baselineskip
      \thm@postskip\thm@preskip
      \normalfont
    }
    \makeatother
    
    \theoremstyle{spplain}
    \newtheorem{theo}{Theorem}
    
    \pagestyle{spheadings}
    
    \begin{document}
    
    \chapter{A test chapter}
    \section{A test section}
    \begin{theo}
    \lipsum[1]
    \end{theo}
    \lipsum[1-30]
    
    \end{document}
    

Although both modifications are not difficult to achieve, you should think carefully if amsbook is really the best class for you, or if perhaps some other class would suit you better.

To customize the theorem-like structures, you can use the amsthm package (I already provided the link); the ntheorem package could also be a possibility if your document class is not from the AMS collection.

If you decide not to use the amsbook document class, but to use some of the standard document classes, then you can customize the headers using either the fancyhdr or the titlesec packages.

In What are the available “documentclass” types and their uses? you can find a description of some of the available document classes; besides amsbook, and book, the document classes scrbook and memoir could be an option for you.

Here's a simple schematic document showing titlesec and amsthm in action with the book document class:

\documentclass[twoside]{book}
\usepackage{amsthm}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}

\newpagestyle{mystyle}{
 \sethead[left-odd][center-odd][right-odd]{left-even}{center-even}{right-odd}
  \setfoot[left-odd][center-odd][right-odd]{left-even}{center-even}{right-odd}
}

\newtheoremstyle{mystyle}
{3pt}% ⟨Space above⟩
{3pt}% ⟨Space below⟩
{\normalfont}% ⟨Body font⟩
{}% ⟨Indent amount⟩
{\bfseries}% ⟨Theorem head font⟩
{.}% ⟨Punctuation after theorem head⟩
{.5em}% ⟨Space after theorem head⟩
{}% ⟨Theorem head spec (can be left empty, meaning ‘normal’)⟩
\theoremstyle{mystyle}
\newtheorem{theo}{Theorem}

\pagestyle{mystyle}

\begin{document}

\chapter{A test chapter}
\section{A test section}
\begin{theo}
\lipsum[1]
\end{theo}
\lipsum[1-30]

\end{document}