Skip to main content

Bookmark & Create TOC

Bookmark & Create TOC · Bookmark & Create TOC (Multi) · Bookmark All Paragraphs

Kaizen Plugin ⚡ tab → TOC Tools group

Automatically add bookmarks to all headings in a topic and generate a table of contents with bookmarked links. This creates an in-topic navigation system.

Single File Version​

To create bookmarks and TOC for the current topic:

  1. Open the topic file.
  2. Click Bookmark & Create TOC in the TOC Tools group.
  3. Bookmarks are added to all headings (h1-h6).
  4. A TOC with bookmarked links is created at the top of the topic.

Multi-File Version​

To create bookmarks and TOC across multiple files:

  1. Click Bookmark & Create TOC (Multi) in the TOC Tools group.
  2. Select the topic files you want to process.
  3. Bookmarks are added to all headings in each file.
  4. A master TOC is generated linking to all bookmarked headings across files.

Variables and Inline Markup in Headings​

TOC entry titles are built from the full heading text:

  • A <MadCap:variable> in a heading becomes its Flare expression (for example [%=General.Product%]) in the TOC entry title - even when the variable is wrapped in a <span>, <MadCap:conditionalText> or other inline element. The TOC editor shows the expression literally (matching Flare's own behavior) and the build output resolves it to the variable's value, so titles stay up to date when variable definitions change.
  • Text inside inline markup (<b>, <i>, <span>, <sup>, <sub>, links, ...) is kept in the title.
  • Bookmark anchors and index keywords are excluded from the title.

Bookmark All Paragraphs​

To add an auto bookmark to every paragraph in the current topic (for deep links to individual paragraphs, e.g. numbered requirements):

  1. Open the topic file.
  2. Click Bookmark All Paragraphs in the TOC Tools group.
  3. Every paragraph gets an <a name="p_N"> anchor (p_1, p_2, ... in document order). Auto-numbered paragraphs are bookmarked too - the anchor does not affect the numbering.

Notes:

  • Paragraphs that already contain a named anchor are skipped, and numbering continues above the highest existing p_N, so re-running after edits neither duplicates nor renumbers anchors.
  • Empty paragraphs are skipped.
  • A backup of the topic is created before the anchors are added (see Backup and Restore).

Use Cases​

  • Create single-file manuals with jump navigation
  • Generate quick reference guides
  • Build long-form content with internal navigation
  • Create PDF documents with clickable TOCs
  • Deep-link to individual paragraphs (Bookmark All Paragraphs)