I am using the amsthm
package. I defined some enviroments like
\theoremstyle{plain}
\newtheorem{theo}[subsection]{Theorem}
\newtheorem{satz}[subsection]{Satz}
the numbering works as expected, counting the theorems as if they where subsections. However I also want them to appear in the table of contents as if they were subsections.
UPDATE
To be more precise, say I have the following document:
\begin{document}
\tableofcontents
\chapter{Chapter One}
\section{Section A}
\begin{theo}[First Theorem]
Whatever.
\end{theo}
\section{Section B}
\begin{theo}[Second Theorem]
Whatever.
\end{theo}
\chapter{Chapter Two}
\section{Section A}
\begin{theo}[Third Theorem]
Whatever.
\end{theo}
\begin{theo}[Fourth Theorem]
Whatever.
\end{theo}
\end{document}
I want my table of contents to look like this
1. Chapter One
1.1 Section A
1.1.1 First Theorem
1.2 Section B
1.2.1 Second Theorem
2. Chapter Two
2.1 Section A
2.1.1 Third Theorem
2.1.2 Fourth Theorem
Best Answer
You can incorporate the writing in the
.toc
file by defining an auxiliary environment; I usexparse
because it makes easy to cope with the presence of an optional argument.