Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-04-2019, 12:48 AM   #16
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by mariowarner View Post
Hi guys and girls! So if I understand this, changing the line height in the CSS won't affect what's displayed on the kindle? Is the font size also default? It seemed to me that I had to change the settings between the books as the feel wasn't the same... Will have to check back to see if it's not my brain plalying tricks hehe!
Quote:
Originally Posted by Hitch View Post
Are you messing with them for your own reading pleasure, or are you making production books for people to buy on Amazon? That affects the answer.
I'm curious about the same thing, and I edit my ebooks for my own reading pleasure (and to accommodate my visual impairment).

My first ereader was a Sony years ago. That's when I started stripping publisher line-height and font-size to establish a consistent base-line. Then I would add the line-height and font-size I needed in order to read comfortably. This had the added benefit of making all of my ebooks consistent.

I never changed this workflow after moving to Kindle, but mariowarner's question makes me wonder.

Does publisher line-height and font-size have any effect on a Kindle or does the Kindle override it?
odamizu is offline   Reply With Quote
Old 05-04-2019, 01:18 PM   #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,462
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 odamizu View Post
I'm curious about the same thing, and I edit my ebooks for my own reading pleasure (and to accommodate my visual impairment).

My first ereader was a Sony years ago. That's when I started stripping publisher line-height and font-size to establish a consistent base-line. Then I would add the line-height and font-size I needed in order to read comfortably. This had the added benefit of making all of my ebooks consistent.

I never changed this workflow after moving to Kindle, but mariowarner's question makes me wonder.

Does publisher line-height and font-size have any effect on a Kindle or does the Kindle override it?
For line-height, the font size is the driver. It's exceedingly difficult to force, for example, a 1.4em line-height for a 1em font. However, if you size a body font to, say, 1.5ems, the line-height adjusts to suit it.

But, if you use your bog-standard 1em body font--it's 1.2, no matter what. I had this client that went b*tshit over the fact that the mobi we gave him had that line-height and spacing. His "other formatter's" work was "better" because the file that guy gave him was 1x line-spacing. I told him and demonstrated that no matter what, when that other, "better" file (yup, that's the sound of my teeth grinding) was uploaded to the KDP, the resulting final for-sale file had the ubiquitous 1.2em line-height.

So, if you're making it for yourself, sure, you can probably do what you want. However, if you are uploading it to the KDP, be aware that it's unlikely to work.

Also--if you force it, by putting in some "large-print edition" fontsize, say, 1.8 or what-have-you, you should fully expect an Amazon nastygram in the form of a KQN--Kindle Quality Notice, telling you, "Hey, boyo, fix this or we'll remove the book from sale."

The KPGuidelines are pretty clear about fonts, font sizes, etc. Remember, the publisher isn't Amazon's customer, the readers are, and they can be very, very annoyingly demanding about vanilla interiors, by and large.

Hitch
Hitch is offline   Reply With Quote
Advert
Old 05-04-2019, 02:23 PM   #18
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: 73,970
Karma: 128903378
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 odamizu View Post
Interesting. It's been a while, but the last time I tried it in <html> and <body> it didn't work for me. I had to resort to <p>. Maybe something has changed in the Kindle rendering software since then. When I get a chance, I will try again.

As for -45px, I'm sure that works, too. I just use -36px as a matter of personal preference.
-45px is only useful on a 300DPI Kindle.

I've never set a negative margin in body. I just did it in html at the top of the CSS.

Code:
html {
  margin-right: -45px;
  margin-left: -45px;
}
That does work. Nothing else need be done.
JSWolf is offline   Reply With Quote
Old 05-04-2019, 02:27 PM   #19
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
There is a way to reduce the line-height. Use my ChareInk font as the metric in the font have been adjusted so on a Kindle it is less then default line height.

One thing I am going to try is a negative line-height and see if that works. I'll try it with Bookerly and see if I can fix the line-height.
JSWolf is offline   Reply With Quote
Old 05-04-2019, 03:35 PM   #20
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by odamizu View Post
... I started stripping publisher line-height and font-size to establish a consistent base-line. Then I would add the line-height and font-size I needed in order to read comfortably ... I never changed this workflow after moving to Kindle ...
I should clarify that after moving to Kindle, I continue to strip publisher line-height and font-size, but no longer need to add custom line-height and font-size. Once publisher line-height and font-size are stripped, using the Kindle's menus to control line height and font size (with the help of FONT_RAMP) does everything I need.

Quote:
Originally Posted by Hitch View Post
... The KPGuidelines are pretty clear about fonts, font sizes, etc. ...
Thank you for pointing me to KPG. I should have thought to look there already For others like me, here's what it says:

Quote:

9.3.2 Body Text Must Use Defaults
The body text in a reflowable Kindle book (fiction and non-fiction) must be all defaults ... The reason for this is that any styling on body text in the HTML will override the user’s preferred default reading settings. Users report such behavior as a poor reading experience. Here are the most important points:

