First of all sorry for my bad English. I am designing a book and I have problems with the bookmark
when I compile the file.tex in file.pdf. The chapters appear twice. In my code I don't want to list the chapters, but I want them to appear in the tableofcontents
so I had to use \addcontentsline{toc}{chapter}{chapter name}
to add them to the index, but this causes re-add the chapters in the bookmark
Additionally I'm using the package bookmark
to link the chapters in the page that I desire. What can I do to display the chapters in the tableofcontents and in the bookmark
of file.pdf once?
This is my code:
\documentclass{book}
...
\usepackage{bookmark}
\begin{document}
\chapter*{Presentación} % Presentation of the book
\bookmark[page=2,level=0]{Presentación}
\tableofcontents
\chapter*{Aspectos téncicos} % From here they appear in the index
\bookmark[page=4,level=0]{Aspectos téncicos}
\addcontentsline{toc}{chapter}{Aspectos téncicos}
\end{document}
Best Answer
You don't need to append bookmark instructions for all chapters, nor
\addcontentsline
:I modified the
\frontmatter
and\mainmatter
commands in order not to reset the numbering. Using\pagenumbering{gobble}
doesn't work whenhyperref
is involved, but it's sufficient to kill the normal page style and reset it at\mainmatter
.(I have also omitted the inessential packages, fill them as you prefer.)