Add electronic table of contents to PDF

's Avatar


22 Nov, 2015 11:16 AM

The table of contents within Marked works perfectly, however I have no use of a printed ToC in a PDF because the document will only ever be viewed electronically. I would really like the table of contents to be available in Preview's table of contents view. Is this possible?


  1. Support Staff 1 Posted by Brett on 23 Nov, 2015 02:22 PM

    Brett's Avatar

    Intra-document links (links that jump to locations within the document)
    in PDFs are currently impossible with Apple's webkit export, which is
    what Marked uses. I will probably be rewriting a custom exporter from
    scratch, but it's not going to be possible in the immediate future.

    You can use external tools such as wkpdf or PrinceXML to generate the
    PDFs, but clearly that's an inconvenience.


  2. 2 Posted by Dylan Evans on 23 Nov, 2015 11:26 PM

    Dylan Evans's Avatar

    Good to know. Thanks very much.

    Dylan Evans

  3. 3 Posted by josh on 11 Dec, 2015 03:39 PM

    josh's Avatar

    Awesome, Brett - glad this is something you might do, as it would be an really nice to have. I'll look into wkpdf and PrinceXML in the meantime. Thanks!

  4. 4 Posted by Roel Van Gils on 17 Nov, 2016 06:08 PM

    Roel Van Gils's Avatar

    Is it correct that exporting to DOC(X) also doesn't generate a clickable TOC? I can't send off documents to my clients without a working table of contents and sending an HTML file is not an option.

    wkpdf doesn't seem to be maintained anymore and PrinceXML is very expensive.

    Any ideas?

  5. Support Staff 5 Posted by Brett on 17 Nov, 2016 08:01 PM

    Brett's Avatar

    The current DOCX export does not support TOC, no. The limitation is frustrating to me as well. I'm working on a new RTF export that will make this a possibility, but right now the libraries Apple provides have made it very difficult to export intra-document links within a PDF from a web preview.

  6. 6 Posted by Roel Van Gils on 19 Nov, 2016 10:08 AM

    Roel Van Gils's Avatar

    In undestand. What would you suggest as an interim solution (using a third party tool, a command line application or something else). What do you use yourself?

    Right now, this is the only thing missing in to make it really awesome for generating all my documents.


  7. Support Staff 7 Posted by Brett on 21 Nov, 2016 05:05 PM

    Brett's Avatar

    I personally rarely need a TOC in a PDF, so I haven't spent much time
    figuring out alternatives. PDFpen Pro should be able to do it. I believe
    that Ulysses' PDF export can also create one properly (I do have
    intentions of adopting a similar solution, eventually).


  8. 8 Posted by Roel Van Gils on 22 Nov, 2016 10:08 PM

    Roel Van Gils's Avatar

    Thanks for tips. I use Ulysses for writing, but I don't like its export features. That's why I use Marked :) Will look into PDFPen.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac