09-14-2023, 04:19 PM | #1 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Full-page image "floating" for responsive pagination.
I'm not exactly sure how best to describe this, but I often come across books where an image will appear mid-chapter (sometimes, mid-paragraph or sentence).
In print, that image is usually positioned in such a way that the page of text preceding it is full, but with a responsively paginated ereader with variable display settings, you may end up with the preceding page having only half a paragraph of text, and the rest of the page being blank because the image requires the full next page. Anyway, I know it's probably unavoidable to a degree, but I don't suppose there's a way to allow that image to "float" up or down a certain amount to allow the preceding page to fill? Thanks in advance for any help! |
09-14-2023, 07:38 PM | #2 |
Grand Sorcerer
Posts: 6,750
Karma: 86234863
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
The CSS property "float: snap-block" may be what you are looking for. See this example from W3C to see how it works.
Amazon has limited support for this property in Enhanced Typesetting (KFX formatting). I don't know about support in other e-readers. |
Advert | |
|
09-15-2023, 12:09 AM | #3 |
A Hairy Wizard
Posts: 3,222
Karma: 19000635
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
|
As long as the image is not included within the <p></p> tags you should never have a paragraph ‘interrupted’ halfway for the image…it should complete the paragraph, then display the image.
Otherwise, I try and place the image slightly after the scene depicted by the image first gets discussed. That keeps the story flowing smoothly, with a natural pause to view the image. I don’t worry too much about white space between pages in a reflowable book. You just do the best you can. What absolutely drives me nuts is white space WITHIN a paragraph, or sentence, caused by book coders forcing justified text. There are only a few devices that handle auto-hyphenation tolerably well, and those rivers of white space, especially on small profile devices - like phones, is very distracting and yanks me right out of the story! Extra space at the bottom of a page is relatively unnoticeable. |
09-19-2023, 06:31 PM | #4 | ||
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
Quote:
That is currently what I do as well, but was curious if there was a more elegant solution. And I agree about justified text; I tend to remove the justification alignment when I come across it as it looks odd outside of a few specific use cases. |
||
09-20-2023, 07:57 AM | #5 |
Resident Curmudgeon
Posts: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You cannot duplicate that pBook in ePub. The problem is that you cannot count on a certain font size and you cannot count on a certain screen size and resolution.
|
Advert | |
|
09-20-2023, 10:22 AM | #6 | |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
I've been working with epubs for over a decade now and have generally been able to get pretty close to a faithful recreation, in spirit if not in perfect accuracy. This is a small thing that I've been curious about for a long time and wanted to see if there was an elegant solution. |
|
09-20-2023, 01:26 PM | #7 |
Bibliophagist
Posts: 40,521
Karma: 156983616
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
One other issue is how many epub renderers support page floats? In my admittedly limited testing about 4 years ago, the answer was not that many.
|
09-20-2023, 02:04 PM | #8 | |
Grand Sorcerer
Posts: 5,527
Karma: 100606001
Join Date: Apr 2011
Device: pb360
|
Quote:
|
|
09-21-2023, 05:06 PM | #9 |
Resident Curmudgeon
Posts: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
09-21-2023, 05:07 PM | #10 | |
Resident Curmudgeon
Posts: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
09-21-2023, 09:36 PM | #11 | |
Bibliophagist
Posts: 40,521
Karma: 156983616
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Reminds me of one person who was arguing about app development in another forum. Evidently his Android Honeycomb smartphone could not be updated to a recent version of Android and the app he wants to use now requires Android 9 as the minimum version so the developer should be forced to have the new app version run on Android 3 like the original version he paid for ($0.99) 12 years ago. |
|
09-22-2023, 11:05 AM | #12 | |
Resident Curmudgeon
Posts: 76,402
Karma: 136466962
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
09-22-2023, 05:27 PM | #13 |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
This is getting silly off topic. Mods, I consider my question answered; maybe we can lock this thread? Thanks in advance.
|
10-01-2023, 02:26 PM | #14 |
Wizard
Posts: 1,610
Karma: 8399999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
My first thought was not to participate in this thread but I changed my mind. It is perfectly possible to avoid blank spaces produced by images (or another element, for example tables) under epub3. I'm not going to post the code to achieve this (at least, not for now, maybe in a future) but I can CATEGORICALLY affirm that it is possible to get what the OP proposed, with the following ereaders:
ADE 4.x (Windows), Thorium (Windows and Linux), Koodo Reader (Windows and Linux), IceCream Ebook Reader (Windows), Foliate (Linux), Readium, Bibi Reader and JSReader (all Sigil plugins on both Windows and on Linux), Calibre Viewer (Windows and Linux), EPUBReader (extension for Chrome and Firefox), ePUB Reader (another extension for Chrome and Firefox), PocketBook (Android), Gitden Reader (Android), Reasily (Android), Aldiko Next (Android), Lithium (Android), OverDrive (Android), Bluefire Reader (Android), BookFusion (Android) and Colibrio Reader (Android, which with its last update fixed all the errors and now perfectly avoids fragmentation). Some screenshots: 1) From Readium (Sigil plugin): a) With a font-size of 100%: b) After increasing font-size (120%): a) With a font-size of 100%: b) After increasing font-size (120%): 2) From PocketBook: a) Before increasing font-size: b) After increasing font-size: a) Before increasing font-size: b) After increasing font-size: Of course, all this can only be achieved under epub3 (and with ereaders that have full support of it); it's impossible to avoid fragmentation and the existence of blank spaces caused by images and tables due to the change of font size under epub2. Last edited by RbnJrg; 10-01-2023 at 02:39 PM. |
10-01-2023, 04:29 PM | #15 |
Bibliophagist
Posts: 40,521
Karma: 156983616
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Sadly, according to our resident curmudgeon, if you can't use ADE 2.0.1/ePub 2 to render the ePub, it's not doable.
|
Tags |
alignment, image, page, paragraph |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to define the "Start" or "Beginning" page in Calibre | paul_01 | Conversion | 5 | 08-12-2016 07:58 AM |
KT "Ghost covers/files" again at 670 books, "stale" image entries in firmware | VirgoGirl | Kobo Reader | 4 | 04-06-2012 03:10 PM |
Creator taking control of the "first page" link in the "content" menu | cyberbaffled | Kindle Formats | 2 | 07-11-2010 05:21 PM |
"Go to page" feature for image viewer? | casimps1 | Amazon Kindle | 0 | 07-27-2009 01:06 PM |