• The body text font should be set in the CSS using the font-family attribute. Body text must use the default font size (1em) and line height. Body text should not use the <font size="..."> tag or the font-size and line-height attributes in CSS.

...

The following font fixes will be applied in during the upload process: The font size used in the majority of the content will be normalized to 1em ...

Quote:
Originally Posted by JSWolf View Post
... I've never set a negative margin in body. I just did it in html at the top of the CSS.

Code:
html {
  margin-right: -45px;
  margin-left: -45px;
}
That does work. Nothing else need be done.
Yes, I just tried it and it's working for me now. Not sure why it didn't when I first started messing with negative margins a few years ago.

However, if the book has left/right margins set at a higher level in the CSS cascade (e.g., <p>), then don't those need to be deleted? Otherwise, wouldn't the <p> margins override alter the <html> margins?

Last edited by odamizu; 05-04-2019 at 05:01 PM. Reason: added link to Kindle Publishing Guidelines
odamizu is offline   Reply With Quote
Advert
Old 05-04-2019, 03:47 PM   #21
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: 73,970
Karma: 128903378
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 odamizu View Post
Yes, I just tried it and it's working for me now. Not sure why it didn't when I first started messing with negative margins a few years ago.

However, if the book has left/right margins set at a higher level in the CSS cascade (e.g., <p>), then don't those need to be deleted? Otherwise, wouldn't the <p> margins override the <html> margins?
No idea why it didn't work. But at least it works now.

As for margins in <p>, I make sure there are no margins and I use a plain <p>. I edit out the <p="someuselessclass"> and make it just <p>. it's very easy to do this. Then for every class that has a center, I make sure there is a text-indent of 0.
JSWolf is offline   Reply With Quote
Old 05-04-2019, 04:28 PM   #22
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by odamizu View Post
However, if the book has left/right margins set at a higher level in the CSS cascade (e.g., <p>), then don't those need to be deleted? Otherwise, wouldn't the <p> margins override the <html> margins?
I don't know the specifics of CSS behaviour on a Kindle but normally cascading style attributes don't all work the same.

To the best of my knowledge left/right margins are additive. For instance, if you had CSS like
Code:
body {margin-left: 1em; font-size: 1.5em; font-family: serif}

blockquote {margin-left: 2em; font-size: 0.75em; font-family: monospace}

p {margin-left: 0.5em; font-size: 2em; font-family: sans-serif}
with HTML:
Code:
<body>
  <blockquote>
    <p>The text in these paragraphs will all have:</p>
    <p>- an additive left-margin of 1+2+0.5 = 3.5em</p>
    <p>- a multiplicative font-size of 1.5*0.75*2 = 2.25em</p>
    <p>- the most specific override font-family = sans-serif</p>
 </blockquote>
</body>
jackie_w is offline   Reply With Quote
Old 05-04-2019, 04:51 PM   #23
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Quote:
Originally Posted by JSWolf View Post
... As for margins in <p>, I make sure there are no margins and I use a plain <p>. I edit out the <p="someuselessclass"> and make it just <p>. it's very easy to do this. Then for every class that has a center, I make sure there is a text-indent of 0.
That's my point exactly. You had written that after setting negative margins at the <html> level, "Nothing else need be done."

However, if the publisher has set margins at the <p> level, then you need to delete or adjust those margins, otherwise the negative margins at the <html> level won't work as desired.

Note: I'm not arguing against setting negative margins at the <html> level; in fact, I may start using <html> instead of <p>. I'm just saying it's not always as simple as inserting a couple lines of CSS to add negative margins to <html>.

Quote:
Originally Posted by jackie_w View Post
I don't know the specifics of CSS behaviour on a Kindle but normally cascading style attributes don't all work the same.

To the best of my knowledge left/right margins are additive ...
Yes, I think that's correct. I shouldn't have used the word "override" as that's not accurate.

If you set negative margins of -45px for <html> and the publisher has margins of 5px for <p>, then I think you end up with with <p> margins of -40px. So if you want negative margins of -45px you need to delete or adjust the margin settings for <p>.

Last edited by odamizu; 05-05-2019 at 03:35 PM.
odamizu is offline   Reply With Quote
Old 05-05-2019, 03:47 PM   #24
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: 73,970
Karma: 128903378
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 odamizu View Post
That's my point exactly. You had written that after setting negative margins at the <html> level, "Nothing else need be done."

However, if the publisher has set margins at the <p> level, then you need to delete or adjust those margins, otherwise the negative margins at the <html> level won't work as desired.

Note: I'm not arguing against setting negative margins at the <html> level; in fact, I may start using <html> instead of <p>. I'm just saying it's not always as simple as inserting a couple lines of CSS to add negative margins to <html>.
Yes, you are correct. My statement was not 100% correct. Yes, you do need to check to left/right margins in <body>, whatever class is used with <p> and for any @page.

