Text Formattingbookmark and toc problem

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
casperyc
Posts: 50
Joined: Thu Oct 15, 2009 11:23 pm

bookmark and toc problem

Post by casperyc »

Hi,

I wanted to have a toc in bookmark to I used

Code: Select all

\tableofcontents
\addcontentsline{toc}{section}{Table of Contents}
then the output got an 'entra' toc, how can I delete that?

Thanks.

casper
toc.jpg
toc.jpg (38.31 KiB) Viewed 3165 times

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

bookmark and toc problem

Post by Stefan Kottwitz »

Hi Casper,

try

Code: Select all

\pdfbookmark[1]{\contentsname}{toc}
Perhaps \clearpage and \phantomsection right before that and the \tableofcontents.


Stefan
LaTeX.org admin
casperyc
Posts: 50
Joined: Thu Oct 15, 2009 11:23 pm

bookmark and toc problem

Post by casperyc »

Stefan_K wrote:Hi Casper,

try

Code: Select all

\pdfbookmark[1]{\contentsname}{toc}
Perhaps \clearpage and \phantomsection right before that and the \tableofcontents.


Stefan

Hi Stefan,

I used

Code: Select all

\clearpage
\tableofcontents
\pdfbookmark[1]{\contentsname}{toc}
then, when I click the bookmark, it goes to the last bit of the toc instead of the beginning of the toc,any idea?

Thanks.

casper
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: bookmark and toc problem

Post by Stefan Kottwitz »

Call \pdfbookmark after \clearpage and before \tableofcontents.

Stefan
LaTeX.org admin
casperyc
Posts: 50
Joined: Thu Oct 15, 2009 11:23 pm

Re: bookmark and toc problem

Post by casperyc »

yes that makes sense.
i was a bit stupid about that.

Thanks.

casper
Post Reply