• Print

A Kindle developer’s 2013 wishlist

Despite a huge leap forward there's still plenty of room for improvement

2012 was a good year for Kindle developers. With the unveiling of the first-generation Fire tablet in late 2011 and the release of the KF8 Mobi format in early 2012, designing beautiful ebooks for the Kindle platform became a reality. KF8 introduced a fixed-layout specification for Kindle Fire, which opened the door to graphically rich titles—children’s books, graphic novels—in Mobi format. KF8 also greatly increased CSS2 compliance for standard reflowable ebooks, implemented a handful of CSS3 features (text shadow, rounded borders), and added support for embedded fonts. The subsequent rollout of KF8 to Kindle eInk readers running firmware 3.4 (including the new Kindle Paperwhite) and KF8′s support for @media queries to enable fallback styling for non-KF8 devices helped to increase rendering parity within the diverse Kindle ecosystem.

But while 2012 marks a huge leap forward toward the incorporation of modern Web standards into the Kindle platform, there is still much room for improvement in terms of multimedia/interactivity, content rendering, and ease of ebook development. Here is my humble*** wish list of improvements for the Kindle platform for 2013:

1. Add support for embedded audio/video to Kindle Fire

When KF8 was introduced in early 2012, support for audio/video was not included in the format—even though MP3 audio and MP4 video were already supported in Kindle for iOS. Nearly 12 months later, the Kindle Publisher Guidelines still read, “Currently, only Kindle for IOS [sic] supports audio and/or video content. Kindle e Ink devices and Kindle Fire do not support Kindle Editions with Audio/Video.”

Given that support for streaming multimedia content via Amazon Instant Video is such a highly touted feature of Kindle Fire, it’s rather surprising that Amazon has not been more assiduously pursuing support for embedded multimedia for Kindle Fire ebooks. As a result of this discrepancy—Kindle Fire supports KF8 but not audio/video, and Kindle for iOS supports audio/video but not KF8—there is no single Kindle platform that supports all the ebook features that Amazon offers. Those Kindle readers who opt to buy a Fire over an iPad are penalized by not being able to view embedded video in ebooks, and those who opt to instead read their ebooks on Kindle for iOS are penalized with a lower-quality reading experience, as embedded fonts and many key CSS features will not be supported. This should be rectified ASAP. Here’s hoping that by this time next year, embedded audio/video is supported on every Kindle tablet device, and that KF8 is supported on Kindle for iOS.

2. Add KF8 support for MathML

High-quality typesetting of mathematical equations is a challenge in most digital formats, and Kindle is no exception. Because Kindle’s KF8 format does not support MathML (a XML vocabulary for markup of math content that is part of the HTML5 specification and supported to varying degrees in different desktop and mobile Web browsers), the only viable typesetting option for including complex equations, matrices, etc., in ebooks is to embed the math content as images. However this approach is far from ideal, because when implemented as images, mathematical equations are not searchable or resizable by readers. Optimizing image size can also be challenging. See the Kindle Paperwhite screenshot below featuring two equation images scaled to the same size, which results in the longer equation (bottom) being more heavily “shrunk” than the shorter equation (top).

Two probability equation images rendered on Kindle Paperwhite, the bottom equation "shrunk" more than the top equation

Two probability equation images rendered on Kindle Paperwhite, the bottom equation “shrunk” more than the top equation

Adding MathML support to KF8 would remove the burden for equation sizing and resolution from publishers and developers, and place it on the ereader’s rendering engine, where it belongs. As Adam Hyde notes in his TOC post on math typesetting, the current state of MathML support in browsers and on the Web is rather woeful, forcing reliance on third-party libraries like MathJAX to correct and normalize rendering. But this presents a huge opportunity for ereader vendors like Amazon. Adding robust MathML support may provide a competitive advantage in the likely-to-grow ebook marketplace for math and science textbooks. iBooks already provides limited MathML support via its WebKit engine; your move Amazon!

3. Add a Monospace Default Font to Kindle Paperwhite

The Kindle Paperwhite ereader contains six system fonts: Baskerville, Caecilia, Caecilia Condensed, Futura, Helvetica, and Palatino. None of these is a monospace font. Monospace fonts are critically important for technical-book publishers, because elements such as code listings and ASCII art must be formatted such that every character is of equal width, in order for them to render properly.

Because Paperwhite supports the KF8 format, Mobi developers can embed their own monospace font if their content requires it (O’Reilly embeds the Ubuntu Mono font family in its Mobis). However, by default, Kindle Paperwhite has Publisher fonts turned off, so readers must navigate to the Kindle font menu themselves and enable the Publisher Font option—which they may not know they need to do. Compare the rendering of the code block below on Kindle Paperwhite with Publisher Fonts turned on (left) and Publisher Fonts turned off (right):

