General ⇒ Add Bookmark of the ToC
Add Bookmark of the ToC
When I open the file that i am working on using latex in a PDF reader, on the left side bar of the PDF reader there is a bookmark. All the chapters, sections are there, but not the ToC. How can I direct so that the ToC link also appear in the bookmark bar in the PDF reader?
Thanks
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Add Bookmark of the ToC
you could use \pdfbookmark:
Code: Select all
\cleardoublepage
\pdfbookmark{\contentsname}{toc}
\tableofcontents
Code: Select all
\documentclass{book}
\usepackage{hyperref}
\begin{document}
\addtocontents{toc}{\protect{\pdfbookmark[0]{\contentsname}{toc}}}
\tableofcontents
\chapter{One}
\section{text}
\end{document}