Updated: February 21, 2025
Current Version: "0.3.5"
See the attached TOCSaver_v*.zip
License/Copying: GNU LGPL Version 2 or Version 3 your choice. Any other license terms are only available directly from the author in writing.
Change Log:- v0.1.0 - Initial Release
- v0.2.0 - Added Icon
- v0.3.0 - Skip files not currently part of the manifest
- v0.3.5 - Do not use "hidden" under epub2 (Thank you BeckyEbook!)
Support for this plugin is only provided for Sigil 1.0 or later. This plugin requires Sigil 1.0 or later to even operate.
Description
This plugin is only needed if the current NCX ToC is not based on heading tags (or the heading tags contents are incomplete in some way). It will effectively save the NCX ToC back into the xhtml files so that the ToC Regeneration tools have a chance at recreating something close to the original.
To accomplish this, the plugin parses the current NCX ToC and follows those links back to the destination xhtml files and fragments and if need be either adds the title attribute to the current heading tag or alternatively will inject a hidden heading with display:none set with the appropriate contents.
Before Running on ePub3
This plugin will only parse the NCX ToC. So if you have an epub3 and want to save the Nav ToC, then use Sigil's ePub3 Tools to generate an NCX from the current Nav before launching the plugin.
Notes
Since this plugin could make changes to many xhtml files, it would be either a good idea to make a CheckPoint before running the plugin, or at the very least do a File Save-As under a new name, to make sure nothing is ever lost.
If you do run into cases where the plugin misses things, I would appreciate you PMing KevinH here with a sample epub that illustrates the issue so that the plugin can be made more robust.