Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2022, 12:41 AM   #16
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 316
Karma: 3200000
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
I’d add that unsetting justification is not the same as setting it rag right. It’s just surrendering control of it to the reading system, generally considered a positive. Folks pick their app based on what it does for them, and they like that more than whatever we do to circumvent or improve that.

Re:your font declaration, it is harmless enough but won’t do much. Most people won’t have that font installed on their device, but it will fall back on a sensible default.

For ebook, good design usually means “behaves as expected.” It is a cooperative approach (with the reader) that usually manifests as meticulous markup coupled with very minimal css. Whatever is the least you can bear.

Last edited by phillipgessert; 03-30-2022 at 08:49 AM.
phillipgessert is offline   Reply With Quote
Old 03-30-2022, 11:05 AM   #17
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by roland1 View Post
I can already see one conflict, which is the margin-top: one is in em, the other in rem.

My problem is wearing too many hats —*I might make a quick change on the fly and get distracted elsewhere, leaving such discrepancies in place.

Oh well, one step forward at a time...

(Not sure why I put the "display:block" in there. I may have swiped the css from one of my websites during early testing. At least I didn't put a "box-sizing" declaration in there...)
Is anybody else going to comment on using rem inside ebooks?

If I had to guess, I'd say that the root element em is causing all the rendering problems in the LookInsides/previews. BUT, I freely admit, I'm guessing.

Hitch
Hitch is offline   Reply With Quote
Old 03-30-2022, 11:30 AM   #18
roland1
Connoisseur
roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.
 
roland1's Avatar
 
Posts: 80
Karma: 2137678
Join Date: Dec 2021
Location: Canada
Device: none
Quote:
Originally Posted by Hitch View Post
Is anybody else going to comment on using rem inside ebooks?

If I had to guess, I'd say that the root element em is causing all the rendering problems in the LookInsides/previews. BUT, I freely admit, I'm guessing.

Hitch
Yes please. Coming from the web world and its ever-increasing code options, I just dove into this as though it was a website — and previews looked fine, so I just though —*meh, don't worry about it. Not so apparently.

So yeah, the more you guys can throw my way in terms of do's and don't's, the better it'll be for my ebooks, but also anyone searching for this kind of specific info (circa 2022).
roland1 is offline   Reply With Quote
Old 03-30-2022, 12:12 PM   #19
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by roland1 View Post
Yes please. Coming from the web world and its ever-increasing code options, I just dove into this as though it was a website — and previews looked fine, so I just though —*meh, don't worry about it. Not so apparently.

So yeah, the more you guys can throw my way in terms of do's and don't's, the better it'll be for my ebooks, but also anyone searching for this kind of specific info (circa 2022).
I think the problem with REM is that it's relative, right? Based on the root font size--but this, this specific thing, rendering in the browser, means it's getting conflicting information--should it use the base font size of the browser's font settings, or the book?

The reason I think this is simple--I've seen Amazon's LITB affected by HTML coding that the author put into the DESCRIPTION field. The authors would put in italics, for example and NOT close the coding--so an opening italic tag and not a closing tag. The LookInside (LITB) rendered, sequentially, after the description--so the entire LookInside rendered in italics, until it encountered a closing tag.

For all we know, this environment is having the same issue and the rem tags are screwing with it. I don't use REM inside ebooks, anyway--and if you're going to ask me why, now, of course, I can't really remember. I seem to recall screwing with them years ago, when the Kindle Universe first came off of HTML 3.2 (in large part) and moved "up" to HTML 4.0, but I also vaguely recall that something went horribly wrong. I don't think it was the LITB, but damned if I can remember. Too many years.

Guys, Phillip, Dion, anybody, remember why we're not all using REM? Or, hell, maybe I'm wrong?

Hitch
Hitch is offline   Reply With Quote
Old 03-30-2022, 12:52 PM   #20
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 316
Karma: 3200000
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Ha, that stood out to me too, but since I don't use them, I wasn't very confident that was the issue. Seems likely.

I also don't remember why I don't. It does kind of seem like a needless abstraction to use a multiple of the font-size of the html element rather than that of the element you're actually working with. If I had to guess, rems would be mainly useful for highly precise, grid- and baseline-oriented layouts, and those won't work for ebook where user controls would throw it all out of whack anyway.
phillipgessert is offline   Reply With Quote
Old 03-30-2022, 01:34 PM   #21
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by phillipgessert View Post
Ha, that stood out to me too, but since I don't use them, I wasn't very confident that was the issue. Seems likely.

I also don't remember why I don't. It does kind of seem like a needless abstraction to use a multiple of the font-size of the html element rather than that of the element you're actually working with. If I had to guess, rems would be mainly useful for highly precise, grid- and baseline-oriented layouts, and those won't work for ebook where user controls would throw it all out of whack anyway.
I could swear that somewhere in time, we all kicked this around, but hell, it could be (gosh) 10 years ago here. I know they didn't work, but damned if I remember why. I feel like Capidamonte was the one that did all the grunty research work and that means, a loooong while ago. Coulda been Tex or...hmmm...someone. But I think someone did that work and we all said "nope, ain't gonna work" and then we shrugged and that was that.

I damn sure can't see it working on Kindles. I mean..with line-heights? OMG, the end is near, the 4th Horseman of the Rendering cometh and he rides a White Horse made of Crashing Pixels.

Hitch
Hitch is offline   Reply With Quote
Old 03-30-2022, 02:58 PM   #22
roland1
Connoisseur
roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.
 
roland1's Avatar
 
Posts: 80
Karma: 2137678
Join Date: Dec 2021
Location: Canada
Device: none
Well, one thing's for sure, I have to find an ebook creation formula that works. I don't want people looking at previews of my book online and cringing or being afraid to buy it because of how bad it looks.
roland1 is offline   Reply With Quote
Old 03-30-2022, 03:40 PM   #23
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: 46,262
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by phillipgessert View Post
Ha, that stood out to me too, but since I don't use them, I wasn't very confident that was the issue. Seems likely.

I also don't remember why I don't. It does kind of seem like a needless abstraction to use a multiple of the font-size of the html element rather than that of the element you're actually working with. If I had to guess, rems would be mainly useful for highly precise, grid- and baseline-oriented layouts, and those won't work for ebook where user controls would throw it all out of whack anyway.
As far as I recall, using rem was supposed to help prevent some issues with inheritance where you were nesting elements. If I set a header to font-size: 2em; and then set a font-size: 1.5em on something inside that header, that text would display at 3 em whereas using 1.5rem would display the text at 1.5em (assuming I set root size to 1em).
DNSB is online now   Reply With Quote
Old 03-30-2022, 04:21 PM   #24
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by DNSB View Post
As far as I recall, using rem was supposed to help prevent some issues with inheritance where you were nesting elements. If I set a header to font-size: 2em; and then set a font-size: 1.5em on something inside that header, that text would display at 3 em whereas using 1.5rem would display the text at 1.5em (assuming I set root size to 1em).
I think that's right, but I also think that in our test ebooks, they didn't work worth a shoot.

Hitch
Hitch is offline   Reply With Quote
Old 03-30-2022, 05:18 PM   #25
roland1
Connoisseur
roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.
 
roland1's Avatar
 
Posts: 80
Karma: 2137678
Join Date: Dec 2021
Location: Canada
Device: none
I think I'll stay away from the em/rem thing and maybe go points, or pixels. I'll have to dig deeper into this. I may have been a bit cavalier the first time around.

Q. Which measurement unit are you guys most consistently using for ePub reflowable ebooks? And do you leave out line height altogether — to allow users that choice, as was earlier mentioned? (which makes total sense).
roland1 is offline   Reply With Quote
Old 03-30-2022, 05:26 PM   #26
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 316
Karma: 3200000
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
You shouldn't use fixed units like points or pixels for that, or really anything text-related. It needs to be something that will scale up or down with user-selected font size changes, and those won't.

I think you'll find that the most common unit for text-related stuff is ems, and for most everything else it will be % (width). You'll mainly see fixed units like px for borders and the like.
phillipgessert is offline   Reply With Quote
Old 03-30-2022, 05:42 PM   #27
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: 79,763
Karma: 145864619
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 Hitch View Post
Guys, Phillip, Dion, anybody, remember why we're not all using REM? Or, hell, maybe I'm wrong?

Hitch
Because in a lot of situations it does not work.
JSWolf is offline   Reply With Quote
Old 03-30-2022, 05:51 PM   #28
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: 79,763
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@roland1, This is the code I use. Code for a blockquote is for the offset text. .blockquote is for when the blockquote end at the end of the chapter and is used as a class <blockquote class="blockquote">. Body is to setup the layout with no widows and orphans and justified text. No need to justify the text any other place. Hr is for section break markers. It gives a 20% line to separate sections. Img is to make sure images do not go off the screen. And finally P is to setup a proper margin for paragraphs. You only need <p> in most cases. Noindent is to class P to give a paragraph or line with no indent.

Code:
blockquote {
  margin-top: 1em;
  margin-right: 1.5em;
  margin-bottom: 1em;
  margin-left: 1.5em;
}
.blockquote {
  margin-top: 1em;
  margin-right: 1.5em;
  margin-bottom: 0;
  margin-left: 1.5em;
}
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}
hr {
  margin-top: 1em;
  margin-right: 40%;
  margin-bottom: 0.9em;
  margin-left: 40%;
  border-top: 2px solid;
}
img {
  max-height: 100%;
  max-width: 100%;
}
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
.noindent {
  text-indent: 0;
}
This is what I call some good code. And not a single REM in site.

