![]() |
#16 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
kovidgoyal
I understand break-inside:avoid is an advisory property but it's so frustrating to read books with broken layout ![]() Could you or someone advice how to edit Epub with minimum efforts, unlike Pop suggested, to fit image + text, which shouldn't be break apart, on one page while reading in E-book viewer? |
![]() |
![]() |
#17 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,238
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
|
|
![]() |
![]() |
#18 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,045
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
ebooks are best suited to text and images that can move or be resized, not textbooks with tables, graphs, photos and images. The most common eink is 6" at 167 dpi for older ones and 300 dpi for new. Almost all are mono, 16 shade. Some are only 4 shades. Sizes vary from 4.3" to 13.8" The smallest screen for ereading would be Palms at 160 x 160 and about 2.3", mono or colour, rare now. Some smart watches are a similar size but higher resolution Most ebooks are read on phones, from 4.5" to 6.5", but the 5" to 6" is most common. It's a more elongated aspect than eink screens. Next up is tablets, 7" to 14", the 10" may be most common. They vary a lot in resolution. A one solution fits all for your needs is not possible for the bulk of the ereader market. PDFs, fixed KFX and fixed epub3 allow it but alienate EVERYONE with eink or phones as they only work well on 10" or better tablets. |
|
![]() |
![]() |
#19 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
|
|
![]() |
![]() |
#20 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
![]() EPUB is a subset of HTML. Avoid is not the same as Prohibited (not a valid attribute for this case) Advisory = attempt to comply. Not, Must comply (ADE 1.7 even ignore some of those. a 50% HR will not text-align:center. You need to do tricks) |
|
![]() |
![]() |
#21 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
kovidgoyal
theducks "page-break-inside: avoid" in Cromium is not an advisory property it's more like a buggy property. Here is the bug report https://bugs.chromium.org/p/chromium...tail?id=547972 |
![]() |
![]() |
#22 |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Also:
https://www.chromestatus.com/feature/5630943616303104 https://bugs.chromium.org/p/chromium...tail?id=223068 Maybe it would be better to fix this issue in Calibre? Last edited by iG0R; 04-15-2020 at 06:04 PM. |
![]() |
![]() |
#23 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
![]() |
![]() |
#24 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,238
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Kovid, are you trying to tell us that in your copious spare time you don't want to rewrite chromium? ![]() ![]() ![]() <serious mode on> |
|
![]() |
![]() |
#25 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Kovid "Gandalf" Goyal
![]() Is it possible to integrate Calibre-Web's ePub handler into E-book viewer and Content server? Quote:
![]() ![]() |
|
![]() |
![]() |
#26 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no different engine. All rendering is handled by the browser engine. The browser engine can always decide to ignore break-inside if they feel like it. The only place this can be fixed is the browser engine. And it cannot in principle ever be fixed absolutely, since if the content in the block marked with break-inside is larger than the available space, it HAS to be broken up.
|
![]() |
![]() |
#27 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
Definitely there have to be differences in how they handle content and therefore between their code. My main field of interest in IT is investigating bugs in software or hardware consequently I mainly use Assebmler in my hobby work but, IMHO, the algorithm of finding and fixing in the code still the same in both using Assembler and Python. |
|
![]() |
![]() |
#28 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Aug 2016
Device: Kindle Paperwhite 3
|
Have you tried flow mode? It doesn't break up text into pages. If it doesn't work, then just live with reading the caption on the next page . Honestly, if the image is too long/tall, how do you logically think it's going to fix the text without space? Be reasonable man.
If there's no space, either shrink the image or it will break up the text caption into the next page. The SS with the issue shows a WAY SMALLER figure image than what you showed in the next SS with a large figure image. Makes no sense why you would compare that. |
![]() |
![]() |
#29 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,356
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Pretty obviously whether something fits on a given page depends on the size of the page. The sizes of the pages are different in the two cases.
|
![]() |
![]() |
#30 | |
Enthusiast
![]() Posts: 36
Karma: 10
Join Date: Apr 2020
Device: PC
|
Quote:
As mentioned above, several Chromium Project members confirmed "break-inside" is a buggy property, it has to work as it supposed to but doesn't and it is not advisory property (at least I didn’t find any reference to it as to an advisory property, all mentioned Chromium Project members consent that it has to avoid breaking but due to bugs in implementation it doesn't). If in the code was strictly specified that it has to avoid breaking inside a block of content algorithm must process it so to prevent any disruption. How it should be handled - all depends on how sophisticated this algorithm is. If the algorithm is rather simple it'll shift responsibility to the base handler of the browser at the same time more complex algorithm will try to process content by itself first of all using common sense and looking at CSS's properties. What common sense implies - the main goal is to comply to author's directives in the code and to give an opportunity to user to grasp the information in the content, i.e. ability to view image(s) and text: Processing block with break-inside:avoid (bear in mind this property almost always inserted consciously) depending on what the block's content consists of: 1. only text 2. text+image(s) 3. only image(s) -> 1. only text: - if it couldn't be fitted because the volume of text is too big but due to the author of the HTML code defined that this block has to avoid breaking -> Ok, whatever let's fit it on one page by resizing font since the author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it; - if it could be fitted on one page -> Ok, let it be so. 2. text+image(s): - if the image(s) is(are) too big to fit whole block on one page -> let's look at CSS -> - img has height:auto property or there are no properties concerning its size -> resize image(s) to bare visible minimum size(e.g. min-height: 10%) -> if it couldn't be fitted even now -> Ok, whatever let's fit it on one page by in addtion resizing font size since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it; - img has strictly defined size (thus the author implied the img is more important then text) -> let's look at text's CSS, if it hasn't any limitations in font properties -> resize text to bare readable minimum size(e.g. 6px) -> if it couldn't be fitted even now -> Ok, whatever let's fit it on one page by resizing font since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it; - if the image(s) + text could be fitted on one page -> Do it, just do it! 3. only image(s): - if the image(s) is(are) too big to fit whole block on one page -> Ok, whatever let's fit it on one page by resizing image(s) since author strictly defined "break-inside:avoid" property and it is unlikely this property was miscoded and even if it was author's failure it'll be visible at a glance and the author can fix it; - if the image(s) could be fitted on one page -> Ok, accommodate it. |
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Does page-break-inside:avoid work in azw3 files? | AlexBell | Workshop | 4 | 04-21-2015 12:52 AM |
Keeping text together (block vs. page-break-inside:avoid) | Psymon | ePub | 2 | 10-12-2014 09:56 AM |
page-break-after:avoid on iBooks | Oxford-eBooks | Apple Devices | 1 | 08-12-2013 11:40 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 |