10-11-2024, 11:27 AM | #1 |
Member
Posts: 20
Karma: 10
Join Date: Sep 2014
Device: Kindle
|
Sigil automatic splitting of document
In the past, when I have loaded an epub into Sigil, all the chapters or sections have been automatically split into separate files. I have just loaded an epub generated in Indesign and the whole book is in one file despite the fact that Kindle Previewer shows separate pages. I can see instances of:
Code:
<div id="page2" role="doc-pagebreak" aria-label="2" epub:type="pagebreak" /> |
10-11-2024, 12:16 PM | #2 |
Well trained by Cats
Posts: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Search&Replace those with the Sigil split marker: (it is on the tools menu)
<hr class="sigil_split_marker" /> Once done: F6 (executes the split) |
10-11-2024, 12:52 PM | #3 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
You probably do not want to split on every page break. Especially if this is not a fixed layout epub. Try looking for heading tags.
|
10-11-2024, 01:59 PM | #4 |
Member
Posts: 20
Karma: 10
Join Date: Sep 2014
Device: Kindle
|
Many thanks!
The split marker is not on the tools menu in 2.0.0 but on the Insert menu, which foxed me for a bit! OK that works and many thanks. May I ask a supplementary - can I select text and then comment it out? There appears to be no toolbar button to do this in 2.0.0
|
10-11-2024, 02:03 PM | #5 |
Member
Posts: 20
Karma: 10
Join Date: Sep 2014
Device: Kindle
|
Yes, maybe you are right - I do want some page breaks in the front matter of my book but the manual job is then much less.
|
10-11-2024, 04:12 PM | #6 | |
A Hairy Wizard
Posts: 3,225
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
To comment in HTML, place a <!-- tag before the comment text and a --> tag after the comment text. In Sigil you can create a clip like this:
Quote:
|
|
10-11-2024, 04:15 PM | #7 | |
Well trained by Cats
Posts: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You can just paste that string into the Replace. You are not limited to that original pattern. Any Search can me used. Just be careful when using Replace All. I sometime use Replace-Next and skip (click find) if needed. |
|
10-18-2024, 06:10 AM | #8 |
Member
Posts: 20
Karma: 10
Join Date: Sep 2014
Device: Kindle
|
Many thanks for the excellent advice!
|
10-29-2024, 02:51 AM | #9 | |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
The displayed pagebreaks will be set in the CSS of a tag, probably the headings. Look in the stylesheet and you will find something like: h2 {page-break-before: always; .... You can use those to split the file into more manageable chunks. If not too many, just manually search for <h2 and split, or do S&R to replace <h2 (or whatever the heading was) with <hr class="sigil_split_marker" /><h2 then "Edit/Split at markers" Then remove the "pagebreak" from the CSS as redundant. And also check if any blank pages were created by the split. Just delete those. You will need to check if the TOC is correct (it may be if it linked to anchors), or regenerate it if not. Last edited by AlanHK; 10-29-2024 at 02:53 AM. |
|
11-01-2024, 06:30 AM | #10 |
Member
Posts: 20
Karma: 10
Join Date: Sep 2014
Device: Kindle
|
Thanks AlanHK
Good advice, gratefully received!
|
Tags |
epub 3.0, indesign cc, sigil |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding multiple pages to a Sigil document | Arran | Sigil | 9 | 09-04-2015 06:02 AM |
Does having two different fonts in original document screw up Sigil/ebook? | Gregg Bell | Sigil | 5 | 07-29-2015 01:48 AM |
cleaning up a word document in Sigil | BeccaPrice | Sigil | 9 | 10-08-2011 04:06 PM |
Stop Automatic Code cleaning in Sigil | ericp20 | Sigil | 11 | 05-27-2011 09:52 AM |
Automatic cleaning by Sigil | roger64 | Sigil | 7 | 03-18-2011 03:52 AM |