View Single Post
Old 05-13-2023, 10:54 AM   #9
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by S3ZAi View Post
Anyway, I wish there was a reverse option: create a html file for each chapter in current TOC.
Another very simple way to split into chapter files is in the Editor. If you have a large html file with many chapters, and each chapter has the same header coding, it is only a couple of clicks.

1. Right-click in the file, and choose "split at multiple locations".
2. Use the wizard. For example, if each chapter in the file starts with <h1 class="chapter">, in the wizard put in tag name=h1, attribute=class, and value=chapter. Click OK and then OK again.
3. You should now have a file for each chapter, so you can use the build TOC from files tool.

(Sometimes I find two or three different classes may make up the chapter headings, heaven knows why...unless there are sub-headings...it's often easiest to edit them to be the same first off. Sometimes it may be an artifact of some earlier conversion, where you might see <h1 class="calibre3"> and <h1 class="calibre4"> or something like that.)
retiredbiker is offline   Reply With Quote