Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table Of Contents bookmark in Hyperref package

982 views
Skip to first unread message

wempwer

unread,
Nov 23, 2010, 12:00:51 PM11/23/10
to
Hi,

I'm a new user of Latex and have a small problem with \hyperref
package. On the left side of my pdf output document I can see
bookmarks (or hyperlinks, how should I call it?) titled the same as my
chapters, sections etc., can also see two bookmarks named "List of
Figures" and "List of Tables", but there's no "Table of Contents"
bookmark. How can I make it visible too?

GL

unread,
Nov 23, 2010, 12:39:47 PM11/23/10
to

wempwer

unread,
Nov 23, 2010, 2:41:52 PM11/23/10
to
> You can have a look a interfaces:http://www.tex.ac.uk/tex-archive/macros/latex/contrib/interfaces/inte...
>
> Otherwise, \bookmark

I looked at the links you provided but still I have no idea of what
should I do. I tried using \label and \ref from tocloft bu that
doesn't help. I would like my pdf document to look similar to this
one: http://ctan.org/tex-archive/macros/latex/contrib/oberdiek/bookmark.pdf,
with CONTENTS bookmark on the left side that points to the Table Of
Contents but without explicit CONTENTS chapter in the actual Table Of
Contents.

GL

unread,
Nov 23, 2010, 3:57:00 PM11/23/10
to
Le 23/11/2010 20:41, wempwer a �crit :

> On 23 Lis, 18:39, GL<gouail...@gmail.com> wrote:
>> Le 23/11/2010 18:00, wempwer a �crit :

Try this, please !

\documentclass{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref,bookmark,tocloft}
\usepackage{xcolor}
\usepackage{interfaces}

\begin{document}


\tocsetup{
bookmark={text=Contents,bold,color=blue},
label=toc,
title=Table Of The Contents With A Bookmark
}
\tableofcontents

\chapter{Chapter one}
\section{sec one}
\section{sec two}

\end{document}\endinput

wempwer

unread,
Nov 24, 2010, 5:04:26 AM11/24/10
to

Thanks, I tried to build your code but it says that \interfaces
package hasn't been found. I downloaded interfaces.sty and copied it
to the packages folder, and when I build there's no error but I can
see this fragment:

bookmark={text=Contents,bold,color=blue},
    label=toc,
    title=Table Of The Contents With A Bookmark}

literally in the pdf, as if it was usual text and not a code. Maybe I
should install this package in a different way. I use Miktex
distribution.

GL

unread,
Nov 24, 2010, 7:06:39 AM11/24/10
to

This seems weird... I cannot understand how the macro \tocsetup is
expanded then...


Anyway, you need to install the whole bundle: download interfaces.dtx
and save it in the folder you want to install interfaces.sty into.

Then in this folder, run the command line:
etex interfaces.dtx

This will create some .sty files.
Then refresh the file name database and compile.

Interface requires pgfkeys (in pgf).


Regards,
FC

Marcus Frings

unread,
Nov 24, 2010, 7:21:13 AM11/24/10
to
* wempwer <wem...@gmail.com> wrote:

Put these commands

\cleardoublepage
\phantomsection %
\pdfbookmark[0]{\contentsname}{toc} % Adds a PDF bookmark for the TOC.
% You should use \cleardoublepage and \phantomsection as well

right in front of:

\tableofcontents

Gruß,
Marcus
--
"Ist die Zeitkoordinate nur lang genug, sinkt die Überlebensquote auf Null."

wempwer

unread,
Nov 24, 2010, 1:43:46 PM11/24/10
to
On 24 Lis, 13:21, Marcus Frings <iam-est-hora-surg...@despammed.com>
wrote:

> * wempwer <wemp...@gmail.com> wrote:
> > I'm a new user of Latex and have a small problem with \hyperref
> > package. On the left side of my pdf output document I can see
> > bookmarks (or hyperlinks, how should I call it?) titled the same as my
> > chapters, sections etc., can also see two bookmarks named "List of
> > Figures" and "List of Tables", but there's no "Table of Contents"
> > bookmark. How can I make it visible too?
>
> Put these commands
>
> \cleardoublepage
> \phantomsection %
> \pdfbookmark[0]{\contentsname}{toc} % Adds a PDF bookmark for the TOC.
>          % You should use \cleardoublepage and \phantomsection as well
>
> right in front of:
>
> \tableofcontents
>
> Gru ,
> Marcus
> --
> "Ist die Zeitkoordinate nur lang genug, sinkt die berlebensquote auf Null."

Thank you, this worked great. I'm also going to take a look at
interfaces package, I think it could be useful sometimes.

GL

unread,
Nov 24, 2010, 1:55:40 PM11/24/10
to

I think so... unless you use the memoir class. interfaces is designed
to work with the "real" packages not the "emulated ones" !

I'll upload a next version before this week end, release candidate.
It is even more comfortable with keys like
\pagesetup{
foot/inner= ... ,
head/outer/offset= ... ,
}
and a few corrections, that might be important, nevertheless.


Well. It's just the info that if you're not in a hurry, it'll be better
to install the next version 2.4 - release candidate ;-)

0 new messages