By guest writer Tom McCluskey

Welcome back to the world of e-book design! Last time, we talked about the necessity of mutable design for e-books, specifically about the need for things like reflowable text and proportional rather than static margins. Today, we’ll be looking at how to achieve that mutability of design.

Fortunately for us, web pages are already built with this root of flexibility in mind. In fact, most e-book formats are based in XML, a language that allows you to build your own markup languages. The most widely-known of these markup languages is HTML, the language that web pages are built in.

So what is a “markup language?” Essentially, it is a language that allows you to assign semantic meaning to text. For example, when using HTML, you can use the <h1> </h1> tags around a term to mark that term as a primary header. While this will usually result in that term being set in large print and perhaps bolded, that is not the primary intent of the tags. Those tags are there to let the computer know that that term is a primary header, and what follows that header is related to that term, at least until another <h1> </h1> tag set is encountered. This is particularly important to know if you think that search engines might be interested in checking out your e-book, as proper tagging will allow search engines to provide more meaningful results and better matches to people using those search engines.

HTML and other markup languages, then, are not used to change the layout of a manuscript, though they will do that to a minimal degree. Instead, they are used to define the parts of a manuscript, saying things like “This is a paragraph but this is a chapter header, and this section here is a block quote.” In order to change the layout, we borrow another tool of the Web: style sheets. Cascading style sheets, or CSS, are where the lion’s share of the layout information of any modern website is. Essentially, you use a style sheet to tell your browser or other e-book reading device “I want the text to be in 12-point Arial, except that the chapter headers should be 18-point Papyrus and the block quotes should be indented and set in italic.” You can also define text and background images, colors (though colors, of course, will not work on black-and-white screens), and many other aspects of design. However, most e-book formats use only a portion of CSS, so it is not as powerful as it is on the web.

And this brings us to the different formats of e-books that are available today. A quick glance at Wikipedia will show that there are many different options available; at the time of writing this, there are over two dozen. Many of these formats are a bit too limited for one reason or another, however. Plain text files, for example, are very flexible but contain no formatting information other than line breaks, which make for an unsatisfactory reading experience. By contrast, PDF files offer too much format and not enough flexibility—there is no reflowability of text. Other formats are outdated, not widely used, or too proprietary.

Two of the biggest formats at the moment are epub and Mobipocket. Epub is a nonproprietary format developed by the International Digital Publishing Forum. It is based on XML, so it offers excellent flexibility. And because it is nonproprietary, it doesn’t lock readers into using a single device. It is a relatively new format but is gaining a lot of support. Of particular interest to publishers, in late July Sony opened up their Reader to epub files, so people with Sony Readers will be able to read e-books in epub format.

Mobipocket is another XML-based format. In contrast to the months-old epub, it has been around since 2000. While it is nonproprietary, the company was purchased in April of 2005 by Amazon, and Amazon uses a DRMed version of the Mobipocket format on the Kindle. The Kindle can also read a standard Mobipocket file, though it cannot read one that has been encrypted with Mobipocket DRM.

Both epub and Mobipocket can be read on personal computers; the Mobipocket Reader is available for free download from Mobipocket.com, and Adobe has recently released Digital Editions, which reads both Adobe’s own reflowable PDF files and epub documents. In addition, both epub and Mobipocket can be secured with Digital Rights Management should you wish to (and I’ll leave it to Cory Doctorow to explain why that’s a bad idea). Again, though, the Kindle cannot read files that have been secured with Mobipocket’s DRM system—Kindle files have their own version of the Mobipocket DRM that is just different enough to make them unreadable.

Creation of Mobipocket files is, for the moment, somewhat easier than creation of epub files. Mobipocket has a free Creator tool that allows you to easily create e-books from a number of different sources, including HTML and epub files. Epub is a new enough format that there are far fewer tools available for it, but Bookglutton.com has developed a web page that will convert HTML to epub. Your other option is to consult Harrison Ainsworth’s epub Format Construction Guide to make your epub files by hand, but be warned that it’s not for the faint of heart.

Creating your own epub or Mobipocket file is great if you are distributing e-books yourself, but if you are interested in selling on Amazon.com or Sony’s e-book store, you’ll need to submit your e-book to those companies. Sony’s submission site for publishers is now up and running, and they accept several different file formats. Amazon’s Digital Text Platform also accepts submissions in a number of different file formats. These large online stores certainly expose your e-book to a much larger market, but they take a very large slice of the money you make (Amazon takes 65 percent of the cover price from each sale).

There are, of course, many other formats and many other options available; this article is by no means exhaustive. Now that you’ve gotten your feet wet, follow the links and explore the world of e-book publishing. Like any high-tech field, it is rapidly changing, and there’s no telling what the next Big Thing will be. Whatever happens to e-books, though, it’s bound to be a fascinating ride.

For more of Tom’s helpful musings, please visit his blog at tom-mccluskey.com.

© 2008 Tom McCluskey