목차의 장, 섹션, 하위 섹션 번호 변경

목차의 장, 섹션, 하위 섹션 번호 변경

라텍스로 목차를 만들어야 하는데, 장은 로마 숫자로, 섹션은 아라비아 숫자로, 하위 섹션은 문자로 되어 있습니다. 또한 하위 섹션 수준까지만 올라가려면 필요합니다.

다음과 같아야 합니다.

I. CHAPTER
II. CHAPTER
   1. Section
   2. Section
      (a) Subsection
      (b) Subsection

목차를 생성하려면 다음 명령을 사용하지만 다른 형식으로 수행합니다.

\tableofcontents

라텍스로 이것을 어떻게 달성합니까?

테드.

답변1

장, 섹션 및 하위 섹션에 대한 카운터 표시를 제어하는 ​​명령 을 재정의할 수 있습니다 \thechapter. 그런 다음 패키지 를 사용하여 점을 추가할 수 있습니다.\thesection\thesubsectiontocloft

\documentclass{book}
\usepackage{tocloft}

\renewcommand\cftchapaftersnum{.}
\renewcommand\cftsecaftersnum{.}

\renewcommand\thechapter{\Roman{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{(\alph{subsection})}

\begin{document}

\tableofcontents

\chapter{Test Chapter One}
\section{Test Section One}
\section{Test Section One}
\subsection{Test Subsection A}
\subsection{Test Subsection B}

\end{document}

여기에 이미지 설명을 입력하세요

장 번호가 제목과 겹치는 것을 방지하고 섹션 번호와 제목 사이의 공간을 줄이기 위해 몇 가지 다른 조정이 필요할 수 있습니다. 이러한 조정은 다음과 같을 수 있습니다.

\renewcommand\cftchapnumwidth{2.8em}
\renewcommand\cftsecnumwidth{2em}
\renewcommand\cftsecindent{3em}
\renewcommand\cftsubsecindent{5em}

관련 정보