1

In the below image, I don't want "Chapter 1" to be displayed, only the name that I give the chapter (i.e. here "First Chapter"), as well as making the section headers not bold but merely upper case. Does someone maybe have an idea how one can modify these attributes? enter image description here

Here the code producing the above image:

\documentclass{amsbook}

\begin{document} \title{Test} \author{Author} \date{\today} \maketitle \tableofcontents \clearpage

\chapter[First Chapter]{First Chapter} \section[First Section]{First Section} This is the first section of the first chapter

\end{document}

Here is a partial solution to my first point, however, I don't want "1" at the top but only "First Chapter".

Richard
  • 210
  • 1
  • 7

1 Answers1

0

You need quite deep surgery.

Removing “Chapter N” is not difficult: just remove the relevant part from \@makechapterhead.

Also removing boldface is easy, just remove \bfseries in the definition of \section. Uppercasing the section titles you need some more.

My idea is to change #8 in the definition of \@sect (which is replaced by the given title) by \formatsection{#8} and defining suitably \formatsection. It's necessary to do some \csname trickery in order that uppercasing is only done to sections.

Since we don't define \formatsubsection, for example, subsection titles will not be uppercased.

\documentclass{amsbook}
\usepackage{etoolbox}

\makeatletter \def@makechapterhead#1{\global\topskip 7.5pc\relax \begingroup \fontsize{@xivpt}{18}\bfseries\centering % \ifnum\c@secnumdepth>\m@ne % \leavevmode \hskip-\leftskip % \rlap{\vbox to\z@{\vss % \centerline{\normalsize\mdseries % \uppercase@xp{\chaptername}\enspace\thechapter} % \vskip 3pc}}\hskip\leftskip\fi #1\par \endgroup \skip@34\p@ \advance\skip@-\normalbaselineskip \vskip\skip@ } \def\section{% @startsection{section}% #1 {1}% #2 \z@ % #3 {.7\linespacing@plus\linespacing}% #4 {.5\linespacing}% #5 % {\normalfont\bfseries\centering}% <-- original {\normalfont\centering}% #6 } \patchcmd{@sect}{#8\par}{\csname format#1\endcsname{#8}\par}{}{} \newcommand{\formatsection}[1]{\MakeUppercase{#1}} \makeatother

\begin{document} \title{Test} \author{Author} \date{\today} \maketitle \tableofcontents

\chapter{First Chapter}

\section{First Section}

\subsection{First Subsection}

This is the first section of the first chapter

\end{document}

enter image description here

My suggestion is not using amsbook, but memoir and use the provided features to change the styles for titles; or book and titlesec.

egreg
  • 1,121,712
  • Wow, thanks a lot for the answer! I thought that it was just some little attribute I had to modify, but as you demonstrated, it's quite not that easy. – Richard Feb 21 '24 at 11:26
  • @Richard amsbook is designed to resist tampering by users. – egreg Feb 21 '24 at 11:39