1

In some of the books that I have read, in any pdf viewer, there is some kind of tab where i can see the summary of the document, and I can jump to any part (chapter/section) of the document by just clicking on the title on that summary tab.

Well, I can generate a table of contents with texlive With the command \tableofcontents, but this summary is not really linked to the document, and there is no tab showing in the pdf viewer where i can see the summary and jump to parts (chapters/sections). It looks like the summary I am generating with the command \tableofcontents is just some formated text.

My question is : how can I generate a summary which is linked to the document, and which helps to browse the document in a better way.

I am sorry if my question isn't well explained (I really can't find the right words to explain what I need). And for information, I am using texlive under Ubuntu 15.10.

3
  • You're probably looking for \usepackage{hyperref}.
    – wrtlprnft
    Commented Mar 24, 2016 at 9:21
  • Isn't your demand related to the pdf-reader that you are using ?
    – DRi
    Commented Mar 24, 2016 at 9:34
  • @wrtlprnft bro, you are just awesome, it did exactly what I wanted. Please put your answer so I can accept it as the correct one please.
    – Sidahmed
    Commented Mar 24, 2016 at 9:36

1 Answer 1

0

The package you're looking for is hyperref. Just loading it has the effect of turning all internal references (in the table of contents, using \ref, \cite and so on) into clickable links. It also turns your table of contents into bookmarks, which are the feature you're looking for. It also provides (or modifies) the \url command which can produce clickable links to external resources.

Here's a MWE:

\documentclass{article}
\usepackage{hyperref}

\begin{document}
    \section{first section}
    \subsection{first subsection}
    \section{second section}
\end{document}

It may be worth noting that hyperref wants to be loaded as late as possible (i.e. after other packages) because it relies on redefining LaTeX commands that other packages might mess with.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .