I like to take my notes in LaTeX, and to help my speed, I use restatable theorems so that I can quickly recall the text and re-insert it into my notes when the professor mentions it. However, the issue is when I want to use the \listoftheorems
command to make a list of all of them at the beginning (to aid in quickly searching my notes), it repeats all the restated theorems. How can I stop it from doing this?
MWE
\documentclass[12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage{amsthm,amsmath,amssymb,amsfonts}
\usepackage{thmtools}
\usepackage{multicol}
\usepackage{mathtools}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=black,
urlcolor=blue,
}
\declaretheorem[numberwithin=chapter]{theorem}
\declaretheorem[numberwithin=chapter]{definition}
\renewcommand{\listtheoremname}{List of Theorems and Definitions}
\begin{document}
\listoftheorems[ignoreall,show={theorem,definition}]
\vspace*{\baselineskip}
\hrule
\begin{restatable}[Defintition 1]{definition}{defn}
This is definition 1
\end{restatable}
\begin{restatable}[Theorem 1]{theorem}{thm}
This is theorem 1
\end{restatable}
We will now restate theorem 1,
\thm*
We will now restate Definition 1,
\defn*
\end{document}