Saturday, April 10, 2010

What happened to my margins????

As a book-designer, I'm acutely aware of the importance of whitespace, even when it's not a sheet of paper that defines the page. I don't want text that runs from edge to edge of my eReader or top to bottom. I'm always thinking that I'm missing something that's just under the edge of the screen.

So imagine my horror when all my margins disappeared in my eBooks!

Here's what I discovered. I use xhtml and css to create ePub books. Over the course of the past few months I've been digging deeper into some of the insidious things that happen with this combination. I discovered both the lure and the danger, for example, of the universal selector: "*" in css. This can be very powerful if, for example, you want to use a particular font-family throughout your publication. But it is lethal if you set your font-size in the * attributes. Why? Every single element in the book is affected by the * selector. So, if you choose to set the font-size at *, and then fail to specifically override that attribute on say an "h1" element, the h1 will have the font-size you set at *.

I decided that there was nothing in the * selector that I was setting that couldn't be more effectively set in the "body" element. So I went through all my style sheets and deleted the * specifications.

That's when the margins disappeared.

Don't ask me why. This is one of the mysteries of how eReader software gets programmed that is beyond the realm of normal human intelligence. I will say, however, that once I returned the * selector to my style sheet, my margins all came back even though THERE WERE NO ATTRIBUTES SET in the definition.

So, until I find new and better ways of handling this mystery, my style sheets look approximately like this:

* { }
@page {margin:24pt 0;}
body {margin: 0 auto; padding:0 5%;}

It works. The margins are back. But I still think it is a hack!

Monday, March 8, 2010

Quotes or inches?

Most word processing and layout programs included a feature some years ago called “smart quotes.” This feature automatically turns straight inch-marks (" ") on your computer keyboard to typographer's quotation marks (“ ”). It's so common now, most of us never think about it. But when you are setting up your eBook or Web page, you may not be using your standard word processor. Most text editors and code editors still use the inch-mark because it is a vital part of XML coding. So, you need to know the correct code to insert in your XML or XHTML document to get the right punctuation.

The first thing to know is what character-set encoding to use. When I started in eBooks about 10 years ago it was often a pain to get special characters, but about that time an encoding called “UTF-8” became common. This extended character set will enable you to retain the special characters from your word processing file and to add special characters with a simple code. The following is a code sample for the head of the XHTML in your eBook.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>

Notice that in the code sample we use the inch-mark instead of typographer’s quote.

Next, you need the right characters in your eBook. If you use the utf-8 charaset, the quotation marks, em-dashes, apostrophes, and other special characters you used in your text file should render correctly. If you find that they are not, you need to use the actual entity from the XHTML entity list. For most characters, there is a pseudo-English name for the entity. For all characters, there is a numeric code that you can use to get the right character. Below is a chart of the most common entities in novel publishing.










EntityEntity
Displayed
NumberNumber
Displayed
Description
&amp;&&#38;&ampersand
&ldquo;&#8220;left double quotation mark
&lsquo;&#8216;left single quotation mark
&rdquo;&#8221;right double quotation mark
&rsquo;&#8217;right single quotation mark
&emsp;&#8195;em space
&ensp;&#8194;en space
&nbsp; &#160; no-break space = non-breaking space
&mdash;&#8212;em dash
&ndash;&#8211;en dash
&copy;©&#169;©copyright sign
&hellip;&#8230;horizontal ellipsis = three dot leader

If you'd like a more complete explanation of entities and how to use them, Elizabeth Castro’s Character Entity References in HTML 4 and XHTML 1.0 site is the best available.

Monday, March 1, 2010

Glaring errors