The same code listing displayed on Kindle Paperwhite, with Publisher Fonts turned off (left) and Publisher Fonts turned on (right)

The same code listing displayed on Kindle Paperwhite, with Publisher Fonts turned on (left) and Publisher Fonts turned off (right)

Kindle customers shouldn’t have to be educated to enable Publisher Fonts to ensure monospace content is displayed properly, and publishers shouldn’t be required to embed additional fonts (which bloat Mobi file size) to enable monospace functionality. Ereader vendors should provide a rich set of system fonts, optimized for their rendering engine, that meet the needs of publishers of fiction, technical reference books, or anything in between. Both legacy eInk Kindle devices and the Kindle Fire have monospace system fonts; please extend this support to Paperwhite as well.

4. Add more granularity to @media query support

One of the best CSS features added to KF8 was support for two specific @media queries: @amzn-kf8 and @amzn-mobi. These two queries allow Kindle developers to segregate their CSS so that styling that takes advantage of KF8 features (in an @amzn-kf8 block) is ignored on legacy Mobi7 Kindle ereaders, and fallback styling (in an @amzn-mobi block) will be used instead on the legacy devices.

This @media query support was a boon when Kindle Fire was the only device in the Kindle family that was KF8-enabled, because you could use @amzn-kf8 to specify not only KF8-specific features, but also four-color-specific styling for Fire tablets that would be ignored on the black-and-white devices. However, now that eInk readers like Kindle Paperwhite also support KF8, they also use the CSS specified under @amzn-kf8, which means it is not possible to target CSS for the tablet readers and provide graceful degradation for eInk. See the screenshots below, which show the same syntax-highlighted code example side-by-side on Kindle Fire (left) and Kindle Paperwhite (right).

Rendering of syntax-highlighted code listing on the four-color Kindle Fire tablet (left) and the eInk Kindle Paperwhite (right)

Rendering of syntax-highlighted code listing on the four-color Kindle Fire tablet (left) and the eInk Kindle Paperwhite (right)

I’d love to see support added for @media queries such as @amzn-kindlefire, @amzn-kindlepaperwhite, and so on, so that Kindle developers are better able to tailor Mobi content to the unique capabilities of each ereader. (This would be an equally welcome feature for other ereader platforms that encompass both eInk and tablet devices—e.g., NOOK, Kobo.)

5. Add a “View Source” option to Kindle Previewer

Kindle Previewer is an excellent emulator that allows you to quickly review how a Mobi file will display on all major Kindle platforms (see screenshot below).

Kindle Previewer for Mac in Paperwhite Mode

Kindle Previewer for Mac in Paperwhite Mode

But one thing you can’t do in Previewer is inspect the underlying HTML/CSS source code to debug any rendering oddities that may be present. There are tools available, such as mobiunpack, which you can use to crack open a Mobi file and see the source, but they are neither especially convenient nor user-friendly. Having “View Source” functionality built into Kindle Previewer would be a huge timesaver.

What features are on your 2013 Kindle developer wishlist? Hit the comments and share your requests.


*** I’d love to have put “EPUB 3 support on Kindle” at the top of my wishlist, but sadly I don’t see that being a realistic request.

