Quote:
Originally Posted by 1v4n0
Hello, is there a way to split an XHTML file within an EPUB into more files (for example before the headings), while keeping all the correct internal links, such as notes and TOC?
I know I could do this by converting from EPUB to EPUB with calibre, but is there a cleaner way?
Ty 
|
Yes, you can. Just open the epub, set the cursor where you can split the .xhtml file and then go to Edit/Split at Cursor. See the picture below:
Another method is by inserting a split marker. Set the cursor where you want the .xhtml file splitted and then go to Insert/Split Marker.
Once you have inserted all split marker you want, press F6 (or go to Edit/Split at Marker). With this last method and a bit of regex you can split an epub very easily. For example if you want to split the epub before any <h2> tag, you only have to S&R with:
Search: <h2
Replace with: <hr class="sigil_split_marker" /><h2
And that's all. If you want to add split markers with more precition (for example with <h> tags with some class or something similar), you'll need to use regex in S&R.
Regards
Rubén