Posted on by & filed under Digital Publishing.

By Liza Daly, Vice-President of Engineering at Safari Books Online

IBM DeveloperWorks has posted my article on designing ebooks in the latest version of the open standard for ebooks, EPUB 3: Create rich-layout publications in EPUB 3 with HTML5, CSS3, and MathML.

Summary: EPUB 3.0, which is the latest revision of the industry-standard XML e-book format, jumps into modern web technology by embracing HTML5 and CSS3. It retains its focus on XML-driven toolkits by requiring XHTML serialization and adding supplementary XML vocabularies, such as MathML and SVG. EPUB 3 offers a variety of options for developing advanced, digital-native publications. In this article, learn to create rich-layout pages using some new features in EPUB 3.

Some implementation details not included in the post:

  • While a MathML example is shown running in iBooks, iBooks doesn’t yet fully support all or even most of MathML. Originally I had assumed this was a font-related problem, as mathematical symbols are not included in most default font libraries, but even with an embedded specialized math font-family many symbols were unavailable. This means at this time iBooks is only suitable for simple math.
  • Again with iBooks: you might expect that with an orientation media-query you could target layout in landscape mode on the iPad. In fact internally iBooks seems to treat landscape mode as two distinct portrait viewports (which of course they are). In my experiments I found that I couldn’t reliably target landscape mode with lower-width media queries either — the iBooks rendering engine seems to “think” they are full portrait-sized viewports.
  • Many thanks to the EpubCheck team for quickly resolving some of the bugs I uncovered while writing these test cases!
  • The sample EPUBs in this article are being donated to the IDPF as part of their EPUB 3 samples program. Thanks to IDPF CTO Markus Gylling for organizing that important effort.

EPUB guides on Safari Books Online

What is EPUB 3? by Matt Garrish. What is EPUB 3 discusses the exciting new format that is set to unleash a content revolution in the publishing world. Laden with features the printed page could never offer–such as embedded multimedia and scripted interactivity–EPUB 3 will forever change what a book can be. This article walks you through the format and puts it in its place in the digital landscape, explaining why EPUB 3 is set to become the new global standard for ebooks as it also becomes the new accessible standard for ebooks.
Accessible EPUB 3 by Matt Garrish. With the introduction of EPUB 3, publishers now have the means to create a single rich data source for audiences of all reading abilities. Through practical tips and examples, Accessible EPUB 3 takes you inside the EPUB 3 format and explores how you can enrich and enhance content for all readers. Author Matt Garrish demystifies the process of making content easier to access, demonstrating how accessible practices are intertwined with standard content best practices.
EPUB: Straight to the Point by Elizabeth Castro. This extensively researched guide to creating EPUB files by best-selling author Elizabeth Castro shows you how to prepare EPUB files, make the files look great on the screen, work around EPUB weaknesses, and fix common errors.
HTML5 for Publishers by Sanders Kleinfeld. HTML5 is revolutionizing the Web, and now it’s coming to your ebook reader! With the release of the EPUB 3 specification, HTML5 support will officially be a part of the EPUB standard, and publishers will be able to take full advantage of HTML5’s rich feature set to add rich media and interactivity to their ebook content. HTML5 for Publishers gives an overview of some of the most exciting features HTML5 provides to ebook content creators–audio/video, geolocation, and the Canvas–and shows how to put them in action.

About the Author

Liza Daly, CTO, Safari
Ms. Daly has had a long and successful record of providing strategy and software for publishers, authors and vendors, working in both the web and publishing industries. In 2008, she developed Bookworm, one of the first open source EPUB readers, and in February of 2010 released Ibis Reader™, the first HTML5 ebook platform.

Tags: ebooks, EPUB, liza daly, Safari Books Online,

2 Responses to “Create rich-layout publications in EPUB 3 with HTML5, CSS3, and MathML”

  1. Paul Topping

    I believe that iBooks Reader is based on WebKit, the same HTML engine that powers the Safari and Chrome browsers. While MathML is part of EPUB 3 and HTML 5, support for it in web browsers is still spotty. Firefox has fairly good support, WebKit’s is very weak at this point but being worked on. Internet Explorer has great support but only with my company’s MathPlayer plugin installed. Since ebook readers are usually based on the HTML engines on which these browsers are also based, usually WebKit, this is problematic for displaying math in ebooks.

    All is not lost however. Until MathML support in these engines catches up, a good solution is MathJax (, an open source JavaScript engine for displaying MathML that works in all modern browsers. The MathJax developers have recently been successful in adding MathJax to the Readium ebook reader, the open source reference ebook reader software project led by IDPF in order to boost acceptance of EPUB 3.


  1.  EPUBs basteln - delta-c/Blog