TOC NY 2013— The publishing industry will gather at the Tools of Change for Publishing Conference in New York City, February 12-14, to explore the forces and solutions that are transforming publishing.Save 15% on registration with the code COMM15
tags: , , , , , , , , , , , , , ,
  • amarie000

    Excellent list!

  • http://hairysun.com/ matt harrison

    Good list. I’ve run into a few of these publishing my own books (my next book is actually about cross platform HTML/CSS for KF8/Mobi-7/Epub.) My biggest gripe is that KF8 has inconsistent rendering across devices.
    1- I’m sort of mixed on. I’m trying to think of a book where I really wanted video/sound. Of course since I’ve never had it I don’t know what I could be missing.2- MathML would be interesting. I’ve gotten simple math code with just unicode but admittedly it is simple. Maybe I’ll mess around with MathJAX. Does any other epub platform support it?
    3- I’ve got a monospace on my paperwhite… tt and pre don’t render monospace?
    4- I’ve tried combing size media queries with  amzn-fk8. Haven’t had luck so far but I think it’s possible.
    5- With KF8, previewing is not really an issue. I’ve found mobiunpack immensely useful for the mobi-7 format.  It would be interesting if Amazon released numbers similar to cell phone co’s so people understood how much mobi-7 support they really needed.

    • http://hairysun.com/ matt harrison

      Looks like KF8 currently lacks support for “and” clauses in media queries. Hopefully they fix that bug.

    • http://peter.krautzberger.info/ Peter Krautzberger

      MathJax has been used by a number of ebook reading apps internally to provide MathML support, see http://www.mathjax.org/resources/epub-readers/. On epub3 reading systems that allow javascript execution, you can actually include it in your epub3 file, but this isn’t ideal and is usually used with interactive content in mind (user input, graphing/plotting etc) — although I know of one case where it’s used to overcome iOS5′s buggy MathML support.

    • Guido

       Audio/ video should be possible in EPUB file formats, right ? Audio + video seems available for Kindle FIRE Magazines on Amazon newsstand ….. So there should be a way for Kindle FITE tablets, right ?

      • Sanders Kleinfeld

        @0ab1600fc5db2e78a834c1e83da46f9f:disqus Yes, HTML5 audio/video is part of the EPUB 3 specification, although EPUB 3-compliant ereaders are not required to support audio/video. Right now, both the iBooks and NOOK Tablet/Color ereaders support audio and video.

        I’m not familiar with how Kindle Newsstand magazine content is formatted and whether audio/video is supported there. Audio/video not supported at this time for KF8 Mobi ebooks on Kindle Fire, though.

    • Sanders Kleinfeld

      @matt, re: your comments:

      1. Agree that audio/video is not a good fit for every ebook, and should not be used indiscriminately, but for those books where multimedia adds value, it would be great to see audio/video support on all Kindle tablet platforms–including both iOS and Fire.

      2. If you’ve got simple math equations that can be represented with just unicode and superscripts/subscripts, MathML is not needed, and your best bet is to stick with standard HTML markup. For complex equations, there is limited MathML support in iBooks, which has a Webkit engine. As Peter notes, MathJAX should be supported on any EPUB3 ereading system that supports scripting via JavaScript. I’ve only tested on iBooks, and the results were a bit of a mixed bag. First, I had to embed all the MathJAX JS assets (around 19 MB) locally in the EPUB file (as iBooks doesn’t support making outside network calls to access it via the MathJAX CDN), and then I found that the MathJAX rendering improved some equation rendering in iBooks but made others look worse (bad placement of equation elements, overlapping elements, etc.). Also, I found that MathJAX only worked properly in iBooks Scroll mode; in standard Book mode, only the equations on the first page of the document were rendered.

      If others have had better results using MathML with MathJAX on iBooks, would love to hear any tips or suggestions with respect to best practices.

      3. No, Paperwhite doesn’t have a monospace system font, so you must embed your own monospace font in your Mobi and have Publisher Fonts turned on in order for “pre” text to render in monospace.

      4. Cool, that would be great. I don’t see any reference to using size media queries with amzn-kf8 in the Kindle Publisher Guidelines, and haven’t yet tested this myself, but if you do find some queries that successfully distinguish between Paperwhite and Fire, please let us know.

      5. Agreed that a View Source mode is less of a must-have for KF8, as HTML+CSS content translates from EPUB to Mobi pretty much exactly as expected. But also agree that as long as Mobi7 is still around, it would definitely be a huge help in troubleshooting.

  • http://twitter.com/adamwitwer Adam Witwer

    Regarding the missing monospace font in the Paperwhite, it’s like déjà vu all over again. If you remember, the first generation Kindle had no monospace font, which was one of the big problems in presenting technical content on that device. The other was the lack of support for tables — I guess we should be glad we didn’t lose that!

    • An0nym0usC0ward

      regarding “déjà vu all over again” that’s an (IMO) unnecessary repetition.

  • Glenda Browne

    Yes to EPUB3 support, and wishing for support for active, linked indexes. 

  • http://www.facebook.com/people/Jenny-Jones/100004621930183 Jenny Jones

    The Kindle Fire HD is great! I’m absolutely in LOVE with this thing! It’s easy to use so I didn’t have to go searching the internet for tutorials. Here’s the one I have on Amazon http://bit.ly/XkwZQ2. If you’re looking to get a tablet I’d recommend the Kindle Fire HD over the other tablets, it really blows them away. :)

    • Guido

       Uh, Jenny. Low buff marketing.

  • Chris Jennings

    IWant

    Double page spreads flowable on kindle fire when in landscape view
    CSS: first child
    HTML/CSS support for q tag
    Media overlays / smil
    Non linear content and pop ups

  • dgatwood

    If Kindle actually supported media queries properly, you would be able to do this:
    @media  amzn-kf8 and (color) {…}

    for the LCD-based displays and

    @media  amzn-kf8 and (color-index) {…}

    for a device that can display only certain specific colors.

    Unfortunately, at least if the previewer isn’t lying to me, the e-ink devices claim to be color.  Oops.  You should definitely complain to the Amazon publishing folks about this, because they’re inarguably violating the CSS spec here.  :-)

  • mactechgeek

    Any news regarding point 1), yet? I’m going to build reflowable eBooks which won’t make a whole lot of sense without audio support. Did 2013 bring anything new to the table in this regard?