I’ve looked at a lot of eBooks over the past ten years and find that there are a very few glaring errors that are common (not in every book, or from every publisher) but that could be avoided on most displays with a couple of small adjustments. If you are currently designing or creating an eBook, here are the top glaring errors and how to avoid them.
  1. No margins. Nothing makes readers less comfortable reading a book than having the type slammed straight up against the edge of the screen. In some few instances, this is necessary because of the type of content or the size of the screen, but readers will find your book much easier to read if there is a margin on the sides and the top and bottom. How do you get it? In your CSS, set margins on “@page.” Most of the readers are using this to get consistent margins on every page. Use this code in your CSS: @page {margin: 5%;}. This will allot 5% of the width and height of your reader to white space between each edge of the screen and the type.

  2. Double-spaced paragraphs. Most Web browsers (on which eReaders have been based) skip space between paragraphs and have no indents on the first line of text in a paragraph. While that works well for largely unformatted scrolling text on large screens, it is not common in actual books. If you want a natural book-reading experience, you want paragraphs to follow on the next line and be indented slightly on the first line. I’ve seen a lot of instances where designers add the paragraph indent, but don’t remove the space between paragraphs. To correct this, use the following CSS in your ePub package: p {margin:0; text-indent:1.5em;}. That makes a pretty nice indent. Of course you can adjust the width of the indent as you see fit.

  3. Font-size and line-height. Standard defaults on most readers use 12-point type and 1.2-1.3 ems (%) for line-height (leading if you are a traditional designer). The result is that on some readers the type looks huge and crowded. Some readers will override whatever you set with their own defaults, but more commonly, this is considered the realm of the book designer. Make the type a little smaller and the line-height a little bigger. This will relax your reader’s eyes a bit and give them more enjoyment of your great novel. Use the “*” pseudo-element in CSS to accomplish this. * {font-size:0.83em; line-height:1.5em;}. Again, you can experiment with these settings to find your own favorites.

You’ll notice that I’ve used the measurement unit “em” a lot. This is the most flexible unit in CSS. It bases measurements on the default font-size. It can be a little tricky, though. When we set the default font-size at “*,” the 0.83em (the same as saying 83% in this instance) is based on the device default font-size. You could also specify a font-size in familiar units like “10pt.” Line-height and indents in ems are always based on the font-size of the element. So in the examples above, a normal paragraph would have 10-point type, 15 points of leading (1.5em) and a first line indent of 15 points (1.5em).

By following these three simple adjustments in your ePub CSS, you’ll change your books from looking amateurish to professional. More advanced tips will come in the near future!

Monday, February 22, 2010

Viewing eBooks on a Laptop or Netbook - for non-Geeks

A great article came out recently on Geeks.com/techtips on how to rotate the display on your netbook to display eBooks in a vertical orientation. It's a great article and explains that while most books are intended to be viewed in a vertical page orientation, most computers are set up with horizonal monitors. Either you end up scrolling up and down the pages to see them, or they fit in a tiny portion of the screen. If you rotate the screen orientation, the books will show up in a more normal-seeming view.

But most of us aren't really Geeks and the writer doesn't actually tell where to find the settings he's referenced. So, here are a few additional instructions.

First, the display setting that Geeks.com references isn't found under "Display" or "Drivers" in your Windows Control Panel. You can open the Control Panel by clicking on the Start button on the Windows Nav Bar at the bottom of your screen. "Control Panel" should be one of the selections in the right hand panel of the Start menu. In the "View by: " menu at the top right of the Control Panel window, choose "Small icons" from the drop-down menu. Now, what you are looking for is an Intel Driver for Mobile. This is the magical driver icon that will open the Window shown in Geeks' screenshot.

Look at the tabs along the left side of the Intel blue window. Choose Display Settings. All you want in this box is to be sure "Enable Rotation" has a checkmark beside it. If not, click on the box to put one there. Then click on the "Hot Keys" tab on the left and you will see the list of hotkeys that Intel has enabled. the setting for 90 degrees will put the top of the screen at what is now on the left side, so you will view the page with the screen on your right and the keyboard on your left. I prefer the 270 degrees setting that will put the screen on our left and the keyboard on the right. That should put the arrow keys on your keyboard someplace near your right thumb, which is great for navigating through a book.

Of course, if you are using Adobe Reader to read PDF files, you don't have to go through all this screen changing. The View menu in Reader gives you the option to rotate the PDF view on your screen. By changing to Full-screen mode, the only thing that appears on your screen is the page you are reading. You can still use the arrow keys to advance from page to page. If it happens that you see two pages cramped on your screen, the View menu also has an option to show single pages.

Happy reading.

Friday, February 5, 2010

Design is not important--right?

