Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-15-2026, 09:24 PM   #31
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: 81,617
Karma: 150265991
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 RbnJrg View Post
Most modern e-readers (like those based on WebKit used by Apple Books or Google Play Books) render an epub3 file not as a continuous scroll, but as a series of horizontal columns that simulate pages; technically, it creates a multi-column css layout.

In that context:

break-after: avoid: This is a generic property. Many e-readers ignore it because they don't know if you mean to avoid a physical page break, a region break, or a column break.

break-after: avoid-column: This is much more specific. It explicitly tells the e-reader: "Don't break the column immediately after this element." Because it's a direct instruction to the box model the e-reader is using (columns), it's usually the only one they actually respect.

Virtually any e-reader based on a web rendering engine (WebKit, Blink) uses this technique to simulate pages. The software tells the engine: "I have a container of infinite width and fixed height (the screen's width); divide it into columns the width of the screen."

If you want to explore that model of pagination, you could read:

https://deepwiki.com/readium/readium-css/3.1-pagination

https://github.com/readium/css/blob/..._pagination.md

but if you do a google search with "readium pagination and spreading" you'll have a lot of info about the subject.
This is why it's best to break the HTML into another HTML file at the break point. You then don't have to worry about webkit or Books aor any other software not respecting a page break in CSS.
JSWolf is offline   Reply With Quote
Old 01-15-2026, 09:46 PM   #32
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,293
Karma: 16800000
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by JSWolf View Post
It doesn't matter if the program is webkit based or not. The thing that matters is never use webkit code as it's not valid ePub code.
How do you plan to get hyphenation in a Kobo kepub without using -webkit-hyphenate-limit-before and -webkit-hyphenate-limit-after?
jackie_w is offline   Reply With Quote
Advert
Old 01-15-2026, 09:52 PM   #33
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: 81,617
Karma: 150265991
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 jackie_w View Post
How do you plan to get hyphenation in a Kobo kepub without using -webkit-hyphenate-limit-before and -webkit-hyphenate-limit-after?
That's easy. And it requires no webkit code in any KePub.

[Reading]
webkitTextRendering=geometricPrecision

Plus, the English hyphenation dictionary has before and after values. I use the one I made because the values Kobo use are too big.
JSWolf is offline   Reply With Quote
Old 01-15-2026, 10:00 PM   #34
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 49,576
Karma: 174632684
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Why would the renderer require webkit code if it's written properly to support ePub3? It should not need to. And besides, it's not valid code. It's not part of any ePub spec.
There are quite a few ePub renderers out there. Some of them still use the -webkit extensions. It's simply easier for me to allow for their existence than to threaten to hold my breath until I turn purple if the renderer is not upgraded to a version that does not need the -webkit extensions.

As for not being part of any ePub spec? Not that big a concern to me since I've found virtually all renderers treat a properly structured but unknown entry in a CSS stylesheet as a null operation.
DNSB is offline   Reply With Quote
Old 01-15-2026, 10:09 PM   #35
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 49,576
Karma: 174632684
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
That's easy. And it requires no webkit code in any KePub.

[Reading]
webkitTextRendering=geometricPrecision
While geometricPrecision allows scaling to use fractional font sizes, I don't seem to recall have noticed any effects on hyphenation.

I will admit to preferring to use:
Code:
  hyphens: auto;
  hyphenate-limit-chars: 8 3 3;
instead of mucking with hyphenation or the -webkit-hyphenate-limit options.

Last edited by DNSB; 01-15-2026 at 10:17 PM.
DNSB is offline   Reply With Quote
Advert
Old 01-15-2026, 11:17 PM   #36
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,904
Karma: 8987599
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
This is why it's best to break the HTML into another HTML file at the break point. You then don't have to worry about webkit or Books aor any other software not respecting a page break in CSS.
Here the main issue is to AVOID a break after some elements. Or to have all elements joined (break-inside: avoid|avoid-column). The problem is how to avoid fragmentation, not how to generate it (that is easy).
RbnJrg is offline   Reply With Quote
Old Yesterday, 05:50 AM   #37
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by Turtle91 View Post
Of course its all technique! Normally the most used style would be the default (plain tag), and the ones that are different from the norm would be given a class. It makes clean html and easier to see when something is supposed to be different.


I've seen some really nasty code that looks ridiculous when everything is given a class.
Absolutely good practice, but it really doesn't take that much space in ratio to long text per paragraph.

