섹션 번호 앞의 자동 섹션 제목 및 섹션 제목

섹션 번호 앞의 자동 섹션 제목 및 섹션 제목

저는 3가지 일을 하려고 합니다.

  1. 각 섹션에 대해 섹션 제목을 자동으로 반복합니다(예: "장").
  2. 섹션 번호 앞에 섹션 제목을 입력합니다(예: "1장"이 아닌 "1장").
  3. 각 섹션 번호를 2자리로 만듭니다(예: "Chapter 01"이 아닌 "Chapter 1").

저는 이 3가지 작업을 각각 개별적으로 수행하는 방법을 찾을 수 있었지만 전부는 아닙니다.

답변1

  1. 표준 book및 문서 클래스는 기본적으로 필요한 작업을 report제공합니다 .\chapter

  2. 표준 book및 문서 클래스는 기본적으로 필요한 작업을 report제공합니다 .\chapter

  3. 커널의 \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}

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

관련 정보