[Tex/LaTex] TOC customization in amsbook

amsbookchapterstable of contents

I am transcribing an old book in LaTeX, trying to preserve the style.

I found the amsbook class to be the perfect solution for me. I produce chapters with \chapter{Thermodynamic Systems} and I get something like "Chapter I – Thermodynamic Systems". When I create the TOC, the word "Chapter" is repeated for each entry, but I want it as a heading for all chapters, and then print only the chapter number.

This is what I get:

Preface………………………………………………………..iii

Introduction…………………………………………………vii

Chapter I. Thermodynamic Systems…………………..1

  1. The state of a system………………………………..1

Chapter II. The First Law of Thermodynamics………2

(actually, without points) and so on…

This is instead the original layout:

………………………………………………………………Page
Preface………………………………………………………..iii

Introduction…………………………………………………vii

Chapter

I. Thermodynamic Systems………………………………1

  1. The state of a system………………………………..1

II. The First Law of Thermodynamics………………….2

(sorry for the poor reproduction, you have to imagine that "Chapter", "I" and "II" are vertically aligned.)

Is there also a way to write the word "Page" at the top of the pages numbers and to get the dots, like the original book?

I searched all around the web, but all the packages I found that allow to modify the TOC are incompatible with the amsbook class.

I DO NOT want to remove the word "Chapter" in the actual chapter name, I want to remove it only in the TOC.

Here is an axample of the document:

\documentclass[10pt,twoside,titlepage,reqno]{amsbook}
\usepackage[a5paper]{geometry}
\geometry{papersize={5.375in,8.500in}}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[%hypertex,
                 unicode=true,
                 plainpages = false, 
                 pdfpagelabels, 
                 bookmarks=true,
                 bookmarksnumbered=true,
                 bookmarksopen=true,
                 breaklinks=true,
                 backref=false,
                 colorlinks=true,
                 linkcolor = blue,
                 urlcolor  = blue,
                 citecolor = red,
                 anchorcolor = green,
                 hyperindex = true,
                 hyperfigures
]{hyperref}
\hypersetup{
 pdftitle={Thermodynamics},
 pdfauthor={Enrico Fermi},
 pdfsubject={Unabridged, unaltered republication of 1937 edition.}
}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lettrine}
\usepackage{type1cm}
\renewcommand{\LettrineTextFont}{\MakeUppercase}
\renewcommand{\thechapter}{\Roman{chapter}}
\usepackage{chngcntr}
\counterwithout{section}{chapter}

\author{\scshape{Enrico Fermi}}
\title{\Huge \MakeUppercase{Thermodynamics}}
\copyrightinfo{1936}{Enrico Fermi\\Copyright holder, Laura Fermi}


\makeindex

\begin{document}

\frontmatter

\maketitle

\makeatletter
\@setcopyright
\makeatother

\chapter*{Preface}
\lettrine{T}{his} book originated in a course of lectures held at Columbia University, 
New York, during the summer session of 1936.

Blablabla...

\begin{flushright}
\textsc{E. Fermi}
\end{flushright}


\tableofcontents


\chapter*{Introduction}
\lettrine{T}{hermodynamics} is mainly concerned with the transformations 
of heat into mechanical work and the opposite transformations of mechanical work into heat.

Blablabla...

\mainmatter


\chapter{Thermodynamic Systems}\index{Thermodynamical systems}
\section{The state of a system and its transformations}\index{Thermodynamical state of a system}
The state of a system in mechanics is completely specified at a
given instant of time if the position and velocity of each mass 
point of the system are given. For a system composed of a
number $N$ of mass-points, this requires the knowledge of
$6N$ variables.

Blablabla...

\subsection*{A system composed of a chemically defined homogeneous fluid}
\index{Chemically homogeneous systems}\index{Chemically homogeneous fluid}
We can make the following measurements on such a
system: the temperature $t$, the volume $V$, and the pressure $p$.

Blablabla...

\chapter{The First Law of Thermodynamics}
\section{The statement of the first law of thermodynarnics}
Some text...


\chapter{The Second Law of Thermodynamics}\label{chap:2ndLawOfThermo}


\printindex

\end{document}

