Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-07-2010, 10:09 PM   #1
december
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?
  Reply With Quote
Old 10-07-2010, 10:12 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,661
Karma: 127838196
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.
JSWolf is online now   Reply With Quote
Old 10-07-2010, 10:25 PM   #3
december
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?
  Reply With Quote
Old 10-08-2010, 03:46 AM   #4
schlonz
Enthusiast
schlonz began at the beginning.
 
schlonz's Avatar
 
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
schlonz is offline   Reply With Quote
Old 10-08-2010, 03:59 AM   #5
cuthbert19
Enthusiast
cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.
 
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
Quote:
Originally Posted by schlonz View Post
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
I never put anything like that in the epub i built, and nonetheless any epub reader *still* apply a pagebreak before rendering the next file.

@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.
cuthbert19 is offline   Reply With Quote
Old 10-08-2010, 04:06 AM   #6
schlonz
Enthusiast
schlonz began at the beginning.
 
schlonz's Avatar
 
Posts: 25
Karma: 10
Join Date: Jul 2010
Device: PSR-300
Quote:
Originally Posted by cuthbert19 View Post
I never put anything like that in the epub i built, and nonetheless any epub reader *still* apply a pagebreak before rendering the next file.
Never tested it before (till now), but you are right. My reader also makes a new page, no matter if i have the Page-break command or not.

ru
schlonz is offline   Reply With Quote
Old 10-08-2010, 07:51 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
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.
Jellby is offline   Reply With Quote
Old 11-23-2013, 10:46 PM   #8
weberr
New old guy
weberr began at the beginning.
 
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?
weberr is offline   Reply With Quote
Old 11-23-2013, 10:59 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Old 11-23-2013, 11:06 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
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.
theducks is offline   Reply With Quote
Old 11-24-2013, 01:04 AM   #11
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by weberr View Post
I know that this has been asked and answered several times -- but most recent answers are 3-4 years old.
This was actually asked again only a few days ago, so there was no need to resurrect this old thread.

The answer is simple. No, this is not possible.
Toxaris is offline   Reply With Quote
Old 11-24-2013, 01:07 AM   #12
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by eschwartz View Post
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.
Again, why should it be honored between files? That does not make sense.
Toxaris is offline   Reply With Quote
Old 11-24-2013, 02:56 AM   #13
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
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:
Large amount of text -- way more than epub can handle as a single html file
There's no fundamental limit in what ePub can handle. With enough memory, and a reader that does not add its own limitations, you could have HTML files as long as you want.

Last edited by Jellby; 11-24-2013 at 02:59 AM.
Jellby is offline   Reply With Quote
Old 11-27-2013, 06:52 PM   #14
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Jellby View Post
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:



There's no fundamental limit in what ePub can handle. With enough memory, and a reader that does not add its own limitations, you could have HTML files as long as you want.
Well, yes, Jellby,

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
Hitch is offline   Reply With Quote
Old 11-27-2013, 07:03 PM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
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
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:06 AM.


MobileRead.com is a privately owned, operated and funded community.