Hi natema,
welcome to the forum!
That question here was posted before TeX StackExchange was opened.

Our forum has a long history, back to 2007.
So, a good occasion to answer it! I would do it differently to the suggestions at StackExchange.
- defining the undefined \@dotsep would remove the error, yes, but the lists would be inconsistent: the list of theorems would have dots, list of tables and figures would not have dots.
- copying and editing the corresponding internal macros takes time and space (53 lines there), and can lead to an error if thmstools would be changed.
So, instead of patching, we could (re)define
\@dottedtocline
to behave like ams book's
\@tocline
, that is, to call that one. We won't have dotted toc lines anyway.
Simple solution, 1 line plus the usual \makeatletter/other:
Code: Select all
\makeatletter
\def\@dottedtocline#1#2#3#4#5{\@tocline{#1}{0pt}{#2}{#3}{}{#4}{#5}}
\makeatother
Complete code:
Code: Select all
\documentclass{amsbook}
\usepackage[english]{babel}
\usepackage{thmtools}
\declaretheorem{theorem}
\makeatletter
\def\@dottedtocline#1#2#3#4#5{% redefined for consistency
\@tocline{#1}{0pt}{#2}{#3}{}{#4}{#5}}
\makeatother
\begin{document}
\listoftables
\listoftheorems
\begin{theorem}
This is my favorite theorem.
\end{theorem}
\begin{table}
\caption{This is my favorite table}
\end{table}
\end{document}
Stefan