章/節/備考などに記号でラベルを付ける方法

章/節/備考などに記号でラベルを付ける方法

レポート授業で論文を書いているのですが、以下のような形式にしたいと思っています。

目次

パート I: はじめに

第1章: 歴史

第2章: いくつかの文学

第3章: もう少しおかしな話

章 $\spadesuit$: 主な結果の説明

パート II: 肉厚な部分

第4章: 定理$\spadesuit$.1の証明

などなど。

$\spadesuit$ シンボルなどのシンボルでラベル付けされたセクションを持つ章を作成する方法、つまり、セクション $\spadesuit$.1、セクション $\spadesuit$.2 などを含む章 $\spadesuit$、および定理 $\spadesuit$.1 などを作成し、この章を TOC にそのように表示する方法を知っている人はいますか?

どうもありがとう!A.

答え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}

結果:

ここに画像の説明を入力してください ここに画像の説明を入力してください

関連情報