MikeTO Posted September 14, 2023 Share Posted September 14, 2023 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 Screen Recording 2023-09-14 at 9.49.56 AM.mov Quote Download a free PDF manual for Affinity Publisher 2.5 Download a quick reference chart for Affinity's Special Characters Affinity 2.5 for macOS Sequoia 15.1, MacBook Pro 14" (M4 Pro) Link to comment Share on other sites More sharing options...
Dan C Posted September 18, 2023 Share Posted September 18, 2023 Apologies for the delay here @MikeTO! Thanks for the file/recording provided - it's certainly appreciated. I believe I understand the issue being reported here and therefore I'm going to log this with our development team now, providing this post for further context. I hope this helps MikeTO 1 Quote Link to comment Share on other sites More sharing options...
MikeTO Posted February 29 Author Share Posted February 29 @Dan C FYI another issue was reported today and I don't think my bug report above captured this basic part of the issue as well as I could have. test2.afpub Open this document and check the Anchors panel - looks good Using the TOC panel, deselect Include as PDF Bookmarks and update the TOC In the Anchors panel - Heading 2 is no longer a child of Heading 1 (as I mentioned in my original post and which is probably okay since they're not being exported but it's still a bit confusing and I don't know why it's necessary). But Heading 1 and 2 still have the PDF export setting selected. Add a new heading an update the TOC - the new heading won't have an associated anchor (but the TOC will still hyperlink to the correct page so it's unneeded). I think turning off Include as PDF Bookmarks should turn off the Export as PDF Bookmark setting for existing TOC anchors. This isn't a big deal for a single TOC because you can just disable bookmarks when exporting, but is a big deal for secondary TOCs. Quote Download a free PDF manual for Affinity Publisher 2.5 Download a quick reference chart for Affinity's Special Characters Affinity 2.5 for macOS Sequoia 15.1, MacBook Pro 14" (M4 Pro) Link to comment Share on other sites More sharing options...
Dan C Posted March 6 Share Posted March 6 Thank you for the further steps and information provided here Mike! I can certainly see the issue and I too would expect the existing Anchors to be affected by this option and not only newly created Anchors after deselecting the option, therefore I've updated this log with our development team and 'bumped' it with them once again. I hope this helps MikeTO 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.