GeneralHow to pdfbookmark first page, abstract, etc?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
grinder
Posts: 9
Joined: Sat Oct 24, 2009 3:02 pm

How to pdfbookmark first page, abstract, etc?

Post by grinder »

Hello! Yet another question on pdfbookmark and the hyperref package, I 'm afraid... I want to use it in order to bookmark the first page of my document, as well as the abstract, list of figures/tables, acknowledgments and so on. Chapters and sections work as expected automagically, but I am trying to do the rest manually, however I am not able to do it right. If I use the tocbibind package, then obviously ToC, LoF, LoT are included in the bookmarks, but in the "Contents" as well, which I don't want, plus I still can't bookmark properly my first page, abstract, acknowledgments or other. I am using the report document class and TeX Live 2009 in a Debian Unstable box. Any ideas? Thanx in advance...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

grinder
Posts: 9
Joined: Sat Oct 24, 2009 3:02 pm

How to pdfbookmark first page, abstract, etc?

Post by grinder »

Finally found it! Here's the code:

Code: Select all

\clearpage
\phantomsection
\pdfbookmark[0]{Titlepage}{title} % Sets a PDF bookmark for the title page
\maketitle % Generate the title page

\pdfbookmark[0]{Abstract}{abstract} % Sets a PDF bookmark for the abstract
\chapter*{Abstract}

\clearpage
\phantomsection
\pdfbookmark[0]{\contentsname}{contents} % Sets a PDF bookmark for the Table of Contents
\tableofcontents

\clearpage
\phantomsection
\pdfbookmark[0]{List of Figures}{lof} % Sets a PDF bookmark for the List of Figures
\listoffigures

\clearpage
\phantomsection
\pdfbookmark[0]{List of Tables}{lot} % Sets a PDF bookmark for the List of Tables
\listoftables

\clearpage
\phantomsection
\pdfbookmark[0]{Acknowledgements}{acknowledgements} % Sets a PDF bookmark for the acknowledements
\chapter*{Acknowledgements}
Solution was found here: http://codeinthehole.com/tutorials/thes ... index.html
Post Reply