Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using thmtools \listoftheorems to generate a list of the theorems that I use in my thesis. So far so good, I've been able to put the list in my table of contents. However, there is no entry for the generated list on the pdf bookmarks, see the image bellow. Can you guys help me or point me to a location where I can fix this issue?

not adding to the bookmarks

Minimal Sample:

% 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}

Thanks in advance, Marcos

share|improve this question
    
It's quite difficult to guess at how you did the insertion of the list of definitions in the table of contents. Please, add a minimal example of your code. –  egreg Dec 26 '12 at 13:47
    
Hi @egreg, I just added the minimal example. Thanks for the tip. –  Marcos Roriz Junior Dec 26 '12 at 14:15
    
Add \clearpage\pdfbookmark{List of Theorems}{theorems} before \listoftheorems –  egreg Dec 26 '12 at 14:36

1 Answer 1

up vote 6 down vote accepted

If the list of theorems should also go in to the table of contents, then \addcontentsline can be used that automatically adds an entry for the bookmarks. Otherwise \pdfbookmark can be used for an entry to the bookmarks only. \cleardoublepage ensures the right page for the anchor setting by \pdfbookmark or \phantomsection, the latter provides the anchor for \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}
share|improve this answer
    
thanks, it worked :) –  Marcos Roriz Junior Dec 26 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.