
amsbook을 이용하여 목차의 가로 간격을 작게 조정하고 싶습니다. "제 1장"과 제목 사이의 가로 공간이 너무 크고 섹션, 하위 섹션, 번호 및 제목에서도 마찬가지입니다. 이 공간을 수정하는 방법. 내 MWE에서는 이 사이트에서 찾은 toc의 몇 가지 작은 조정을 수행했습니다.
\documentclass[12pt]{amsbook}
\usepackage{etoolbox}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% Uppercase 'CHAPTER' label in toc
\patchcmd{\tocchapter}{#1}{\MakeUppercase{#1}}{}{}
\makeatletter
% dots leading to the page number in toc
\renewcommand\@pnumwidth{1em}
\patchcmd{\@tocline}
{\hfil}
{\leaders\hbox{\,.\,}\hfil}
{}{}
% modify spacing in toc
\def\l@chapter{\@tocline{3}{5pt plus1pt}{0pc}{0pt}{}}
\def\l@section{\@tocline{2}{1pt plus1pt}{1.5pc}{0pt}{}}
\def\l@subsection{\@tocline{1}{1pt plus1pt}{4.5pc}{0pt}{}}
\makeatother
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\begin{document}
\frontmatter
\title{My Book}
\author{Me}
% \date{}
\maketitle
\tableofcontents
\mainmatter
\chapter{Preliminaries}
\section{Section One}
\subsection{Subsection One}
\section{Section Two}
\subsection{Subsection One}
\subsection{Subsection Two}
\chapter{Results}
\section{Section One}
\subsection{Subsection One}
\subsection{Subsection Two}
\section{Section Two}
\subsection{Subsection One}
\subsection{Subsection Two}
\end{document}
'''
답변1
다음을 수행하여 \quad
삽입하는 대신 일반적인 단어 간 공백을 얻을 수 있습니다.amsbook
\patchcmd{\tocchapter}{\quad}{ }{}{}
\patchcmd{\tocsection}{\quad}{ }{}{}
\patchcmd{\tocsubsection}{\quad}{ }{}{}
다음을 실험해 볼 수도 있습니다.
\patchcmd{\tocchapter}{\quad}{\enspace}{}{}
\patchcmd{\tocsection}{\quad}{\enspace}{}{}
\patchcmd{\tocsubsection}{\quad}{\enspace}{}{}
또는 \hspace{<whatever you like>}
대신에 \enspace
.