使用 MWE:
\documentclass[11pt,twoside]{amsbook}
\usepackage[width=17cm, left=2.25cm]{geometry}
\usepackage{etoolbox}
\usepackage{titlesec}
\usepackage{scrextend}
\usepackage{hyperref}
\usepackage{titletoc}
\usepackage{lipsum}
\makeatletter
\patchcmd{\@maketitle}{\newpage}{}{}{}
\makeatother
\AtBeginDocument{\makeatletter
\expandafter\renewcommand\csname r@tocindent0\endcsname{50.5pt}
\makeatother
}
\newcommand\atotoc[1]{\addtocontents{toc}{#1\par}}
\newcommand{\newsection}[1]{{\setcounter{theorem}{0}
\setcounter{equation}{0}}\section{\hspace{-5mm}.
\hspace{0.5mm}#1}\vspace{0cm}}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\def\stackunder#1#2{\mathrel{\mathop{#2}\limits_{#1}}}
\counterwithin{equation}{chapter}
\counterwithin{table}{chapter}
\counterwithin*{equation}{section}
\counterwithin*{figure}{section}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{section}.\arabic{equation}}
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{section}.\arabic{figure}}
\newtheorem{theorem}{\newline Theorem}[section]
\renewcommand\citeform[1]{{#1}}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\titlelabel{\thetitle\Ifstr{\thetitle}{\thesection}{}{}\hspace{3mm}}
\pretocmd{\chapter}{\addtocontents{toc}{\addvspace{20pt}}}{}{}
\makeatletter
\@removefromreset{section}{chapter}
\def\partrunhead#1#2#3{%
\@ifnotempty{#2}{{\@ifnotempty{#1}{#1 }}\@ifnotempty{#3}{}} \arabic{chapter}. #3}
\let\chapterrunhead\partrunhead
\def\sectionrunhead#1#2#3{ %
\@ifnotempty{#2}{{\@ifnotempty{#1}{#1 }}\@ifnotempty{#3}{}} \arabic{chapter}.\arabic{section} #3}
\makeatother
\begin{document}
\part{The first part}
\chapter{The first chapter}
\section{Section 1 in chapter 1}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[2]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\section{Section 2 in chapter 1}
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum
\section{Section 3 in chapter 1}
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum
\section{Section 4 in chapter 1}
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[1]
\chapter{The second chapter}
\section{Section 1 in chapter 2}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[2]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\section{Section 2 in chapter 2}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[2]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\section{Section 3 in chapter 2}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[2]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\section{Section 4 in chapter 2}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[2]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\lipsum[1]
\begin{equation}
\int_{a}^{b}dx=b-a.
\end{equation}
\end{document}
我遇到了一些问题,如下图所示(来自输出)。开始阅读第 2 章时,第一节的编号为 2.6,而应为 2.1(在第 5 页的标题中)。第 9 页也存在同样的问题,其中标题的编号应为 2.4,而不是 2.8。
另一个问题涉及方程的编号,例如,在第 7 页,第一个方程应该编号为 (2.1.1),而不是 (2.5.1)。
我该如何解决这些问题?任何帮助都将不胜感激。
LE:我怎样才能增大节和章节标题的字体?我还想删除未编号章节的节标题,这些章节是使用 引入的\chapter*{...}
,但我不知道该怎么做。