![]() |
#1 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Splitting a book
I've recently bought a book which contains a single source file, 1.6MB in size. Is there any facility in the editor to automatically split it (eg by chapters) into more manageable pieces?
Thanks! |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,942
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
In the Preview pane (one of the few places it is used for other than viewing): click the folded paper icon, then drag the green line to the split spot: Click There is a Bulk split, but I have not learned to use that (I am still stuck on Sigil-think where I just use the REGEX to insert a Sigil_Split marker. the execute the Split with a <F6>) |
|
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
The Editor uses Xpath (right-click in code view) in the same way as on the convert Look&Feel page. If the existing code doesn't easily lend itself to the Xpath approach, I guess you could also use a kind-of-Sigil-split-marker-type approach by using regex to insert some <h2></h2> or <h3></h3> dummy headers (if they don't already exist), then remove them after the split.
|
![]() |
![]() |
![]() |
#4 |
Zennist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
Assuming there is some sort of specific headline style at the beginning of each chapter which doesn't appear later on in the chapter -- and this is often the case -- then in the css stylesheet under that style you could add:
page-break-before: always; Then do a Calibre conversion and make sure under "EPUB Output" that "Do not split on page breaks" is unchecked. --Pat |
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,942
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
260K max is the MRSDK rule if you want a reliable book on older devices. |
|
![]() |
![]() |
![]() |
#6 | |
Zennist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,022
Karma: 47809468
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
|
Quote:
This should work to produce a single file for each chapter, so long as the style element you give that line to doesn't appear multiple times within the chapter. Then you would have too many separate files. --Pat |
|
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,942
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I thought that was just a CSS attribute |
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
Some one really had to work hard to mess it up that bad. Merged all into single file, and then split on the <h1> into separate files. Multi-file rename to 'chap_001, etc.' and done. VERY simple, mostly because at least most of the chapters were started with <h1> tags. |
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
See last paragraph of http://manual.calibre-ebook.com/edit...ing-html-files
|
![]() |
![]() |
![]() |
#10 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Thanks for all the helpful advice. Much appreciated!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with splitting tags | Illyrie | Library Management | 3 | 11-11-2012 06:12 PM |
Splitting Library | Giuseppe Chillem | Calibre | 0 | 11-02-2010 02:00 PM |
Book formats splitting up | Stingo | Calibre | 3 | 08-11-2010 11:42 PM |
Splitting an ebook in 2 | Spectralist | Workshop | 5 | 06-07-2009 08:01 AM |
Splitting a Book into 2 Volumes? | TedPark | Workshop | 14 | 06-13-2008 12:11 PM |