Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2017, 07:43 AM   #1
fluoresce
Enthusiast
fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.
 
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
Do you use page-break-after and page-break-inside?

I have used the following lines of CSS code in my EPUB:

Code:
h2, h3, h4, h5, h6 {
page-break-inside: avoid;
page-break-after: avoid;
}
I have heard that using this code can cause problems for people using small screens in landscape mode.

It would be interesting to hear your opinions.

Should I not use this code? Can it cause problems? Is it well supported?

Another question . . .

Do you guys switch off hyphenation?
fluoresce is offline   Reply With Quote
Old 05-09-2017, 08:02 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,548
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by fluoresce View Post
I have used the following lines of CSS code in my EPUB:

Code:
h2, h3, h4, h5, h6 {
page-break-inside: avoid;
page-break-after: avoid;
}
I have heard that using this code can cause problems for people using small screens in landscape mode.

It would be interesting to hear your opinions.

Should I not use this code? Can it cause problems? Is it well supported?

Another question . . .

Do you guys switch off hyphenation?
Those css properties only will work with RMSDK (ADE) based ereaders (in ereaders based on webkit won't work). I use those properties and so far I didn't find any issue (applied to h1-h6 headers).
And regarding hyphenation, I disable it for <h> tags.
RbnJrg is offline   Reply With Quote
Advert
Old 05-09-2017, 10:16 AM   #3
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
Most readers will ignore it though, even if they use RMSDK.
Toxaris is offline   Reply With Quote
Old 05-09-2017, 02:50 PM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Having those in there, on the other hand, shouldn't be a problem. A compliant reader/app should gracefully degrade...meaning if it doesn't understand or support a css command it shouldn't break. If your app is breaking over the code then that should be reported as a bug.
Turtle91 is offline   Reply With Quote
Old 05-09-2017, 06:28 PM   #5
fluoresce
Enthusiast
fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.fluoresce ought to be getting tired of karma fortunes by now.
 
Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
Thanks, guys. I shall leave it in there. If I hear of any problems, then I'll remove it. I shall not switch off hyphenation, either.
fluoresce is offline   Reply With Quote
Advert
Old 05-09-2017, 10:52 PM   #6
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
I have these lines in the CSS I use

.avoidbreak { page-break-inside: avoid; }
.breakabove { page-break-before:always; }
.breakafter { page-break-after:always; }

and use them, nearly always as div classes, and find they work on my Sony T3, Kobo Glow, Kindle, iPad, and Samsung tablet. So far as I can tell they've always worked - e.g. a div with the class .breakabove always starts on a new page.

Could you tell me please how you turn off hyphenation? That would be really useful for long titles if it stops a word from breaking.
AlexBell is offline   Reply With Quote
Old 05-09-2017, 11:06 PM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by AlexBell View Post

Could you tell me please how you turn off hyphenation? That would be really useful for long titles if it stops a word from breaking.
probably don't need all of these, but they work for web pages too:

Code:
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
However, I have found that forcing a long title to break (<br />) where I want does a better, or at least more consistent, job of cleaning up hyphens. The problem with turning off hyphens is that some apps will just allow a too-long-word to flow off the side of the page where you can't see it if there is no option to hyphenate. eg "Acknowledgements" in too large of a font on a small screen.
Turtle91 is offline   Reply With Quote
Old 05-10-2017, 03:24 AM   #8
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
Quote:
Originally Posted by Turtle91 View Post
probably don't need all of these, but they work for web pages too:

Code:
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
However, I have found that forcing a long title to break (<br />) where I want does a better, or at least more consistent, job of cleaning up hyphens. The problem with turning off hyphens is that some apps will just allow a too-long-word to flow off the side of the page where you can't see it if there is no option to hyphenate. eg "Acknowledgements" in too large of a font on a small screen.
Thanks. That's what I do also. But I find that what looks good on a Sony does not look so good on an iPad.
AlexBell is offline   Reply With Quote
Old 05-16-2017, 07:29 PM   #9
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: 74,027
Karma: 129333114
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 AlexBell View Post
Thanks. That's what I do also. But I find that what looks good on a Sony does not look so good on an iPad.
AGAIN STOP WITH THE IPAD IS WHATEVER APP YOU USE! The iPad is not the app. You have to mention the app used on the iPad.

Also, for Sony you have to mention which model as up until the T3, there was no hyphenation and thus, they had gaps in some lines when full justified. So they didn't always look good.
JSWolf is offline   Reply With Quote
Old 05-16-2017, 07:30 PM   #10
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: 74,027
Karma: 129333114
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 Turtle91 View Post
probably don't need all of these, but they work for web pages too:

Code:
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
However, I have found that forcing a long title to break (<br />) where I want does a better, or at least more consistent, job of cleaning up hyphens. The problem with turning off hyphens is that some apps will just allow a too-long-word to flow off the side of the page where you can't see it if there is no option to hyphenate. eg "Acknowledgements" in too large of a font on a small screen.
You can only use whatever passed epubcheck validation. And besides, I find it poor coding to turn off hyphens.
JSWolf is offline   Reply With Quote
Old 05-17-2017, 09:47 AM   #11
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
You can only use whatever passed epubcheck validation. And besides, I find it poor coding to turn off hyphens.
It's not "poor coding", just different than what you use. If a publisher wants to turn them off - for whatever their reason - then they would need to use one of those commands.

You can fine tune these commands to only turn off hyphenation for certain parts...just put the tags in the appropriate CSS.

Of course, the reader/app may completely ignore it anyway....

Last edited by Turtle91; 05-17-2017 at 09:52 AM.
Turtle91 is offline   Reply With Quote
Old 05-17-2017, 09:50 AM   #12
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
AGAIN STOP WITH THE IPAD IS WHATEVER APP YOU USE! The iPad is not the app. You have to mention the app used on the iPad.
While I don't get over this use, Jon has a point. It's better if you say iBooks if you are disparaging the way a book renders than "iPad". There are several apps that display on iPads that render very well. I use Marvin on all of my iOS devices and it does splendidly!
Turtle91 is offline   Reply With Quote
Old 05-17-2017, 09:19 PM   #13
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
Quote:
Originally Posted by JSWolf View Post
AGAIN STOP WITH THE IPAD IS WHATEVER APP YOU USE! The iPad is not the app. You have to mention the app used on the iPad.

Also, for Sony you have to mention which model as up until the T3, there was no hyphenation and thus, they had gaps in some lines when full justified. So they didn't always look good.
I humbly beg your pardon, and will try to do better in future.

I use iBooks and Bluefire Reader to test ebooks on my iPad, and they both seem to have wider 'pages' with more words per line for similar font sizes than by Sony and Kobo do.
AlexBell is offline   Reply With Quote
Old 05-24-2017, 01:39 AM   #14
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by fluoresce View Post
Code:
h2, h3, h4, h5, h6 {
page-break-inside: avoid;
page-break-after: avoid;
}
...

Should I not use this code? Can it cause problems? Is it well supported?
At least in my experience, page-break-inside: avoid; is generally well supported, though readers can ignore it if it is impossible to fit the contents of the block element on a single page.

On the flip side, page-break-after: is almost guaranteed to be completely ignored unless the value is always. There may be certain situations where it works with avoid, but you're probably just wasting bytes.
dgatwood is offline   Reply With Quote
Old 05-24-2017, 01:57 AM   #15
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
In my experience page-break-after: avoid; has always worked perfectly in the Kobo (Adobe RMSDK 10 based) ePub reader.
GeoffR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
page-break-inside on Google Play Books Oxford-eBooks ePub 10 07-01-2015 12:17 AM
Keeping text together (block vs. page-break-inside:avoid) Psymon ePub 2 10-12-2014 09:56 AM
iPad iBooks: page-break-after/inside/before NOT working? philx Apple Devices 7 01-27-2013 12:42 AM
Page-Break-Inside: Avoid - Solution or Hack? sab1234 Kindle Formats 3 01-17-2013 04:10 PM
Page-break-inside:avoid and mobi AlexBell Kindle Formats 3 06-01-2011 06:03 AM


All times are GMT -4. The time now is 03:31 AM.


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