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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2010, 06:02 PM   #1
lhgrappler
Member
lhgrappler began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2010
Device: Sony Pocket Reader
Question how to get page breaks before and after images (using epubs In & Out)

Background:
(I am a newbie when it comes to ebooks, but I've researched a lot about it & have some understanding) I recently purchased a Sony Reader - Pocket Ed for my kids with the plan of using many of the public domain grade school readers. All of the lower ones include many great illustrations. I have Calibre for converting & management, Amaya for code editing, and eCub to 'build' my own books.

I would like to format an epub file with page breaks before and after the illustrations, so that the images are displayed by themselves, without text. I read a thread about page breaks on this forum that told how to use <hr> or </div> as page breaks. My problem is that I'm getting code errors when I try that (I'm using Amaya to edit code). I'm guessing it's because the page break is within a div structure? If so, does that mean I will have to copy the opening div statements so that I can 'close' a div before the image than 'open' it after? I(I hope that made sense, I have done a little programming years ago but only very basic HTML, no CSS experience yet)

Don't suppose Calibre has some sort of option for page breaks before & after images? (If there is one I didn't see it)

For example, here is where you can download the Beacon Second Reader as EPUB, and you can see what I mean.

Thanks
lhgrappler is offline   Reply With Quote
Old 05-09-2010, 06:45 PM   #2
acidburn517
Member
acidburn517 began at the beginning.
 
Posts: 24
Karma: 20
Join Date: Apr 2010
Device: Sony PRS-600, Ipad
Sigil has an option of letting you insert page breaks anywhere in the document. You just need to mount the epub into the program.
acidburn517 is offline   Reply With Quote
Advert
Old 05-09-2010, 09:46 PM   #3
lhgrappler
Member
lhgrappler began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2010
Device: Sony Pocket Reader
Downloaded & tried Sigil - they do have a chapter break, which splits the whole file. I'm looking for a page break that will force the reader to only display the image on the screen. Thanks, tho.
lhgrappler is offline   Reply With Quote
Old 05-09-2010, 09:52 PM   #4
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,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by lhgrappler View Post
Downloaded & tried Sigil - they do have a chapter break, which splits the whole file. I'm looking for a page break that will force the reader to only display the image on the screen. Thanks, tho.
When you "split the file" the EPUB viewer will handle the transition between "pages". (chain them) .
Don't worry how many files.

file 1 ...<chapter break>
File2_part_1
File2_part_2 ... <chapter break

File 2 starts on a new page and transitions seamlessly to the second part
theducks is offline   Reply With Quote
Old 10-05-2010, 03:14 PM   #5
alexdecampi
Member
alexdecampi doesn't litteralexdecampi doesn't litter
 
Posts: 24
Karma: 100
Join Date: Dec 2009
Location: Bronx, NY
Device: none
Yes, I'm having the same problem and I don't see where/how Sigil forces the page breaks - I'd rather know the code directly.

I have a very large (236 full page images) picturebook - pagination works just fine in ADE without pagebreaks, but it just ends up one long ugly scroll of images in Calibre. If I hard-code pagebreaks via hr {page-break-after: always;} it becomes more OK in Calibre but throws in unwanted blank pages in ADE...

Although I might be doing something wrong, I can't seem to code the CSS to include a page break in the div tag. I'm using SVG wrappers around my images. There is no text; the ePub is just 236 images.
alexdecampi is offline   Reply With Quote
Advert
Old 10-05-2010, 03:32 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I haven't tried this myself but what would happen if you used Calibre's new Tweak-Epub feature to insert the following into the EPUB's CSS file?

Code:
img {page-break-before: always; page-break-after: always}
jackie_w is offline   Reply With Quote
Old 10-05-2010, 03:49 PM   #7
alexdecampi
Member
alexdecampi doesn't litteralexdecampi doesn't litter
 
Posts: 24
Karma: 100
Join Date: Dec 2009
Location: Bronx, NY
Device: none
Unlikely to work as the svg wrapper means there is no real img tag, I believe...

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 573 800" preserveAspectRatio="xMidYMid meet">
<image width="573" height="800" xlink:href="../images/img0032.png" />
</svg>
alexdecampi is offline   Reply With Quote
Old 10-05-2010, 03:53 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,167
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
OK, sorry... I hadn't looked inside the EPUB.
jackie_w is offline   Reply With Quote
Old 10-06-2010, 01:35 AM   #9
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
put empty divs before and after the image with page break settings:

Code:
<div class="pbbefore"></div>
image stuff
<div class="pbafter"></div>
and then css:
Code:
.pbbefore {page-break-before: always;}
.pbafter {page-break-after: always;}
edit: just saw that you said div wasn't working for some reason - not sure how you coded it or why it didn't, but you should be able to use other empty tags to do this as well, p, blockquote, etc. I woudl also think you could add the page break before/after style directly to the svg tag.

Last edited by ldolse; 10-06-2010 at 01:39 AM.
ldolse is offline   Reply With Quote
Old 10-06-2010, 11:57 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
See how comics are converted to epub in calibre. zip up a bunch of images in into a CBZ file and convert them to epub.
kovidgoyal 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
For the Pocketbook 360: FBReader with page breaks & wrist pageturn mtravellerh PocketBook 297 07-12-2013 04:06 AM
how to make section breaks in epubs JBNY Calibre 12 09-16-2010 02:57 PM
Force page breaks in epubs alexvallette ePub 11 09-06-2010 07:53 AM
title page & background images Nate the great ePub 13 07-28-2009 04:38 PM
Book Designer Sounds & Page Breaks pitolee Sony Reader 6 04-15-2007 05:46 AM


All times are GMT -4. The time now is 10:29 PM.


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