# List of Theorems not in pdf readers index

I am using memoir and the \listoftheorems of the thmtools package. And while it seems to beautifully work and integrate in the table of contents, it does not appear in the index listing of the pdf reader (I used okular).

Is there a setting to make it appear there?

Here is an MWE creating a list of theorems and a table of contenst. The former appears in the latter, but not in the index of the pdf reader.

\documentclass{memoir}

\usepackage{amsthm}
\usepackage{thmtools}

\RequirePackage[
bookmarksnumbered=true,
pdfpagemode=UseOutlines,
bookmarksopen=true
]{hyperref} % not working?

\newtheorem{theorem}{Theorem}[section]

\begin{document}

\tableofcontents

\listoftheorems

\chapter{My}
\begin{theorem}
My first theorem.
\end{theorem}

\begin{theorem}
My second theorem.
\end{theorem}

\section{Awesome}
\section{Table}

\begin{theorem}
My third theorem.
\end{theorem}
\chapter{Of}
\section{Contents}
\section{Is}
\section{Here}

\end{document}


Unrelated but, you should probably load hyperref last

This seems to help:

\usepackage{xpatch}
\xpatchcmd{\listoftheorems}{\@fileswfalse}{}{\typeout{yes}}{\typeout{no}}


thmtools (through thm-listof.sty) defines \listoftheorems via a local redefinition of \listoffigures. In this definition we find \@fileswfalse which in this case causes List of Theorems to not be added to the PDF bookmarks (no idea why). At least it comes back if I add the two lines above (after thmtools)

• awesome, thanks, it works now! I found the line in thm-listof.sty that you mentioned. But I do not understand what your \typeoutcommand does. Could you add this shortly to the answer? The help I found here just said it prints a message to the terminal and the log file. – ciem Oct 30 '17 at 12:59
• You can remove those. They just write to the log, whether or not the patching went well. Note: don't change anything in thm-listof.sty – daleif Oct 30 '17 at 13:08
• And I adjusted my question so hyperref is loaded last. – ciem Oct 30 '17 at 16:49
• @daleif this solution crashes with too many bookmarks, see here – Ben Feb 27 at 11:27

Another solution:

\documentclass{memoir}

\RequirePackage[
bookmarksnumbered=true,
pdfpagemode=UseOutlines,
bookmarksopen=true
]{hyperref} % not working?

\usepackage{amsthm}
\usepackage{thmtools}

\newtheorem{theorem}{Theorem}[section]

\begin{document}

\tableofcontents

\begingroup
\phantomsection\pdfbookmark{\listtheoremname}{\listtheoremname}
\listoftheorems
\endgroup

\chapter{My}
\begin{theorem}
My first theorem.
\end{theorem}

\begin{theorem}
My second theorem.
\end{theorem}

\section{Awesome}
\section{Table}

\begin{theorem}
My third theorem.
\end{theorem}
\chapter{Of}
\section{Contents}
\section{Is}
\section{Here}

\end{document}

• Thanks, I also liked the answer and upvoted it. Unfortunately, that will only have an effect when I have more than 15 rep points. – ciem Oct 30 '17 at 13:00
• Wont this fail if the list of theorems is rather long (fail as in point to the wrong page) – daleif Oct 30 '17 at 13:09
• @daleif you are right. But if I reverse the order has much less posibilities to fail. I didn't manage to make it fail... Editing. – koleygr Oct 30 '17 at 13:28
• @ciem you have them :) – koleygr Oct 30 '17 at 13:31
• @koleygr yes (: – ciem Oct 30 '17 at 13:44