Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I used the following code and I am able to link references, List of Symbols but unable to link the Table of Contents in my thesis. I wish a completely linked PDF of my thesis. Please help me....

\usepackage[%
%\ifpdf
 pdftex,
%\else
% dvipdf,
%\fi
% ps2pdf, % using ps2pdf vs pdftex
% colorlinks=true, % color the words instead of use a colored box
% urlcolor=blue, % \href{...}{...} external (URL)
% filecolor=blue, % \href{...} local file
% linkcolor=black, % \ref{...} and \pageref{...}
% citecolor=black, % \cite{}
pdfborder={0 0 0}, % for removing borders around links
letterpaper=true,
plainpages=false,
% plainpages boolean true
% Forces page anchors to be named by the arabic form of the page number,
% rather than the formatted form.
breaklinks=true,
% breaklinks boolean false
% Allows link text to break across lines; since this cannot be accommodated in
% PDF, it is only set true by default if the pdftex driver is used. This makes
% links on multiple lines into different PDF links to the same target.
pagebackref=true,
% Adds ?backlink? text to the end of each item in the bibliography, as a list
% of section numbers. This can only work properly if there is a blank line
% after each \bibitem.
bookmarksnumbered=true,
% bookmarksnumbered boolean false
% If Acrobat bookmarks are requested, include section numbers.
bookmarksopen=true,
% bookmarksopen boolean false
% If Acrobat bookmarks are requested, show them with all the subtrees expanded.
pdftitle={PhD Thesis},
pdfauthor={Jonathan M. McCune},
pdfsubject={Carnegie Mellon University},
pdfkeywords={},
pdfpagelabels=true,
pdfpagemode=UseOutlines % None, UseThumbs, UseOutlines, FullScreen
]{hyperref}
share|improve this question
    
Adding lintocpage to the options of hyperref will help? –  Harish Kumar Aug 2 '12 at 4:21
add comment

2 Answers

Probably you mean that the table of contents is not in the bookmarks (outlines). It is debatable, whether the table of contents should have an entry for itself. But for the bookmarks it is IMHO ok, because they are just a navigational help. I use the opportunity to comment some option settings for hyperref. Additional bookmarks can be set using \pdfbookmark as shown in the example, see documentation of hyperref. To avoid links to wrong pages, it is important that \pdfbookmark is on the same page. Ensuring a page break before makes this easier.

\documentclass{article}

\usepackage[
  % Some remarks:
  % * drivers like 'pdftex' that can be detected automatically
  %   are not necessary
  % * breaklinks is rather an internal option.
  %   If a driver does not support it, then forcing the option
  %   let the text break across lines, but also the link
  %   areas are "broken". If the driver supports the option,
  %   then the option is enabled anyway.
  % * Information entries should be set outside,
  %   because LaTeX expands the package options,
  %   hyperref does not like them, if they are
  %   prematurely expanded.
  % * Hyperref has a new option for hiding links: hidelinks
  hidelinks,
  letterpaper,
  pagebackref,
  bookmarksopen,
  bookmarksnumbered,
]{hyperref}
\hypersetup{
  pdfauthor={...},
  % ...
}
% Adding package bookmark improves bookmarks handling.
% More features and faster updated bookmarks.
\usepackage{bookmark}

\begin{document}
Title

\newpage% or \cleardoublepage
% \pdfbookmark[<level>]{<title>}{<dest>}
\pdfbookmark[section]{\contentsname}{toc}
\tableofcontents

\section{Introduction}
\section{Main}
\end{document}

enter image description here

share|improve this answer
add comment

I had this same problem. My fix is kind of messy but does the job for me. Hope it helps you

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Table of contents}
\tableofcontents
\cleardoublepage

(note that I use \cleardoublepage to ensure that each new section begins on an odd-numbered page for printing purposes)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.