LiveTOC converts a manually created table of contents (TOC) into a fully live InDesign TOC.
The script:
The result is a table of contents whose page numbers update automatically if the document is edited and headings move from one page to another.
Since the page numbers are implemented as native InDesign cross-references, it is not necessary to rerun the script after page numbers change. The TOC entries will continue to display the correct page numbers automatically.
LiveTOC is particularly useful when you need a customized TOC design that cannot easily be generated using InDesign’s built-in Table of Contents feature.
Once created, the page numbers remain live and update automatically as the document changes.
LiveTOC behaves differently depending on the current selection.
| Current Selection | Result |
|---|---|
| Nothing selected | Opens the Preferences dialog |
| One paragraph or less selected | Runs in Single Paragraph Mode |
| Multiple paragraphs selected | Runs in Multi-Paragraph Mode |
To open the Preferences dialog, ensure that nothing is selected in the document (Edit > Deselect All) and run the script.
These options will be described below in order.
Note: If an insertion point is active but no text is selected, LiveTOC displays an error message and does not run:

Choose one or more paragraph styles that identify chapter headings throughout the document. Click the + and − buttons to add or remove paragraph styles dropdowns.
LiveTOC searches only paragraphs using the selected styles.
Up to 20 paragraph styles may be specified.
Choose one of the following:
The second option is useful when a publication is split across multiple InDesign documents.
Choose how LiveTOC identifies the page number location within each TOC entry.
Choose this option if your TOC has existing page numbers:

The script replaces the existing page number at the end of the entry with a live cross-reference.
Choose this option to replace ‘000’ anywhere in the TOC entry with a live page number.
This is especially useful for non-standard tables-of-contents where the page number does not appear at the end of the TOC entry.

The script replaces the ‘000’ placeholder, wherever it appears, with a live cross-reference.
In this mode, no page-number cross-references are created. Hyperlinks may still be created, converting the entire chapter-title into a clickable hyperlink.
This option is useful for ePub workflows. EPubs do not have page numbers, but you may nevertheless want to allow the user to click on an entry in the TOC and be taken to the appropriate chapter in the ePub.
These options determine how LiveTOC extracts chapter titles from TOC entries when multiple paragraphs are selected.
Choose the word at which the chapter title begins (options range from 1st word through 12th word).
Choose where the chapter title ends.
Available delimiters: Tab, Right-indent tab, Regular space, En space, Em space, End of paragraph, and Colon (:)
![]()

If the title begins at the 3rd word and ends at the right-indent tab, the extracted title would be: “Back to Western Rationalism”.
Explanation: Word 1 = ‘Chapter’. Word 2 = ‘4’. Word 3 = ‘Back’. From ‘Back’ up to the right-indent tab = “Back to Western Rationalism”.
When enabled, LiveTOC creates clickable hyperlinks from TOC entries to their corresponding headings.
When enabled, LiveTOC displays warnings when entries cannot be processed.
Single Paragraph Mode is activated when one paragraph or less is selected.
In this mode, LiveTOC ignores the title extraction settings described above.
Instead, it searches using the exact selected text.
For example, if the selected text is:

the script searches directly for “Revolutionary Nature” within the selected heading styles.
This mode is useful when:

If the selected text appears in multiple eligible headings, the script displays a dialog listing all matches and their page locations. You can then choose which occurrence should be used as the destination.
The script attempts to pre-select the most likely destination based on page order.
If no matching heading is found:
Multi-Paragraph Mode is activated when more than one paragraph is selected.
This is the standard mode for processing an entire TOC.
For each selected paragraph:
If the specified delimiter cannot be found in a TOC entry, that entry is skipped.
If multiple matching headings are found, LiveTOC prompts you to choose the correct destination (see above, “Multiple Matches”).
If no matching heading is found, the entry is skipped.
LiveTOC performs case-insensitive searches.
It also ignores forced line breaks inside headings.
For example, the TOC entry:
Chapter Title
will match a heading formatted as:
Chapter
Title
… provided that a forced line break separates the two lines (Shift + Enter) and not a full paragraph break (Enter alone).
Depending on your settings, LiveTOC may report:
These messages are intended to help identify entries that require manual correction.
