![\listoftheorems 未出现在 pdfbookmark 上](https://linux22.com/image/260464/%5Clistoftheorems%20%E6%9C%AA%E5%87%BA%E7%8E%B0%E5%9C%A8%20pdfbookmark%20%E4%B8%8A.png)
我正在使用 thmtools \listoftheorems 生成我在论文中使用的定理列表。到目前为止一切顺利,我已经能够将列表放入我的目录中。但是,pdf 书签上没有生成的列表的条目,请参见下面的图片。你们能帮我吗?或者告诉我一个可以解决这个问题的地方?
最小样本:
% DOC CLASS
\documentclass[10pt,a4paper]{report}
% PACKAGES
\usepackage[pdftex,bookmarks=true]{hyperref}
\usepackage[utf8x]{inputenc}
\usepackage{lipsum}
\usepackage{amsthm}
\usepackage{thmtools}
% METADATA
\author{Marcos}
\title{TeX StackExchange Minimal Doc}
% THEOREM DEF
\declaretheorem[thmbox=M,name=Definition]{definition}
% DOCUMENT
\begin{document}
\maketitle
\pdfbookmark{Table of Contents}{contents}
\tableofcontents
\listoftheorems\clearpage
\section{First Section}
\begin{definition}[TeX StackExchange]
TeX StackExchange is a nice place! =)
\end{definition}
\lipsum
\subsection{First Subsection}
\begin{definition}[StackExchange]
StackExchange is a great platform too!
\end{definition}
\lipsum
\section{Second Section}
\lipsum
\end{document}
提前致谢,马科斯
答案1
如果定理列表也应该进入目录,那么\addcontentsline
可以使用 来自动添加书签条目。否则,\pdfbookmark
只能使用 来添加书签条目。通过或\cleardoublepage
确保锚点设置的正确页面,后者为 提供锚点。\pdfbookmark
\phantomsection
\addcontensline
\documentclass[10pt,a4paper]{report}
% PACKAGES
\usepackage[pdftex,bookmarks=true]{hyperref}
\usepackage[utf8x]{inputenc}
\usepackage{lipsum}
\usepackage{amsthm}
\usepackage{thmtools}
\renewcommand*{\contentsname}{Table of Contents}
\usepackage{bookmark}
\bookmarksetup{
open,
openlevel=1,
numbered
}
% METADATA
\author{Marcos}
\title{TeX StackExchange Minimal Doc}
% THEOREM DEF
\declaretheorem[thmbox=M,name=Definition]{definition}
% DOCUMENT
\begin{document}
\hypersetup{pageanchor=false}% removes warning about duplicate destination `page.1'
\maketitle
\cleardoublepage
\hypersetup{pageanchor=true}
\pdfbookmark{\contentsname}{contents}
\tableofcontents
\cleardoublepage
% \pdfbookmark{\listtheoremname}{theorems}
\phantomsection\addcontentsline{toc}{chapter}{\listtheoremname}
\listoftheorems\clearpage
\chapter{First Chapter}
\section{First Section}
\begin{definition}[TeX StackExchange]
TeX StackExchange is a nice place! =)
\end{definition}
\lipsum
\subsection{First Subsection}
\begin{definition}[StackExchange]
StackExchange is a great platform too!
\end{definition}
\lipsum
\section{Second Section}
\lipsum
\end{document}