Jump to content
You must now use your email address to sign in [click for more info] ×

Anchor generation doesn't work properly for multiple TOCs


MikeTO

Recommended Posts

It's difficult to generate anchors successfully for a book that uses chapter-level TOCs with different heading levels than the main TOC. For example, a book with a main TOC might include Heading 1, 2, and 3 while its chapters might have TOCs that include Heading 2, 3, and 4.

When you generate the main TOC, you'll get properly nested anchors for Heading 1, 2, and 3. You'll also get Heading 4 anchors because Publisher doesn't let you specify the heading levels to use before generation like ID does.

After you've deleted the Heading 4 anchors, you would generate the chapter TOCs and deselect Heading 1. Unfortunately, this will move the Heading 2 anchors out from under Heading 1 which will break the PDF bookmark hierarchy. And new Heading 4 anchors will be created but they won't be children of Heading 3.

If you refresh the main TOC the Heading 2 ones will become children of Heading 1 again but the Heading 4 anchors will still be strays. If you disable Export as PDF Bookmark for the Heading 4 anchors they'll just re-enable when you update the chapter-level TOCs.

I've attached a screen recording and test document to demonstrate the issue. The problem is that the user would want the main TOC to drive the PDF bookmarks, excluding Heading 4, but also want Heading 4 in the chapter-level TOCs to be linked to the right page.

One solution might be:

  • Introduce a concept of a main TOC and set "Export as PDF bookmark" only for its headings. I'd just use the first TOC as the main because it's most likely to be the main.
  • Headings unique to chapter-level TOCs would still generate anchors but would have "Export as PDF bookmark" disabled for headings not in the main TOC to not interfere with the PDF bookmarks
  • Change the Update All TOCs feature to update the main TOC after any subsequent TOCs - this would presumably fix Preflight, too

For anybody encountering the issue, here's a workaround but you can't include Heading 4 in your chapter-level TOCs (or any heading level that isn't in the main TOC) because there's not workaround for that. For the example I've given above, edit the Heading 3 text style and change Next Level to Same Style. It's okay to base Heading 4 on Heading 3 but you don't want Heading 3 to be connected to Heading 4. Remove Heading 4 from the chapter-level TOCs. After you have your TOCs set up, each time you want to update your TOCs, update all TOCs (through the TOC panel or Preflight > Fix) first and then update the main TOC independently.

TOC test 211.afpub

 

 

Download a free manual for Publisher 2.3 from this forum - expanded 260-page PDF

Affinity 2.3.1 for macOS Sonoma 14.3, MacBook Pro 14" (M1 Pro)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.