HTML Fixes for Kindle: More on Self Publishing Your Kindle Book, or Tips for Touching Up HTML from Microsoft Word and Other Apps So Your Ebook Looks as Good as It Possibly Can by Aaron Shepard

HTML Fixes for Kindle: More on Self Publishing Your Kindle Book, or Tips for Touching Up HTML from Microsoft Word and Other Apps So Your Ebook Looks as Good as It Possibly Can by Aaron Shepard

Author:Aaron Shepard [Shepard, Aaron]
Language: eng
Format: epub, azw3, mobi
Publisher: Shepard Publications
Published: 2013-11-21T05:00:00+00:00


HTML Fixes for Paragraphs

A word processor or page layout program may omit a setting from its exported HTML when the value is zero or another default. That’s perfectly acceptable in HTML. The problem is that the Kindle may then assume a different value entirely.

If, for example, you set a zero first-line paragraph indent in Word, the exported HTML won’t include that instruction, because it’s already the HTML default. So, the Kindle won’t get the message and will then use its own default—which is to indent!

In From Word to Kindle, the workaround I offered for this was to set a first-line indent in Word of .01 inch or cm. This forces Word to write the instruction to HTML, while the indent is small enough not to be noticed. Though that solution works fine, a quick find-and-replace can change the HTML to what it really should be. For the inch measurement:

Find: text-indent:.7pt;

Replace: text-indent:0;

Word uses a similar trick of its own to eliminate space after a paragraph, setting it to .0001 point. You can easily clean that up, too:

Find: margin-bottom:.0001pt;

Replace: margin-bottom:0;

A similar problem may arise when you want left alignment for your text. Here again, the instruction may be left out of exported HTML, because it is already the default. But without the instruction, the Kindle will justify—add space within lines to produce a smooth right margin. And because the Kindle justifies without properly hyphenating, this will make any text look bad.

From Word to Kindle gives a workaround for this too, but the problem is much simpler to fix in HTML. In your source document, make sure you justify any text you want left-aligned—in other words, make it the opposite of how you want it to wind up. That guarantees that an instruction will be written to HTML. Then change the instruction in code with a find-and-replace, such as this one for HTML from Word:

Find: text-align:justify

Replace: text-align:left

Having provided this fix, I must also warn you that Amazon does not like forced left alignment in Kindle books. Amazon is very attached to the amateurish look of its incompetent justification. So, in the event that a customer complains or that KDP staff have occasion to examine your book, you may well receive a “Quality Notice” asking you to degrade your Kindle book to meet Amazon’s guidelines. And they will check back with you periodically until the issue is “resolved.”

So far, I have been able to withstand these depredations simply by explaining that I prefer to leave my book as is. But I’m not sure that approach will always work. So, you may see this or another of my books with full justification—at least until I can get the ticket closed and then upload a version with left alignment restored. Please don’t hold it against me.

As I said, most Kindles will happily scale fonts for the user when the sizes are based on points. So, you’d expect the same treatment for format spaces like indents and space before and after paragraphs when based on points or inches or centimeters.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Whisky: Malt Whiskies of Scotland (Collins Little Books) by dominic roskrow(56008)
What's Done in Darkness by Kayla Perrin(26587)
The Fifty Shades Trilogy & Grey by E L James(19075)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(19055)
Shot Through the Heart by Mercy Celeste(18933)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 10 by Isuna Hasekura and Jyuu Ayakura(17107)
Python GUI Applications using PyQt5 : The hands-on guide to build apps with Python by Verdugo Leire(16978)
Peren F. Statistics for Business and Economics...Essential Formulas 3ed 2025 by Unknown(16868)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 03 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16815)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 01 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16440)
The Subtle Art of Not Giving a F*ck by Mark Manson(14350)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(14127)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(13612)
Scorched Earth by Nick Kyme(12765)
Drei Generationen auf dem Jakobsweg by Stein Pia(10961)
Suna by Ziefle Pia(10886)
Scythe by Neal Shusterman(10332)
International Relations from the Global South; Worlds of Difference; First Edition by Arlene B. Tickner & Karen Smith(9518)
Successful Proposal Strategies for Small Businesses: Using Knowledge Management ot Win Govenment, Private Sector, and International Contracts 3rd Edition by Robert Frey(9363)
This is Going to Hurt by Adam Kay(9171)