Quote:
Yes, I think that's correct. I shouldn't have used the word "override" as that's not accurate.

If you set negative margins of -45px for <html> and the publisher has margins of 5px for <p>, then I think you end up with with <p> margins of -40px. So if you want negative margins of -45px you need to delete or adjust the margin settings for <p>.
I would expect that to be the case just as you've described.
JSWolf is offline   Reply With Quote
Old 05-07-2019, 09:32 PM   #25
mariowarner
Junior Member
mariowarner began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: kindle
Quote:
Originally Posted by Hitch View Post
Are you messing with them for your own reading pleasure, or are you making production books for people to buy on Amazon? That affects the answer.

Hitch
It is for my own pleasure I'd like to make use of the digital format to get everything streamlined!
mariowarner is offline   Reply With Quote
Old 05-07-2019, 09:35 PM   #26
mariowarner
Junior Member
mariowarner began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: kindle
Quote:
Originally Posted by odamizu View Post
I just tried <html> and it's working for me, too! Not sure what changed from the last time I tried it (years ago). Strangely, <body> still doesn't work. If anyone has any theories on why this is, I'd be really interested to learn this.

@mariowarner: What does this mean: "the <p> lines would disappear after saving the editor"? (I use Sigil rather than Calibre, so maybe it's a Calibre thing?)
Well, I pu the line in the CSS of the editor in Calibre and when I hit save, quit and reopen, the line just disappeared... The html line stays! I find it very weird.
mariowarner is offline   Reply With Quote
Old 05-07-2019, 09:42 PM   #27
mariowarner
Junior Member
mariowarner began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: kindle
Hehe, I do not get everything you are talking about so I will come back to this when I have a better understanding of the editor and have more time to fool around Thanks to you guys I was able to reduce the margins, which is a great deal for me!

Now, for one of the books I added the html line to reduce the margins, it somehow also changed the font size of the wholel book to something smaller... Any ideas how this happened?
mariowarner is offline   Reply With Quote
Old 05-08-2019, 12:00 AM   #28
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Can you use the Preferences > Conversion > Common Options > Look & feel > Styling and check the boxes at the bottom for Margins and Padding? I have all of them checked. For my kindle I download the books in EPUB format, then convert them to AZW3. If it's a book from amazon, on the Manage Your Content and Devices page I've set the Default Device to Kindle Cloud so that it doesn't send the book to my kindle, then on the page that lists the books I click on the 3 dots button and select Download & transfer via USB. Then add that to calibre and convert it to EPUB, then delete calibre's AZW3 and convert the EPUB to AZW3; at that point it's ready for calibre to send it to my kindle. The conversion removes all that styling stuff whose boxes I've checked.

Click image for larger version

Name:	SharedScreenshot.jpg
Views:	325
Size:	86.9 KB
ID:	171373

Last edited by lumpynose; 05-08-2019 at 12:03 AM.
lumpynose is offline   Reply With Quote
Old 05-08-2019, 11:50 AM   #29
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
Yes. That's why a line-hight is not needed. It's not even needed in an ePub.
I'm glad to hear it, since I've never been tempted to specify line height!
Notjohn is offline   Reply With Quote
Old 05-11-2019, 01:11 PM   #30
mariowarner
Junior Member
mariowarner began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2018
Device: kindle
Quote:
Originally Posted by lumpynose View Post
Can you use the Preferences > Conversion > Common Options > Look & feel > Styling and check the boxes at the bottom for Margins and Padding? I have all of them checked. For my kindle I download the books in EPUB format, then convert them to AZW3. If it's a book from amazon, on the Manage Your Content and Devices page I've set the Default Device to Kindle Cloud so that it doesn't send the book to my kindle, then on the page that lists the books I click on the 3 dots button and select Download & transfer via USB. Then add that to calibre and convert it to EPUB, then delete calibre's AZW3 and convert the EPUB to AZW3; at that point it's ready for calibre to send it to my kindle. The conversion removes all that styling stuff whose boxes I've checked.

Attachment 171373
Oh, I will definitely try this! I hope it works on my side! But hiw does this reduce the margins? Would you have to still add the CSS line?
mariowarner is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reduce line spacing int the main window ? PO40600 Library Management 8 12-29-2015 04:15 PM
How do I reduce line spacing when I have superscripts jrjung Conversion 2 09-04-2015 03:36 PM
Hack to reduce KF8 line height JSWolf Kindle Developer's Corner 2 10-05-2014 05:06 PM
Icarus 9.7 'Pdf Reader' app and spacing, margins and fonts einkuser Onyx Boox 2 03-21-2014 08:04 PM
Line Spacing and Margins la3541 Sony Reader 0 06-02-2008 06:35 PM


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


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