Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2014, 03:22 PM   #16
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
There's no performance issues at all with 30 html pages in the epub, and I was trying to avoid all the blank space that would come before each numbered section within a chapter. For me it also just makes editing the book more tedious when there's 100 files, especially when 30 would do. It's not a huge book, just a typical 300 page novel.
Ripplinger is offline   Reply With Quote
Old 09-02-2014, 06:56 PM   #17
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,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Ripplinger View Post
There's no performance issues at all with 30 html pages in the epub, and I was trying to avoid all the blank space that would come before each numbered section within a chapter. For me it also just makes editing the book more tedious when there's 100 files, especially when 30 would do. It's not a huge book, just a typical 300 page novel.
If the XML are not larger then the mobile ADE specification specifies, then go for it. If not, don't go for it.
JSWolf is offline   Reply With Quote
Advert
Old 09-02-2014, 07:23 PM   #18
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Here is the CSS I use for poetry - each verse goes in its own div

div.verse {
margin: 0.5em 0 0.5em 1em;
padding: 0;
page-break-inside:avoid;
} /* Sets top margin and and prevents verses breaking */
div.verse p { text-indent: -2em;
margin-left: 2em;
text-align: left;
margin-bottom: 0;
padding: 0; } /* Aligns text left, indents lines after break */
div.verse+p { text-indent:0; }

I know it works because I sometimes have to disable the 'page-break-inside:avoid' if verses are too long.

I hope this helps, and if there is any way of doing it better please let me know.
AlexBell is offline   Reply With Quote
Old 09-02-2014, 08:38 PM   #19
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Remember all bets are off when someone pushes the size button...your half page can become two!
mrmikel is offline   Reply With Quote
Old 09-03-2014, 01:56 AM   #20
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by AlexBell View Post
Here is the CSS I use for poetry - each verse goes in its own div

div.verse {
margin: 0.5em 0 0.5em 1em;
padding: 0;
page-break-inside:avoid;
} /* Sets top margin and and prevents verses breaking */
div.verse p { text-indent: -2em;
margin-left: 2em;
text-align: left;
margin-bottom: 0;
padding: 0; } /* Aligns text left, indents lines after break */
div.verse+p { text-indent:0; }

I know it works because I sometimes have to disable the 'page-break-inside:avoid' if verses are too long.

I hope this helps, and if there is any way of doing it better please let me know.
I was thinking about using a div class too earlier but then forgot about it. But I just tried a simplified version of this now and it works perfectly on both my Sony 350s and Kobo Glos.

In the stylesheet I added:

div.sectionstart {
page-break-inside:avoid;
}

And around the section number and first paragraph only I used:

<div class="sectionstart"> (with </div> right after the first paragraph).

And it avoided the section numbers from ever dangling by their lonesome on a preceding page. (And now a few of us know how the "page-break-inside" is meant to work. )

I was afraid of what might happen if someone enlarged the text enough so the first paragraph wouldn't fit on one page with the section number, and that wasn't a problem either. The paragraph just continued onto the following page like I would hope.

So I'm pretty happy with this solution. If there's enough room on a page with the previous section, it will continue on that same page, so there's a minimum of blank space between the sections like I wanted without resorting to 100 html pages within the epub.

Thanks all for the help with this.

Edit: But now this makes me wonder why does using "avoid" work with page-break-inside, but not with page-break-before or page-break-after? Just curiosity at this point, like I said, I'm happy with this result. Possibly the difference is that it works when used with <div>?

Last edited by Ripplinger; 09-03-2014 at 02:11 AM.
Ripplinger is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Those gray lines... ManDay Onyx Boox 16 09-09-2013 02:55 AM
Touch Dark lines between lines of text taming Kobo Reader 12 06-13-2011 07:20 PM
Unutterably Silly Why lines? GlenBarrington Lounge 2 11-23-2010 09:23 AM
Lines on the screen nimblem Astak EZReader 5 05-18-2010 10:57 AM
Lines from TV that I can't forget Steven Lyle Jordan Lounge 82 06-13-2008 06:58 PM


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


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