View Single Post
Old 06-18-2021, 01:12 AM   #28
jonesyb
Enthusiast
jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.jonesyb can do the Funky Gibbon.
 
Posts: 36
Karma: 82258
Join Date: May 2021
Device: kindle
Quote:
Originally Posted by hobnail View Post
If you're consistent with your chapter titles, for example, I use h2 tags for chapter titles then you can use Sigil's insert split marker (ctl+shift+return) to have as a copy of what you're going to replace/change to. E.g., insert it just after the body line. Select the entire line with the split marker, ctl+x to cut it, then go down to the search and replace and put it in the Replace: box at the bottom. Above it in the Find: box put <h2, then in the Replace: box add that same <h2 at the end of the Replace: box. So then when you do replace all, all of the <h2s become split markers with an <h2 at the end of their line (or maybe on the next line). You can then use Mend and Prettify to add in line breaks after the split markers. Then do Split at Markers (f6). If you get it right you can have the .xhtml file names match the chapter numbers.
I also use h2s for my chapters and this would work nicely. Thanks for the tip.
jonesyb is offline   Reply With Quote