Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like when PDF files have a pane that has the table of contents in it.

How do you generate this?

I don't know much about PDF file generation, but if I want to write a book in PDF format, I want there to be a TOC so the reader knows where they are in the book.

share|improve this question

They're called "bookmarks". See your PDF tool's documentation for how to create them.

share|improve this answer

First of all, one doesn't "write a book in PDF format." PDFs aren't generally made to be editable at that level. It can be done in theory, but practically you'll be creating your document in another program/format like Word, OpenOffice, TeX, DocBook, or HTML then converting it to PDF later.

The bookmarks and TOC are going to be dependent on the application that you write your document in, and how it gets converted to a PDF.

If your source document has a TOC that's linked to the destinations within the document and you use some sort of PDF export that knows how to use that information, then it can create a PDF with your TOC linked internally.

For example, if you use Word, and create a TOC in your doc that works, then use it's native Save As PDF feature (or Acrobat's PDF Maker, or PDF-T-Maker), then it will create all those bookmarks for you.

If you're using Notepad and PDFCreator to "Print to PDF", it's not going to work.

Other file types depend on how they get converted to PDF. Acrobat can take HTML pages (websites) and build the bookmarks.

share|improve this answer

OpenOffice will create PDFs with a Table Of Contents. Choose Tagged PDF from the File, Export PDF dialogue.

Since PDFLaTeX supports PDF hotlinks and bookmarks, I suspect that this can be accomplished with many of the large number of toolsets that use PDFLaTeX (few of which require actually knowing LaTeX or TeX). This article says

The table of contents (produced as usual with the \tableofcontents command) will automatically have each entry as a hyperlink. By default, the headings rather than the page number will be the hyperlink to the relevant chapter etc. The option linktocpage will swap this round. If the option bookmarks is set, a set of PDF bookmarks will be created, allowing you to navigate your way around the document. The bookmarks can be viewed in Acrobat Reader either by clicking on the bookmarks tab, or selecting the menu option

One such toolset is Pandoc. Comments in its markdown2pdf source suggests it generates PDF bookmarks.

share|improve this answer is a PDFlatex frontend that makes it quite easy to add bookmarks to a PDF – Florian Diesch Jan 15 '11 at 0:29

Add this to your LaTex document

\usepackage[pdftex,colorlinks=true, pdfstartview=FitV, linkcolor=red, citecolor=blue,

share|improve this answer

If you're using Microsoft Word and Microsoft's add-on or extension that lets you save as PDF (I can't find the name or link to it), then there's an option to create the bookmarks. It's off by default.

Click on the Options button and then check the box "Create bookmarks using:"

share|improve this answer

You must log in to answer this question.

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