# How to get the bookmark and the index (tableofcontents) with links to each section

I want to make a book without chapters are listed. Have an index (also don't want that chapters are listed in the index) and have the bookmark in the file.pdf. The problem is that I appear twice sections in bookmark. I'm using the package bookmark because hyperref not supported \pagenumbering{gobble} and use this command to suppress the numbering of pages and start it again after tableofcontents.

What I can do to have the bookmark, where sections appear only once, and get the index (tableofcontents) with links to each section?

MWE

\documentclass{book}
...
\usepackage{bookmark}

\begin{document}
\pagenumbering{gobble}
\chapter*{Presentation} %Presentation of the book
\bookmark[page=2,level=0]{Presentation}

\tableofcontents

\pagenumbering{arabic}
\setcounter{page}{4}

\chapter*{Test 1}
\bookmark[page=4,level=0]{Test 1} % places the first bookmarks
\addcontentsline{toc}{chapter}{Test 1} % places the second bookmarks

\end{document}


-

Some remarks:

• \addcontentsline{toc}{...}{...} already adds a bookmark.
• I have disabled the page anchors for the pages with \pagenumbering{gobble} to avoid conflicts with page destinations for different pages, but the same destination name, because \thepage is empty.
• \pdfbookmark can be used here that automatically sets an anchor and avoids an explicit page number specification.
• Also I have added \cleardoublepage/\newpage to ensure the correct page, where \pagenumbering or \pdfbookmark are executed.

The example file:

\documentclass{book}
\usepackage{hyperref}
\usepackage{bookmark}

\begin{document}
% ...
\cleardoublepage
\pdfbookmark{Presentation}{Presentation}
\pagenumbering{gobble}
\hypersetup{pageanchor=false}
\chapter*{Presentation} %Presentation of the book

\tableofcontents

\newpage
\hypersetup{pageanchor=true}
\pagenumbering{arabic}
\setcounter{page}{4}

\chapter*{Test 1}
\addcontentsline{toc}{chapter}{Test 1} % places the second bookmarks

\end{document}

-
Thanks @Heiko Oberdiek, your answer helped me a lot. –  lbautista May 14 at 22:42