amsbook 中的目录自定义

amsbook 中的目录自定义

我正在用 LaTeX 转录一本旧书,试图保留其风格。

我发现这个amsbook课程对我来说是完美的解决方案。我用它制作章节\chapter{Thermodynamic Systems},得到类似“第一章 - 热力学系统”的内容。当我创建目录时,每个条目都会重复出现“章节”一词,但我希望它作为所有章节的标题,然后只打印章节编号。

这是我得到的:

前言.................................................................iii

引言.................................................................vii

第一章 热力学系统..................................1

  1. 系统的状态................................................1

第二章 热力学第一定律.......2

(其实没有积分)等等……

这是原始布局:

...........................................................................页序言................................................................iii

引言.................................................................vii

章节

一、热力学系统................................................1

  1. 系统的状态................................................1

II. 热力学第一定律..................................2

(抱歉,复制效果不佳,您必须想象“章节”、“I”和“II”是垂直对齐的。)

有没有办法在页码顶部写上单词“Page”并得到圆点,就像原版书一样?

我搜索了整个网络,但我发现所有允许修改目录的软件包都与 amsbook 类不兼容。

我不想删除实际章节名称中的“章节”一词,我只想在目录中删除它。

以下是该文件的一个示例:

\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}

先谢谢您的帮助!

答案1

要从章节行中删除“章节”一词(请参阅此回答的 egreg) 并将点添加到每一行,你可以在序言中写入以下几行:

\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

此外,要在目录中插入带有“章节”的行,您可以添加行

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

\mainmatterand 之后,为了在目录开头右对齐一行并显示“Page”一词,请添加此内容

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

就在之后\frontmatter

换句话说,以下 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} 

给出结果:

在此处输入图片描述

答案2

以下是基于卡尔科勒的回答:

在序言中添加以下内容:

\makeatletter
\def\@tocline#1#2#3#4#5#6#7{\relax
  \ifnum #1>\c@tocdepth % then omit
  \else
    \par \addpenalty\@secpenalty\addvspace{#2}%
    \begingroup \hyphenpenalty\@M
    \@ifempty{#4}{%
      \@tempdima\csname r@tocindent\number#1\endcsname\relax
    }{%
      \@tempdima#4\relax
    }%
    \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
    \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
    #5\leavevmode\hskip-\@tempdima #6\nobreak\relax
    \dotfill\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
    \nobreak
    \endgroup
  \fi}
\makeatother

并使用

\addtocontents{toc}{
\protect\raggedright
\protect\dotfill\textsc{Page}}

\addtocontents{toc}{
\protect\raggedright
\protect\vspace{8pt plus1pt}
\protect Chapter}

结果:

在此处输入图片描述

相关内容