If you have bought eBooks and displayed them on your Sony Reader, Kindle, or even desktop, you've probably noticed that they don't look quite as good as paper books. I'm not talking about the quality or clarity of the type, the irritating black flash as the page turns, or the size of the screen. I'm talking about the simple fact that the page layout just doesn't make reading a pleasant experience. Here are a few of the problems that I've noticed and you probably have, too.
  1. The type is too crowded. The words bump up against the edge of the reading surface and the lines of type are too close together.

  2. There are both paragraph indents and they skip a line between paragraphs. It looks like you have three or four independent and unrelated blocks of text on every screen.

  3. Decorative drop capitals are missing or changed.

  4. Chapter headings start right up against the top of the screen, or might not even start on a new page.

  5. Either the type is not justified (aligned flush to both edges of the page) or the justification leaves huge white gaps in lines of type or rivers of white down the entire page. There's no hyphenation, either.

  6. Images are missing, poorly displayed, cut off at bottom or side, all in black and white, and often unreadable.

  7. Special layouts of page elements like tables and lists are either missing, squeezed down so small you can't read them, or so narrow that the type almost looks vertical instead of horizontal.

You may have your own sore spot with the layout on your reader that I haven't included here. Feel free to add it. But the big question is "Why?" Why is everything that we appreciate about paper books missing from the standard reading formats?

There are several reasons, some of them technological and some of them not. I'm going to deal with just one: design. In the first place, the vast bulk of eBooks on the market today, especially those that are "free" or not rights protected, is that a machine made them. Either the static layout of the book, preserved as a PDF file, was fed into a computer program that deduced which kinds of elements were what and pumped out a specification for each one that ignores the actual structure of the book, or a paper book was fed into a scanner and a computer program using optical character recognition converted the scanned image into text if it could and just kept pictures of a page or portion of a page where it couldn't recognize the type. These mechanical (computerized) methods do not think about the design of the book or the interpretation of what the original book designer was going for. They try to make readable text files out of the input and let the layout algorithms in the various devices do the rest of the work.

The result of this is that many devices and reading programs allow you as a reader to make adjustments to how the book is displayed to suit your individual reading preferences. Make the type bigger, choose the font you want to read, pick the line height (leading), and how big you want the margins. Every reader becomes a designer, and everything they read is forced into their design.

Of course real life human designers can design great looking eBooks that are not static (PDF) and that will look great on any device you play them on. But that brings me to the second reason most eBooks look less attractive than their print counterparts: hardly anyone knows how to design for a medium that isn't static. Even after a generation of using the World Wide Web, we are still taught how to put things in a position on a page in a specific size that we expect to remain the same for everyone who sees it. Look at your favorite Web page, for example, and start changing the size of the window it appears in. It is going to fall apart somewhere.

