Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-11-2011, 06:19 PM   #1
SkookumPete
Enthusiast
SkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavens
 
Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
Making text look good on the Kindle

Having converted just three public domain books I cannot present myself as an expert formatter, but being picky about typography and the general appearance of text, I thought I'd pass on a few things I've learned.

For what it's worth, I edit the HTML in Notepad++ and then import it (via an "invisible" TOC file that is nothing but a list of references to the source files) into Calibre. I use CSS for formatting, but none of the tips here depend on this; if you prefer, you can do all formatting in-line.

My goal has been to make the typography as much as possible like the printed text. If the book uses an all-caps centered boldface for chapter titles, so will the e-book. If a long passage is printed as a block quote in a smaller font, it is so treated as far as the Kindle allows. The chief exception is that I don't reduce the font size for the text of footnotes, since the smaller size in printed text is mostly a space-saving measure that doesn't need to be taken with e-books.

When you start messing around with Kindle formatting you soon realize the limitations. For instance, you can't set a right margin for a block quote. Sensibly, Kindle judges that screen space is too limited for that luxury, though it allows you to set the left margin. You can create a hanging indent paragraph style, but I've been unable to replicate two levels of hanging indent (such as in a block of verse where alternate lines are indented differently, and you want both styles to hang when text is wrapped).

Simple tables work well. For instance, say you want to publish an epic poem with the verse numbers in the left margin every so often. A simple table of one verse per row, with blank left-hand cells for the unnumbered verses, works well. Don't try to put the verse number at the top of the cell and then cram five or ten lines of verse into the same row; the results are unlikely to be satisfactory. To override the default decisions about column width, I've found that you can set the width of the first cell to a percentage of the table, and the rest of the column lines up neatly.

Superscripts (and presumably subscripts) are a pain. I have not found any way of superscripting a footnote number without creating blank space above the line. Some commercial e-books are sold this way and to me it looks sloppy. My solution has been to simply print the footnote numbers on the baseline in a slightly smaller font and lighter color, or bracketed if there are not too many of them. Aside from these cues, the link underlining sufficiently sets the note apart from the text.

Speaking of smaller fonts, the Kindle does recognize the font-size attribute, which I generally set as a percentage. Of course, there is no font smaller than the smallest regular display font, so effects such as block quotes in a smaller size only work if the user sets a font larger than the minimum.

You can also use the font-variant attribute to create small caps (where lower-case letters are given the form but not the height of capitals), and the text-transform attribute to set all capitals. Why would you want to do this second thing rather than just typing the capitals in the first place? Suppose you have a chapter heading that reads, "<h1>CHAPTER 1<br>THE COMING OF SPRING</h1>". The TOC generator shows the title just like this, without the line break. What if you want this to appear in the TOC as "Chapter 1: The Coming of Spring"? Well, type it just that way between the heading tags (inserting the line break), and then set text-transform to "uppercase". The transformation determines how the heading looks in the text, but the Calibre TOC generator ignores it. As for the magically appearing colon: applying a pure white font color to it makes it invisible on the page, but in the TOC it appears as plain black text.

Drop caps don't work, or at least I haven't found a way to make them work. Kindle wants to display the big character on top of the line, and I believe I can understand why.

Non-break spaces are available and can be used to advantage; for instance, to create an equal space after each number in a list regardless of the vagaries of justification. I would also probably use one in something like "St. Paul" to keep the line from breaking between the sainthood and the man. But they must be used sparingly to keep justification from failing too often.

You can also help Kindle justification along by using en dash surrounded by normal spaces in place of em dash. Curiously, the Kindle will not break at dashes (or hard hyphens), creating in effect some very long words and some ugly spread-out neighbors. Mine is not necessarily the most elegant solution but it does make for a tidier look overall. You can always add a nonbreak space on either side if you object to the dash appearing at the end or at the beginning of a line.

Don't forget dingbats and other symbols, which can be used to mark the ends of chapters and so on. Kindle has a small selection as part of its limited support for Unicode, documented at http://kindlegen.s3.amazonaws.com/Am...Guidelines.pdf .

Lots has been said about curly quotes, yet I continue to be surprised by the number of e-books that appear without them. Straight ditto marks are for documents, not books. Calibre makes it easy to do the right thing by applying the SmartyPants algorithm when converting to Mobi; you can also run this Python script yourself to save the converted punctuation in the source files. Information about how to apply "smart quotes" in Word is readily available.

A lot of books don't require much formatting and the Kindle defaults are "good enough." But it's possible to bring a distinctive look and feel to e-books by exploring the Kindle's display abilities and going beyond the basics.