I should consider using different css for title page and actual article page. So both can have cleaner tags.

Or should I use div instead of p to hold title text? Do plain text behave the same in div and p?

Last edited by icearch; Yesterday at 05:53 AM.
icearch is offline   Reply With Quote
Old Yesterday, 07:26 AM   #38
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: 81,617
Karma: 150265991
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 DNSB View Post
While geometricPrecision allows scaling to use fractional font sizes, I don't seem to recall have noticed any effects on hyphenation.

I will admit to preferring to use:
Code:
  hyphens: auto;
  hyphenate-limit-chars: 8 3 3;
instead of mucking with hyphenation or the -webkit-hyphenate-limit options.
And one other thing I forgot to post is I use the patch that turns on hyphenation in KePub.
JSWolf is offline   Reply With Quote
Old Yesterday, 07:28 AM   #39
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: 81,617
Karma: 150265991
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 icearch View Post
Absolutely good practice, but it really doesn't take that much space in ratio to long text per paragraph.

I should consider using different css for title page and actual article page. So both can have cleaner tags.

Or should I use div instead of p to hold title text? Do plain text behave the same in div and p?
Don't use div where you should be using p.
JSWolf is offline   Reply With Quote
Old Yesterday, 07:47 AM   #40
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by JSWolf View Post
Don't use div where you should be using p.
The thing is I don't think it should be using p either. It's a couple of short words in title page.

See the top three line in attached pic.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20260116_194522_com.bilingify.readest.jpg
Views:	10
Size:	162.7 KB
ID:	220332  
icearch is offline   Reply With Quote
Old Yesterday, 09:05 AM   #41
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,441
Karma: 20456789
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
You are correct that it’s not technically a <p>. Same as with things like poetry where each line is also not a paragraph. There is definitely an argument that <div> is the more correct to use for semantic reasons. I personally use a <p> but that is only because I created a template long ago that I haven’t gotten around to changing…

What does matter, imo, is to use the proper <h> tag for any titles (book/chapter) because titles are usually defining a new section.
Turtle91 is online now   Reply With Quote
Old Yesterday, 09:42 AM   #42
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by Turtle91 View Post
You are correct that it’s not technically a <p>. Same as with things like poetry where each line is also not a paragraph. There is definitely an argument that <div> is the more correct to use for semantic reasons. I personally use a <p> but that is only because I created a template long ago that I haven’t gotten around to changing…

What does matter, imo, is to use the proper <h> tag for any titles (book/chapter) because titles are usually defining a new section.
See, we all have old tech that runs.

Having correct h is absolutely important, I'm not going to mess with that.
icearch is offline   Reply With Quote
Old Yesterday, 09:50 AM   #43
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,904
Karma: 8987599
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by icearch View Post
The thing is I don't think it should be using p either. It's a couple of short words in title page.

See the top three line in attached pic.
And in that title page, where would the properties supposedly come into play to control fragmentation? What do you want to do there? Keep the entire block together? Force (or prevent) a break before or after it? On a title page, you shouldn't need to control fragmentation (at least not with the properties that were discussed).
RbnJrg is offline   Reply With Quote
Old Yesterday, 10:37 AM   #44
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by RbnJrg View Post
And in that title page, where would the properties supposedly come into play to control fragmentation? What do you want to do there? Keep the entire block together? Force (or prevent) a break before or after it? On a title page, you shouldn't need to control fragmentation (at least not with the properties that were discussed).
Ah, yes. This title page have nothing to do with page break. Just other random thought.
icearch is offline   Reply With Quote
Old Yesterday, 11:49 AM   #45
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 64
Karma: 10
Join Date: Nov 2025
Device: none
And with some testing, div and p do have different attributes, that is p have margin-block-start and margin-block-end with both 1em, which div does not have.
icearch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
page-break-before: always; avresbo Kobo Reader 1 03-02-2023 09:30 AM
Do you use page-break-after and page-break-inside? fluoresce ePub 14 05-24-2017 02:57 AM
No page break for H2 RickAltman Calibre 2 06-25-2012 12:02 PM
PAGE BREAK JFS-NMF Recipes 0 03-04-2011 10:15 AM
Page break before <b> flowoeB Calibre 14 04-12-2009 04:05 PM


All times are GMT -4. The time now is 12:53 AM.


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