Well, technologically, any current eBook format that is not based on taking a picture of the paper page (PDF, Scans, DOC) is limited in what it can do by the prevailing standards for eBooks. Most are based on html in some way and have a specific set of elements and style representations that are legal, like ePub, Kindle, and LIT. But every designer's task has always been to design within the limitations that are imposed. We're just so used to those limitations being specific sizes (6x9 trade paperback, 2" x 2-column newspaper ad, 8 1/4" x 10 5/8" magazine layout, etc.) that we can't wrap our minds around how to design for a layout that might be 2" wide on an iPhone or 5" wide on a Kindle.

The result is a real loss to readers of eBooks. They can never experience the book the way a designer who understood the content and the medium intended it to be experienced. If we have an obstacle to over come as publishers of eBooks, this one looms much larger over the industry than whether consumers will pay $10 or $15 for their electronic bits, and may even be a part of why consumers do not consider their eBooks to be as valuable as the printed ones.

Wednesday, February 3, 2010

The Future of eBook Pricing

This past weekend we were all taken a little bit by surprise when two giants of the book world, MacMillan and Amazon, went toe-to-toe. The unseen player in this game was Apple. But who were the winners and losers in the big fight? MacMillan got its way and can set its own price up to $15 on eBooks for Kindle. Amazon "lost" its right to set its own price on what it sells, even at a loss, but gets a bigger cut of the take as a result. Apple chuckled over having broken a significant competitive barrier to doing business with Amazon when its new iPad is released.

But what about the two markets that no one talks about? Authors and Readers. The obvious impact for readers is that they will pay more for first release eBooks by major authors, or they won't buy them. Authors won't see a huge difference in what they see in their pockets as they are always paid on the publisher's revenues, not on Amazon's. But they may start looking at how eBook sales actually affect paper sales.

In the long run, there are two free-market issues. Many manufacturers set the retail price of their goods. Try to buy a pair of Levis for under $34.95. Even if you have a "storewide" discount coupon from Macy's or Penny's, the fine print will exclude Levis. So by that token, MacMillan should be able to set the retail price of their books. That whole argument speaks against a free market in which people buy at one price and set the retail price where they can compete. Sorry. The only free market is one in which no single manufacturer holds a lock on a huge percentage of the product. No small or independent publisher could have pushed the deal that MacMillan did, nor are they likely to get the same deal even if the other five big publishers get it for themselves.

My opinion, and prognostication on this runs in synch with Steve Pearlstein of the Washington Post:
While markets have their flaws, over the long run they are good at executing these technological transformations. My guess is that in the not-so-distant future, best-selling authors such as John Grisham and Malcolm Gladwell -- along with unknown authors peddling their first books -- will publish their own works, contracting with independent editors and marketers and selling directly to consumers as much as possible. Other authors will turn to smaller, more specialized publishing houses that will offer smaller advances but bigger royalties and will be built, as they once were, around great editors. Publishers will sell their books through competing online distributors and traditional hard-copy bookstores, the latter of which will continue to exist not only as places to browse and socialize, but also as places to have printed on demand. Backlists will be infinite, pricing will be dynamic, and more copies of more books will be read and sold.

I believe that the people who lead the move into the next generation, however, will not be the Grishams and Gladwells who really have nothing to gain by going independent. It will be led by good new authors and small publishers who can produce top level literary products at prices way below traditional publishing houses. Readers will pay a premium for paper content over its electronic counterpart, but it won't make a difference in what authors earn for their work.

Read the great analysis by Steven Pearlstein in "The Washington Post": The Amazon-Macmillan book saga heralds publishing's progress
Another perceptive analysis by Scott Westerfeld in "The Guardian": Amazon v Macmillan: free market fail
At Aaron Pressman's blog "Gravitational Pull": The real agenda of Apple’s ebook partners: death to ebooks
And the early story by Henry Blodget at "Business Insider": Hey, John Sargent, CEO of Macmillan Books, Screw You!

Thursday, January 28, 2010

Are iBooks a Game-Changer for eBook Publishing?

I watched the reports coming in from Apple's announcement of the iPad yesterday with one thing in mind: What does it mean for eBooks? The answer I came up with surprised me. The iBook application and store will not have a huge impact on eBook publishing, and what impact it does have will be positive.

The iBook reader looks nice, with animated page turns that have always appealed to people who would rather look at books than read them. It is a full-color experience that will allow designers to knock themselves out with splashes of color where none existed before, much like typography on early Macintoshes. As cynical as I am, these are actually good things. Color and animation are an inevitable part of the future of publishing and if we have to go through another period of ransom-note publishing to get there, the result on the other side will still be worth it.

The down-side of the iBook reader is that it is a backlit LCD display that will be harder on the eyes over long periods than the black and white ereaders like Kindle, Sony, and Nook. If Ray Kurzweil (of Blio) is correct, LCD displays are now of such high resolution and flicker-free that people won't need to have eInk.

What I was really worried about was that Apple might come out with their own file format for eBooks. In its one exercise of truly good sense, however, Apple has adopted the IDPF standard ePub format for its books. That should mean that non-DRM ePub eBooks that you get for Adobe Digital Editions, Sony Reader, or Nook should play just fine on your expensive new iPad, and that file creation will be a matter of applying whatever DRM Apple elects to use to the publisher's existing files.

That is huge. It means that when you see the names of Harper-Collins, Penguine, Simon & Schuster, MacMillan, and Hachette up on the big screen, it's all about distribution, not about creating yet another version of the book. Easy entry for publishers means the iBook store should grow rapidly and have no difficulty in being at parity with other popular stores when it opens in two months.

From The National Post: Apple's iPad and new iBooks app to 'go a little further' than Kindle
From TechCrunch: Think iBooks Looks Familiar? You’re Not The Only One.
From CNET News: Apple iBooks e-reader: First Take
From The Huffington Post: iBooks: Apple's New iTunes-Like Store And App For Books