# How to add a navigation window to a LaTeX generated PDF document?

Some ( if not most ) pdf ebooks have the option to view the table of contents in a left navigation window. I would like to add this option to my document as well. Question: How to add a navigation window to a LaTeX generated PDF document?

-
well, I believe you can add bookmarks using hyperref. The regular navigation with sectioning commands is done automatically, I believe. At least I have never had to do something special to get it and acrobat shows a navigation pane with contents on all of my documents. –  Roelof Spijker Jan 26 '12 at 11:22
You can always switch on/off the navigation pane, but every pdf has a default view. The option for showing the navigation pane by default is pdfpagemode=UseOutlines. Anyway, you can tell Acrobat to override the documents default settings. –  matth Jan 26 '12 at 12:18
@ndroock1 maybe the following is also interesting for you: tex.stackexchange.com/questions/1820/contents-in-pdf-bookmarks/… –  matth Jan 26 '12 at 12:35

You can use a hyperref package. You'll have to start with a fresh .tex file compilation; i.e. no .aux file. You can add several option to the package as well, read the hyperref documentation. I presume you have your document well sectioned, the hyperref package generates the TOC entries in your viewer for chapters, bibliography, sections, abstract...etc. You might find different outcomes of TOC depending on your documentclass.

Here's a setup I use:

\usepackage{hyperref}
\usepackage{hypcap}

I added the last one as an extra since links should always anchor at the image not the caption.

-
I create my documents with TeXnicCenter, I would be lost otherwise. I hope it is compatible because it does generate .aux files. But let me have a look at hyperref first. –  ndroock1 Jan 26 '12 at 11:38
@ndroock1: The TeX file will generate an aux file eitherway, what I'm saying is that it has to generate a new one. You could simply delete the aux file and let it compile with a new one after you add the hyperref package. –  Ayman Elmasry Jan 26 '12 at 11:43

As has been said, you need to use the hyperref package. Just add the following lines to your preamble:

\usepackage[]{hyperref}
\hypersetup{
pdfkeywords={keyword1, keyword2},
bookmarksnumbered=true,
bookmarksopen=true,
bookmarksopenlevel=1,
pdfstartview=Fit,
pdfpagemode=UseOutlines,    % this is the option you were lookin for
pdfpagelayout=TwoPageRight
}

Usually, hyperref should be loaded as the last package (but every rule has exceptions).

-
–  tohecz Jan 26 '12 at 12:19