
저는 3가지 일을 하려고 합니다.
- 각 섹션에 대해 섹션 제목을 자동으로 반복합니다(예: "장").
- 섹션 번호 앞에 섹션 제목을 입력합니다(예: "1장"이 아닌 "1장").
- 각 섹션 번호를 2자리로 만듭니다(예: "Chapter 01"이 아닌 "Chapter 1").
저는 이 3가지 작업을 각각 개별적으로 수행하는 방법을 찾을 수 있었지만 전부는 아닙니다.
답변1
표준
book
및 문서 클래스는 기본적으로 필요한 작업을report
제공합니다 .\chapter
표준
book
및 문서 클래스는 기본적으로 필요한 작업을report
제공합니다 .\chapter
커널의
\two@digits
.
코드:
\documentclass{book}
\makeatletter
\renewcommand\thechapter{\two@digits{\value{chapter}}}
\makeatother
\begin{document}
\chapter{Test chapter}
\end{document}
달성하려는 제목이 실행 중인 제목인 경우 titlesec
형식을 display
다음 에서 변경하는 데 사용하십시오 block
.
\documentclass{book}
\usepackage{titlesec}
\makeatletter
\renewcommand\thechapter{\two@digits{\value{chapter}}}
\makeatother
\titleformat{\chapter}[block]
{\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter}
{1em}
{}
\begin{document}
\chapter{Test chapter}
\end{document}