AMS theorems in table of contents

You can incorporate the writing in the .toc file by defining an auxiliary environment; I use xparse because it makes easy to cope with the presence of an optional argument.

documentclass{article}

usepackage{amsthm,xparse}

usepackage{lipsum}

theoremstyle{plain}
newtheorem{theoaux}[subsection]{Theorem}

NewDocumentEnvironment{theo}{o}
 {IfNoValueTF{#1}
   {theoauxaddcontentsline{toc}{subsection}{protectnumberline{thesubsection}Theorem}}
   {theoaux[#1]addcontentsline{toc}{subsection}{protectnumberline{thesubsection}Theorem (#1)}}%
   ignorespaces}
 {endtheoaux}

begin{document}

tableofcontents

section{A section}

lipsum[1]

subsection{A subsection}

lipsum[2]

subsection{A subsection}

lipsum[3-4]

begin{theo}label{theo1}
$0=0$
end{theo}

section{Sec 2}

lipsum[4]

begin{theo}[B. C. Dull]label{theo2}
$1>0$
end{theo}

end{document}

Try this:

documentclass{report}

usepackage{amsthm}

theoremstyle{plain}
newtheorem{theo}[subsection]{Theorem}
newtheorem{satz}[subsection]{Satz}

newcommand{counttosubsec}{arabic{chapter}.arabic{section}.arabic{subsection}}
newcommand{addtheocontentsline}[1]{addcontentsline{toc}{subsection}{counttosubsec quad Theorem~ref{#1}}}
newcommand{addsatzcontentsline}[1]{addcontentsline{toc}{subsection}{counttosubsec quad Satz~ref{#1}}}

begin{document}

tableofcontents
clearpage

section{Sec 1}

addtheocontentsline{theo1}
begin{theo}label{theo1}
Something
end{theo}

section{Sec 2}

addsatzcontentsline{satz1}
begin{satz}label{satz1}
Something else
end{satz}

end{document}

Leave a Comment