장/섹션/비고/등에 라벨을 붙이는 방법 기호가 있는

장/섹션/비고/등에 라벨을 붙이는 방법 기호가 있는

리포트 수업시간에 논문을 쓰고 있는데, 아래와 같은 형식을 갖고 싶습니다.

목차

1부: 소개

1장: 역사

2장: 일부 문헌

3장: 좀 더 엉뚱한 것들

$\spadesuit$ 장: 주요 결과 설명

파트 II: 고기가 많은 것

4장: 정리 $\spadesuit$.1 증명

기타 등등

$\spadesuit$ 기호와 같이 기호를 통해 레이블이 지정된 섹션이 있는 챕터를 만드는 방법을 아는 사람이 있습니까? 따라서 $\spadesuit$ 장은 $\spadesuit$.1 섹션, $\spadesuit$.2 섹션 등으로 이루어져 있습니다. 정리 $\spadesuit$.1 등을 사용하고 이 장이 TOC에 그렇게 나타나도록 하시겠습니까?

정말 감사합니다! ㅏ.

답변1

\thechapter특수 챕터 내에서 챕터 카운터가 인쇄되는 방식(즉, 매크로)을 재정의하고 나중에 복원할 수 있습니다 . 카운터 자체는 여전히 숫자이므로 이전 일반 챕터에 이어 계속 번호를 매기려면 챕터 카운터를 1씩 줄여야 합니다.

MWE:

\documentclass{report}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[chapter]
\begin{document}
\tableofcontents
\part{Introduction}
\chapter{Some history}
\chapter{Some literature}
\chapter{Some more waffly stuff}

\let\theoldchapter\thechapter
\def\thechapter{$\spadesuit$}
\chapter{Statement of the main results}
\section{Result section}
\begin{theorem}
Waffles are tasty
\label{thm:waffles}
\end{theorem}
\let\thechapter\theoldchapter
\addtocounter{chapter}{-1}

\part{The meaty stuff}
\chapter{Proof of Theorem \ref{thm:waffles}}
\end{document}

결과:

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

관련 정보