Last edited by SkookumPete; 08-12-2011 at 09:19 PM. Reason: typo
SkookumPete is offline   Reply With Quote
Old 08-11-2011, 06:41 PM   #2
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: 37,005
Karma: 18129756
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Since you say you are picky about the general appearance of the text, why did you go with a Kindle instead of a reader that supports ePub? What you are saying are problems in Mobipocket are not a problem in ePub.
JSWolf is offline   Reply With Quote
Old 08-12-2011, 04:29 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,142
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by SkookumPete View Post
You can create a hanging indent paragraph style, but I've been unable to replicate two levels of hanging indent (such as in a block of verse where alternate lines are indented differently, and you want both styles to hang when text is wrapped).
The mobipocket format as a special align="poetry" attribute that should right-align wrapped lines. I don't know if the Kindle supports it, and you probably need to use a set of <p></p> for each line.

Quote:
You can also use the font-variant attribute to create small caps
As all CSS, that depends on the converter. The mobipocket format does not support any kind of CSS, only a kind of pseudo-HTML language. Most converters, however, can recognize at least some CSS and transform it into something mobipocket likes. In the case of small-caps, you probably end up with something like: T<font size="-1">HE</font> C<font size="-1">OMING</font> <font size="-1">OF</font> S<font size="-1">PRING</font>