Thanks in advance for the help!

Best Answer

To remove the word "Chapter" from the chapters lines (see this answer of egreg) and to add the dots to every line you can write the following lines in the preamble:

\makeatletter
\renewcommand\tocchapter[3]{%
  \indentlabel{\@ifnotempty{#2}{\ignorespaces#2.\quad}}#3\dotfill%
}
\renewcommand{\tocsection}[3]{%
  \indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\dotfill%
}
\makeatother

Moreover, to insert the line with "Chapter" in the TOC, you can add the line

\addtocontents{toc}{\protect\contentsline{chapter}{Chapter}{}{}}

just after the \mainmatter and, to have a line with the word "Page" right-aligned at the beginning of the TOC, add this

\addtocontents{toc}{\protect\contentsline{chapter}{}{\textsc{\small Page}}{}}

just after the \frontmatter.

In other words, the following MWE:

\documentclass[10pt,twoside,titlepage,reqno]{amsbook}
\usepackage[a5paper]{geometry}
\geometry{papersize={5.375in,8.500in}}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[%hypertex,
                 unicode=true,
                 plainpages = false,
                 pdfpagelabels,
                 bookmarks=true,
                 bookmarksnumbered=true,
                 bookmarksopen=true,
                 breaklinks=true,
                 backref=false,
                 colorlinks=true,
                 linkcolor = blue,
                 urlcolor  = blue,
                 citecolor = red,
                 anchorcolor = green,
                 hyperindex = true,
                 hyperfigures
]{hyperref}
\hypersetup{
 pdftitle={Thermodynamics},
 pdfauthor={Enrico Fermi},
 pdfsubject={Unabridged, unaltered republication of 1937 edition.}
}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lettrine}
\usepackage{type1cm}
\renewcommand{\LettrineTextFont}{\MakeUppercase}
\renewcommand{\thechapter}{\Roman{chapter}}
\usepackage{chngcntr}
\counterwithout{section}{chapter}

\author{\scshape{Enrico Fermi}}
\title{\Huge \MakeUppercase{Thermodynamics}}
\copyrightinfo{1936}{Enrico Fermi\\Copyright holder, Laura Fermi}


\makeindex

\makeatletter
\renewcommand\tocchapter[3]{%
  \indentlabel{\@ifnotempty{#2}{\ignorespaces#2.\quad}}#3\dotfill%
}
\renewcommand{\tocsection}[3]{%
  \indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2.\quad}}#3\dotfill%
}
\makeatother

\begin{document}

\frontmatter

\addtocontents{toc}{\protect\contentsline{chapter}{}{\textsc{\small Page}}{}}

\maketitle

\makeatletter
\@setcopyright
\makeatother

\chapter*{Preface}
\lettrine{T}{his} book originated in a course of lectures held at Columbia University,
New York, during the summer session of 1936.

Blablabla...

\begin{flushright}
\textsc{E. Fermi}
\end{flushright}


\tableofcontents


\chapter*{Introduction}
\lettrine{T}{hermodynamics} is mainly concerned with the transformations
of heat into mechanical work and the opposite transformations of mechanical work into heat.

Blablabla...

\mainmatter

\addtocontents{toc}{\protect\contentsline{chapter}{Chapter}{}{}}

\chapter{Thermodynamic Systems}\index{Thermodynamical systems}
\section{The state of a system and its transformations}\index{Thermodynamical state of a system}
The state of a system in mechanics is completely specified at a
given instant of time if the position and velocity of each mass
point of the system are given. For a system composed of a
number $N$ of mass-points, this requires the knowledge of
$6N$ variables.

Blablabla...

\subsection*{A system composed of a chemically defined homogeneous fluid}
\index{Chemically homogeneous systems}\index{Chemically homogeneous fluid}
We can make the following measurements on such a
system: the temperature $t$, the volume $V$, and the pressure $p$.

Blablabla...

\chapter{The First Law of Thermodynamics}
\section{The statement of the first law of thermodynarnics}
Some text...


\chapter{The Second Law of Thermodynamics}\label{chap:2ndLawOfThermo}


\printindex

\end{document} 

gives the result:

enter image description here