在amsbook
课堂上、在目录中以及在文本中,我想在章节编号前添加带点的章节编号(并且还删除章节编号末尾的点),如下图所示。
\documentclass[12pt]{amsbook}
\usepackage{amsfonts,amsmath}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents
\chapter{Title of the first chapter}
\section{Title of the first section}
wsdqwewqgtewhtrdjnyedty
\section{Title of the second section}
wsdqwewqgtewhtrdjnyedty
\chapter{Title of the second chapter}
\section{Title of the first section}
wsdqwewqgtewhtrdjnyedty
\section{Title of the second section}
wsdqwewqgtewhtrdjnyedty
\end{document}
答案1
\documentclass{amsbook}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\makeatletter
\def\@seccntformat#1{%
\protect\textup{\protect\@secnumfont
\csname the#1\endcsname\enspace
}%
}
\renewcommand{\tocsection}[3]{%
\indentlabel{\@ifnotempty{#2}{\ignorespaces#1 #2\quad}}#3}
\makeatother
\begin{document}
\tableofcontents
\chapter{Title of the first chapter}
\section{Title of the first section}
wsdqwewqgtewhtrdjnyedty
\section{Title of the second section}
wsdqwewqgtewhtrdjnyedty
\chapter{Title of the second chapter}
\section{Title of the first section}
wsdqwewqgtewhtrdjnyedty
\section{Title of the second section}
wsdqwewqgtewhtrdjnyedty
\end{document}