Quote:
Lots has been said about curly quotes
And one of the things I have said several times already is that you cannot trust any automatic parser, you should always at least manually check the result, particularly when there are apostrophes at the beginning of a word (like 'em, 'tis, 'ouse...), and worse if they are mixed with single quotes.
Jellby is offline   Reply With Quote
Old 08-12-2011, 08:18 PM   #4
SkookumPete
Enthusiast
SkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavens
 
Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
Thank you, Jellby, that is some good information and of course good advice about the quote marks. Mistakes are easily found in proofreading and can be corrected by hard-coding the character or entity. Look out for missing spaces as a cause of errors.

Interesting. The way <p align="poetry"> ends up, at least in the previewer, is ragged right. Could this be an easy way to defeat justification?

I doubt I will have much time to experiment with other converters, but I would be curious to know whether some of them get more or less out of the Kindle rendering engine. So far I'm very pleased with all sorts of things about Calibre, but there may be HTML or CSS that others handle better. I just don't know.

JSWolf, I feel like the guy who is tinkering with his Ford in the driveway, and his neighbor comes over and says, "You shoulda bought a Chev," and expects to be thanked for the advice. It wasn't in any way my intention to point out "problems" with Kindle rendering. I just suggested ways in which e-book makers can make their text more distinctive and attractive by using the capabilities that are there.

Last edited by SkookumPete; 08-12-2011 at 09:43 PM. Reason: more info
SkookumPete is offline   Reply With Quote
Old 08-12-2011, 10:54 PM   #5
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: 37,005
Karma: 18129756
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by SkookumPete View Post
JSWolf, I feel like the guy who is tinkering with his Ford in the driveway, and his neighbor comes over and says, "You shoulda bought a Chev," and expects to be thanked for the advice. It wasn't in any way my intention to point out "problems" with Kindle rendering. I just suggested ways in which e-book makers can make their text more distinctive and attractive by using the capabilities that are there.
Unfortunately, Mobipocket is doing some damage. It's holding back the potential of ePub as we get publishers not doing many things with ePub that won't convert well enough to Mobipocket. Basically, Amazon is causing eBooks to take giant steps backwards even though we have a forward stepping format. If Amazon dumped Mobipocket for ePub, we'd most likely get publishers doing things they aren't doing now and we'd get better looking eBooks then we do now.

Some of the best looking eBooks have been ones that I have seen hand crafted or I've made the changes and they then look better. I've seen too many ePub that do things that have a better way to be done with ePub. This is do to the fact that what could be done doesn't render as well in Mobipocket so the publisher takes the cheap shit way out to do it so they get the same or similar enough look on a Kindle.

Mobipocket has limits and moving to ePub would eliminate a lot of those limits.
JSWolf is offline   Reply With Quote
Old 08-12-2011, 11:01 PM   #6
SkookumPete
Enthusiast
SkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavens
 
Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
JSWolf, your views have merit I'm sure, but whether they belong in this thread is another question. This was intended to be a place where people could share what they've learned about formatting for the Kindle.
SkookumPete is offline   Reply With Quote
Old 08-13-2011, 04:02 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,142
Karma: 4792399
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Any book creator wanting to make good mobipocket books, should have the closest we have to a mobipocket reference bookmarked.
Jellby is offline   Reply With Quote
Old 08-18-2011, 03:25 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 63,364
Karma: 41542799
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Quote:
Originally Posted by SkookumPete View Post
You can create a hanging indent paragraph style, but I've been unable to replicate two levels of hanging indent (such as in a block of verse where alternate lines are indented differently, and you want both styles to hang when text is wrapped).
I indent poetry using the "&emsp" (em-space) character. This works well.
HarryT is online now   Reply With Quote
Old 08-20-2011, 12:38 PM   #9
SkookumPete
Enthusiast
SkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavens
 
Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by HarryT View Post
I indent poetry using the "&emsp" (em-space) character. This works well.
It works well until the line wraps and you get the rest of it flush-left. Better to create a paragraph style with margin-left set to 2 ems and text-indent to -1 em.
SkookumPete is offline   Reply With Quote
Old 08-24-2011, 11:34 AM   #10
sjkramer
Connoisseur
sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.
 
Posts: 65
Karma: 526028
Join Date: Nov 2009
Location: New York, NY
Device: iphone
Quote:
Originally Posted by SkookumPete View Post
It works well until the line wraps and you get the rest of it flush-left. Better to create a paragraph style with margin-left set to 2 ems and text-indent to -1 em.
Yes that works! And my way of getting around not being able to also add margin top/bottom is to create a poetry div that will do that.

We often have poems that exist within blockquotes, which means that they need to be left indented and then have a hanging indent. I can't for the life of me do this.

Is there some way around it? I would love to be totally wrong on this.
sjkramer is offline   Reply With Quote
Old 08-26-2011, 01:14 AM   #11
SkookumPete
Enthusiast
SkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavensSkookumPete is a rising star in the heavens
 
Posts: 42
Karma: 13888
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by sjkramer View Post
We often have poems that exist within blockquotes, which means that they need to be left indented and then have a hanging indent. I can't for the life of me do this.
As I mentioned, I haven't succeeded in an equivalent goal, which is to have two different verse styles, one indented more than the other, and both of which have independent hanging indents. The different indents work fine but I can't set more than one left margin.

Last edited by SkookumPete; 08-26-2011 at 01:15 AM. Reason: typo
SkookumPete is offline   Reply With Quote
Old 08-26-2012, 01:25 PM   #12
tesseract420
Member
tesseract420 is on a distinguished road
 
Posts: 19
Karma: 68
Join Date: Apr 2007
Device: sony prs-500
Drop caps

The received wisdom is that drop caps are not supported in mobi, but this comes close. I don't know how they did it. The URL is http://imgur.com/p58Bg if the graphic does not show up in-line.


Last edited by pdurrant; 08-27-2012 at 04:13 PM. Reason: fixed image link
tesseract420 is offline   Reply With Quote
Old 08-26-2012, 02:07 PM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,004
Karma: 40850468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
What device is that being rendered on? If it's a device that supports the KF8 format, then that's your explanation. You can do dropcaps with KF8.
DiapDealer is offline   Reply With Quote
Old 08-26-2012, 02:50 PM   #14
tesseract420
Member
tesseract420 is on a distinguished road
 
Posts: 19
Karma: 68
Join Date: Apr 2007
Device: sony prs-500
Quote:
Originally Posted by DiapDealer View Post
What device is that being rendered on? If it's a device that supports the KF8 format, then that's your explanation. You can do dropcaps with KF8.
I don't believe it's a KF8 file.
I saw this while reading on the Kindle for Mac app.
I took a look at the same text on the iPhone and instead of a drop cap a large, inline capital letter is displayed.
Interesting how that the behavior is different on different devices.
tesseract420 is offline   Reply With Quote
Old 08-26-2012, 03:20 PM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,004
Karma: 40850468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by tesseract420 View Post
I don't believe it's a KF8 file.
I saw this while reading on the Kindle for Mac app.
I took a look at the same text on the iPhone and instead of a drop cap a large, inline capital letter is displayed.
Interesting how that the behavior is different on different devices.
What you've described is actually proof that it's very likely a KF8 file: same book displaying differently on different devices/apps. I don't think the iPhone app supports KF8 yet, but I know the Kindle for Mac app does.

Traditional dropcaps simply can't be done in the older-style MOBIs—unless the entire first paragraph were an image. In which case, you'd be able to tell by increasing/decreasing font-size.
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
is the text on the Kobo Touch good enough? pyrokamileon Kobo Reader 12 06-28-2011 08:46 PM
making jpg look good on the Kindle screen Newmarket2 Kindle Developer's Corner 3 03-17-2011 02:44 PM
making a good start : new or used ? zelda_pinwheel Which one should I buy? 7 04-15-2009 11:05 PM
Anyone good at making widgets? daffy4u Workshop 4 12-01-2008 03:00 PM
Good text to java midlet, to read text in phones sucahyo Workshop 1 02-18-2005 12:56 PM


All times are GMT -4. The time now is 11:20 PM.


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