By the way, What you really should do is install ADE 2.0.1 and use that to check out how your ePub looks.

You can get ADE 2.0.1 for Windows or MAC (32-bit) here. Adobe took down the page, but The Wayback Machine still has it.
https://web.archive.org/web/20200619...downloads.html

Last edited by JSWolf; 03-30-2022 at 06:00 PM.
JSWolf is offline   Reply With Quote
Old 03-30-2022, 06:27 PM   #29
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: 46,262
Karma: 168983734
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
By the way, What you really should do is install ADE 2.0.1 and use that to check out how your ePub looks.

You can get ADE 2.0.1 for Windows or MAC (32-bit) here. Adobe took down the page, but The Wayback Machine still has it.
https://web.archive.org/web/20200619...downloads.html
ADE 2.0.1 is somewhat useful but then having a selection of ereaders and renderers to test your ebooks is even more useful. When I am working on an ebook that is going to be published, I like to test on both epub and Kindle ereaders and renderers with the objective of producing something that may not be the prettiest but it will be readable on multiple platforms saving the author from drowning in complaints and without needing me to produce an edition for every platform. The addition to Sigil of multiple renderers (BibiReader, EpubJSReader and ReadiumReader) in addition to it's builtin preview has been very helpful.
DNSB is online now   Reply With Quote
Old 03-30-2022, 06:45 PM   #30
roland1
Connoisseur
roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.roland1 ought to be getting tired of karma fortunes by now.
 
roland1's Avatar
 
Posts: 80
Karma: 2137678
Join Date: Dec 2021
Location: Canada
Device: none
Thanks, JSWolf —*this is the kind of input I was hoping for; that we could find some consensus and have some examples of what "seems" to work in most combat situations.

I installed Java 1.8 yesterday, so I'm going to install a few more readers into Sigil (one's I had trouble with earlier for some reason.)

But it looks like I might at least get some solid footing in the ebook creation world with what you guys have posted.

Thank you, I do appreciate it.
roland1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filenames on Nook Simple Touch oddly mangled ChristopherTD Devices 2 07-20-2013 06:25 AM
Kobo not charging and mangled USB ports caroliv Kobo Reader 1 01-25-2013 06:57 AM
K3 is mangled - cannot update to 3.4 horizon21 Kindle Developer's Corner 20 10-12-2012 10:31 AM
ebook preview venkatesh General Discussions 12 11-18-2010 11:58 AM
eBook viewer Print Preview settings not saved Agama Calibre 3 08-22-2010 08:04 PM


All times are GMT -4. The time now is 07:45 PM.


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