Creating ebooks in ePub format for Sony Reader

I’ve been trying to find out the best way to create an ePub-format document. Of course, I could have used a well-known Adobe product, however, I found a way of creating such books without the use of any commercial software. Here’s the list of free software you need: Amaya: Your text needs to be a valid xhtml document. You could use any of your favoured text or xml editor. This one is my favoured. Remember to use “xhtml 1.1″. However, if you think you are familiar enough with XHTML, you could use any text editor you like Calibre: This is the converter program that turns your xhtml into an ePub document Oops … that’s it. Two programs only. Now open Amaya and create a XHTML 1.1 document. Save it. It is important to make excessive use of headers with the class=”chapter” attribute. Here is an example of a minimal hello-world.xhtml document:

Hello World

Hello World: Chapter 1

This is the text of the first chapter.

Hello World: Chapter 2

And some more text. Remember that the header tag must contain the class="chapter" attribute.

Mind the red class attribute. It is a good idea to generate a minimal stylesheet (.css) file that solely contains a definition of the chapter class, e.g.: .chapter {} and bind it to your xhtml document using . Why? Well, this way the chapter style shows up in Amaya’s style tab from which you can choose it easily when creating a header. If you want to make sure your XHTML document is valid, use html tidy in order to check it: tidy -asxhtml -utf8 -i -m YOURDOCUMENT.html Well, the rest is straight foreward: Start Calibre and import you xhtml document. Add meta tags and create your ePub document.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.