iBooks/iPad and Text Alignment

A new (to me) wrinkle on iBooks for iPad: at first sight, this e-reader refuses to let you override body text alignment without applying dummy <span> tags. But while working on the ePub edition of Ransom Seaborn, I found that Ransom’s journal entries – which I’d left-aligned to differentiate them from body text – worked just as I wished without any extra effort. Some experimenting led me to the theory that iBooks is happy to honor text alignment in style A, as long as you’ve established body-text style B. This would make sense, since the user’s settings would then be respected for body-text proper, while allowing the book designer to apply text alignment to other paragraph elements.

You can see this from the following two screen shots, which are based on exactly the same test CSS and XHTML, the only difference being that the first paragraph has been copied and re-pasted in the second shot. The ‘voting power’ of that extra paragraph seems to persuade iBooks that this is the body text style, and that the left-alignment requested for the final paragraph can therefore be honored. I think this is good news, not least because it saves me a significant amount of tagging work on Ransom Seaborn :-)

One Paragraph of normal body text

Two Paragraphs of normal body text

Posted in Formatting | Tagged , | Leave a comment

Introduction

Handcrafted Ebooks is a fairly technical guide to ePub formatting and ePub-Kindle portability. It’s aimed at those who are happy to use (or learn) XHTML, CSS, text-editing and text-processing with standard, cross-platform tools. It’s in the nature of such a project that updates and corrections will be required from time to time — since publication, Apple has already released new versions of both its ePub reader (iBooks) and its mobile operating system (IOS) that have outdated previously-valid information.

For business rather than technical reasons, I’ve also been refining my approach to Kindle portability, concentrating more on maintaining a single ePub file that can be converted directly to Kindle format (and accepting the compromises that must be made in order to do so), instead of using automated tools to generate individually-tweaked files that target ePub and Kindle respectively from a single set of XHTML sources, which is the focus of the Kindle-porting chapter in the book.

Clearly, that’s quite a lot of updating and going forward, I expect there to be more. Up to now, I’ve been maintaining a single page for updates, downloads and discussion related to Handcrafted Ebooks, but that’s not going to work in the longer term. Hence this blog.

Posted in Uncategorized | Leave a comment