Several options exist for the initial phases of ebook creation. No matter how you start, eventually your ebook will need to be re-formatted into an EPUB file. So let’s start by describing what an EPUB is.
- Amazon MOBI files are almost identical to EPUBs. In-fact, it only take a few minutes to turn an EPUB into a MOBI (more on that at the bottom of this article)
- There are several programs that can help you edit an EPUB, but all edits are code side, not WYSWYG (What You See is What You Get). It’s not as easy as changing a book in Microsoft Word.
- An EPUB actually contains several file types. The book’s content is stored in html, while the navigation and table of contents are stored in less common file types.
- The file size of an EPUB is controlled almost exclusively by the size of any images in the book. If you want to decrease the file size – compress the images.
We will discuss automated programs that will help you put together an EPUB, but keep in mind that all short-cuts come at a cost. Using an automated program will increase the chances of bugs, errors, device incompatibility, and your code may not meet industry guidelines.
For a truly professional EPUB conversion – contact us. Our ebook conversions are all done directly in code, without automated programs. We work from the ground up, matching your original document paragraph by paragraph.
Options for Initial eBook File Creation
The most common way to write an ebook is in Microsoft Word. If you have your book written in Word, Apple Pages, PDF, or Indesign, you are off to a good start.
Once your book looks exactly how you’d like it to look as an eBook, you will need to save it in html format. This will give us the raw marble slab from which we will carve your EPUB file.
To save a Word file in HTML —> Go to “File” then “Save As” then select .html from the drop down list of file extensions. Alternatively, you can “Export” as a “webpage”.
Be sure to remember where you save this html document so you can find it quickly. One option is to save it to your desktop.
Whatever file you started from, you will need to save it as an html before you can continue.
Alternative – Starting from the ground up
If you haven’t written your book yet, and you are comfortable with html/css, you can actually write the entire book in html. This can be done using Notepad, Dreamweaver, or an online WYSWYG html editor.
Preparing an HTML from Word for automated conversion
Before you can run your new HTML file through an automated program, you will want to clean it up as best you can as well as outline the Table of Contents structure.
ToC structure –
If you code your html right, you can avoid making a separate ToC file and instead have the automated software do it for you. Start by writing our the ToC in Word as you want it to appear, with indents for sub-chapters (or chapters if you have larger sections). It’s important that you know the level for each title. Many books will have all of their books on level 1. An example of a finished ToC is below:
Once you know which level each title is under, it’s time to assign those levels in the HTML. This is done by simply adding the associated “Header” tag to each title. Using the above examples, the html would look like this –
<p> book content</p>
…..<h3>Introduction: The Great Cradle Debate</h3>
<h2>Chapter 1: A Bird’s Eye View</h2>
You can see that the largest sections are under <h1> with the second level as <h2> and the third level as <h3>. One thing to note – if you have styles associated with your titles, you will want to save them and re-apply them to the header tag. You can so this inline or using a linked CSS file.
Once your ToC is established, you will want to clean up the html file, removing any unnecessary formatting such as <span> and <font> tags. This can be a long process, unless you use Find and Replace. The find and replace feature works best with programs like Notepad ++ and Dreamweaver. You will want to make sure to save your new HTML as a different name every time in case you make a mistake and removing something important.
You will also want to remove the excess material at the start and end of your html document. Mainly, this means removing any <header> or <footer> tags and all of their contents, as well as everything in between the brackets of the <body> tag so that it literally just says “<body>“.
Ideally, all of the styling would be done in a linked CSS file rather than inline, but this can take a lot of time and effort if you are not comfortable with CSS.
Doing this minor maintenance will go a long way in producing an error free EPUB using automated software.
Converting from HTML to EPUB using software
The best software on the market for converting from HTML to EPUB is called Calibre. While this program can technically start from a Word or PDF document directly, the results are never clean and will lead to countless device compatibility issues down the road. That’s why we are working from a clean (relatively) HTML document instead.
After adding your HTML document to Calibre and clicking “convert” you will be presented with a long list of customization options. Most of these can be ignored, but there are several key options which must be used correctly.
- You will need to add your cover and meta-data (author, book title, publisher, isbn) correctly
- You will need to tell Calibre how your ToC is designed under the “Structure Detection” tab. If you used the steps above, Calibre may pick-up on your Toc automatically. Try it out without changing any options and you re-convert if Calibre didn’t find your Toc.
- You will need to select the option to “Keep Cover Aspect Ratio”
- You will want to select “Insert Inline Table of Contents”
- Hit Convert!
After all of this is done, Calibre will spit out an EPUB file. You can find the file’s location by clicking on the link next to the word “path” which appears beneath the ebook’s cover of the right side of the screen.
Previewing the eBook
There are a limited number of programs which will display an ebook in exactly the same way as your readers will see it on their devices. They are listed below –
Download both programs. Drag and drop your new EPUB file you got from calibre onto the open window for either program. If you started with Kindle Previewer, your WPUB will automatically be converted into a MOBI and then displayed. If you choose to start with Adobe, your EPUB will open.
Scroll through your book and check each page as well as the ToC. If you find something that needs to be changed, then follow these steps –
- Open Calibre and select the book you want to edit
- Right click and select “edit book”
- A new program will open
- Find the chapter or file where the change needs to be made
- Make the change in html/css and then save it
- Exit the editor program
The EPUB is now updated and can be re-dragged onto the preview program to open it again.
Now you have a fully operational EPUB file! There were some short-cuts taken with the automated software, so be sure to test it on any device you think your readers will be using.