10-07-2010, 10:09 PM | #1 |
Nameless Being
|
CSS to "wrap" text between two .xhtml files?
Just a quick question, and apologies if this has already been asked:
I'm currently wrangling a very large .epub file in which there are no formal headers or chapter breakpoints, so I've spread the text across several smaller chunk .xhtml files for ease of editing. Once I've run the completed .epub through Calibre to convert it to .mobi format and uploaded the result onto my e-book reader, though, I find that (even though the absence of any h-numbered headings prevents the creation of a chapter marker), a pagebreak is still being inserted at the start of each new .xhtml file, disrupting what should be a continuous flow of text. Possibly this is a problem I need to take to the Calibre forum, but on the chance I can fix it in Sigil first: is there some handy CSS code I can insert into my .epub file so ensure that text will "wrap" continuously between two .xhtml files, rather than page-breaking at the end of each file? |
10-07-2010, 10:12 PM | #2 |
Resident Curmudgeon
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Make the ePub into one large flow instead of multiple flows. Then convert it. Calibre rightly thinks of the various flows as different chapters. With an ePub viewer, each flow would start a new page and Calibre is keeping this.
|
Advert | |
|
10-07-2010, 10:25 PM | #3 |
Nameless Being
|
Well, that's certainly easy enough to fix, although I suspect editing such a long file is going to be an adventure if I ever need to return to it, as my system is already a bit sluggish when opening and viewing the equivalent of 80-page chunks of the (much longer) text.
Do you know if there are any upper limits to the size an .xhtml file can be in Sigil? |
10-08-2010, 03:46 AM | #4 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jul 2010
Device: PSR-300
|
Hello
normaly Calibre insert in the stylesheet.css a class for the BODY TAG. In this class(most of all the "calibre" class without any number) has a line that looks like this: page-break-before: always; So if you remove this, the Pagebreak should be history. ru |
10-08-2010, 03:59 AM | #5 | |
Enthusiast
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
|
Quote:
@december: keep in mind that some devices have problems with internal xhtml files bigger than 270-300kbytes, that's way calibre by default splits big html files in ones smaller than that. |
|
Advert | |
|
10-08-2010, 04:06 AM | #6 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jul 2010
Device: PSR-300
|
Quote:
ru |
|
10-08-2010, 07:51 AM | #7 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
I don't think you can avoid a pagrebreak between separate XHTML files. I'm not sure it's in the spec, but I'm sure all current readers behave that way.
|
11-23-2013, 10:46 PM | #8 |
New old guy
Posts: 69
Karma: 10
Join Date: Feb 2012
Device: kindle fire
|
Prevent page breaks between epub text files
I know that this has been asked and answered several times -- but most recent answers are 3-4 years old.
Large amount of text -- way more than epub can handle as a single html file -- but no way to include breaks without destroying the objective of the file. This is obviously a feature that many of us need. We need something like "page-break-after:never" to be inserted at the end of a xhtml file. Just checking -- has anything happened in last several years, i.e., somebody come up with a magical work-around or maybe the spec has been changed? |
11-23-2013, 10:59 PM | #9 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
There is such thing as "page-break-before:avoid" but apparently, no readers will respect it to avoid breaking on files. It will only do so within a single file.
|
11-23-2013, 11:06 PM | #10 |
Well trained by Cats
Posts: 29,798
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I find it hard to believe that your source would suffer that much.
How would they ever have printed it on paper? A roll of TP? The secret (if any) is to chose the split point when a natural one is not available. |
11-24-2013, 01:04 AM | #11 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
11-24-2013, 01:07 AM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
11-24-2013, 02:56 AM | #13 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
In order to render two files without a pagebreak, the reader should be able to process two files (or more, as there could be many files fitting in a single page) simultaneously and display them on the same screen. I'm sure that's not impossible, but I'd say it's not trivial and I don't think that'll happen in the near future.
Given that Adobe-based readers still add spurious pagebreaks in the middle of long paragraphs (and in the middle of the screen), attempting to create a "continuous" text seems rather futile anyway. What could change is this: Quote:
Last edited by Jellby; 11-24-2013 at 02:59 AM. |
|
11-27-2013, 06:52 PM | #14 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Technically, that's true, but in practice, we all know that huge ePUB files will choke most ePUB readers at some point. I've had large ePUBS with many chapters (files) in them that nearly killed a NookColor. So...I wouldn't recommend trying it. weberr: What could a few breaks, that are nearly transparent, going to do that would "destroy the objective of the file," really, given that it's a book? (I mean...it's a book, not a program or an app. Even then...) As has been mentioned already in this thread, ADE, which drives a large number of readers, will arbitrarily insert page breaks in paragraphs hither and yon, anyway--so even if you do only create a single HTML-file ePUB, you have a better than 90% probability that your readers will experience page breaks along the way. So: I'm really curious. How could a few page breaks destroy the file's "objective?" This is such unique wording that I'd love to know. Hitch |
|
11-27-2013, 07:03 PM | #15 |
Well trained by Cats
Posts: 29,798
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
@ Jellby
A Calibre Catalog 'book' of 4000 books will kill ADE (MRSDK) on my Hanlin V5 Just too many entries in the OPF if you include cover images in the catalog. The OPF and NCX are huge, the actual pages are tiny Big is relative |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to get Calibre to retain "!important" in a css? | PatNY | Calibre | 1 | 01-06-2011 12:31 PM |
using "Extra CSS" box | RedRoverJ | Calibre | 4 | 06-25-2010 07:08 PM |
Suggestion: Don't set "color" tag in .epub css | McAlsop | Calibre | 16 | 06-17-2010 09:13 AM |
Importing "big" XHTML files in Sigil | paulpeer | Sigil | 8 | 03-19-2010 05:00 AM |
Bidirectional text in XHTML/CSS | Jellby | Workshop | 3 | 02-21-2010 01:28 PM |