Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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
    
florian-diesch.de/software/pdfrecycle is a PDFlatex frontend that makes it quite easy to add bookmarks to a PDF –  Florian Diesch Jan 15 '11 at 0:29

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.