The good people at Calibre have come up with an easy way to convert your docx word files into ebook format using their free ebook management software, which is far more than an ebook library. They recommend that you convert it from docx to epub first (as opposed to from docx to mobi or docx to kindle), and then you can use the epub to easily convert to other formats such as mobi. I used Calibre version 0.9.39 to test the ebook converter. If you do not have word docx version, then you can use the odt format which is found in the free versions of Apache Open Office or LibreOffice. But my quick experiment with an odt file did not produce a great epub, as embedded images were missing and the text appeared in more than one font. But the docx conversion to epub is the quickest and cleanest I have ever done, without the need for any HTML editing. Once I have a correctly formatted docx file, I can produce a perfect epub in 5 minutes, and then convert to mobi in even less. So here is how:
Things to do before to ensure a good conversion:
- Ensure that you use styles to format your word docx document. Under no circumstances should you use the tab key or BIU on the formatting toolbar. Set up a novel template with the styles already created and use that to write your novels. When setting up styles, it is best to build from previous styles like a family tree. So for the body of the novel start with normal as your base style, select a font that you can easily read whilst typing, as most ereaders will be able to change this, left margin, no justification for ebooks, and single line spacing. Then build your other styles from this. For the body of my novel, I use only four styles 99% of the time:
- A chapter heading style – font size, bold, spacing before and after, para 1 style after
- A scene heading style – ***, centred, para 1 style after
- Para 1 style – basically no indent, para 2 style follows (this is used for all first paragraphs of a new chapter or scene)
- Para 2 style – indented, para 2 style follows (this is used for all other paragraphs)
- If you need italics or bold, it should already be built into the style, such as the chapter heading style, or you need to select the bold or italic styles. I use a number of other styles for the front and back matter. So if you don’t know how to use word styles, you should have a quick read up on it and create some in a word template to use for your novels. There is a good basic starter lesson at GCF Learning free.org.
- Hyperlinks should be created with the target frame set to “Page Default (none)”. This is because there is no need to use a target in an ebook to specify open a webpage in a new tab. When you set up or edit your hyperlinks, in the hyperlink creation window on the right, select: Target Frame > Page Default (none).
- Before you convert, switch on the show paragraph marks and check to ensure that where you want a gap, there is an actual gap inserted by the style used and not a paragraph marker. One paragraph mark is fine and will leave you with a normal paragraph break. But any additional paragraph marks will not leave you with additional spacing. Remember to switch show paragraph marks off after you have checked.
- Now you’re ready to convert your docx to epub.
The ebook conversion process: (produce epub and mobi)
- Open calibre and click Add Books > Add books from a single directory – select and add your docx file.
- With the docx file highlighted select Convert books > Convert individually.
- Metadata : The conversion window opens with the metadata tab in the left pane selected.
- Input format (top left of conversion screen) > docx. Output format (top right) > epub.
- Enter title, author name (last name, first name), etc. You can also enter the synopsis in the box on the right.
- Select and import your cover image (there may be another image within the Calibre library there, but once you select the cover, the correct one will replace it).
- Page Setup: Input profile – for docx it is the default input profile. As you initially want to convert to an epub, the best output profile to choose for a general all-purpose EPUB that will work everywhere is the Sony Reader (The profile description can change if your mouse arrow just touches another profile, so make sure this is what you see in the profile description box: This profile is intended for the Sony PRS line. The 500/505/600/700 etc. [Screen size 590 x 775 pixels.]).
- Table of Contents: select this from the left panel of the conversion window. I select ‘Do not add detected chapters to the TOC’ (because I already include a TOC in my word docx). But select the appropriate option from the top 3 for your book. If you want to edit any of the TOC, you should also select Manually fine tune the TOC after the conversion is completed towards the bottom of the screen. Here is a blog post about how to edit the TOC. You can also add the TOC edit button to your toolbar and select it to edit the TOC of an ebook that you have already created.
- Epub Out: Here I tick preserve cover aspect ratio.
- OK: click this at the bottom of the window, then watch at the lower left of the window as the epub builds.
- Open and test the epub: In the main window, right hand pane, click on the epub to open it in the Calibre ebook reader. Test it and all the links. In particular, test all your hyperlinks in the epub.
- I prefer to open and test the epub in Adobe Digital Editions for desktop, which is a free download. Open ADE, click on the library drop down arrow and select add item to library. Browse to the epub and open it. Or if ADE is the default to open epubs, open the path to the epub folder in the right hand pane of Calibre, and double click on the epub. Look through it and test the hyperlinks to satisfy yourself that all is ok. Also click on the bookshelf symbol in ADE to ensure that the cover thumbnail of the epub is displayed.
- If you have an epub reader, you can also upload the file to that and test it.
- Validate the epub in the online version of epub validator: http://validator.idpf.org/. Just upload the epub file to the website and click validate. If you have followed the above steps, your epub should pass.
- What if errors are detected? If you have formatted your docx correctly using styles, you are unlikely to have errors show up in the epub validation (if that is you, then you can ignore steps 10 and 11). But if errors are detected, download and open the epub in Sigil. Then just save it in Sigil, and this will correct any common errors (this is because Sigil currently includes HTML Tidy and runs it on your HTML files before loading them. This usually fixes any problems, but it’s not perfect). You can validate it in Sigil by clicking the big green tick on the far right of the toolbar. But even if it passes, you should still validate in the online validator which may pick up errors that Sigil is unable to detect or correct automatically.
- Still errors? If you have followed the steps above, particularly in regard to setting up your word document, you should find your epub passes the online validation. But if there are errors, these are the most likely and what you should do:
- vlink= change to id= (warning: attribute ‘vlink’ is not declared for element ‘body’)
- link= change to id= (warning: attribute ‘link’ is not declared for element ‘body’) – be careful that you don’t delete xlink= etc, so you may have to do individual find and replace.
- clear= changed to id= (warning: attribute ‘clear’ is not declared for element ‘br’)
- target=‘_blank’ delete it, as id=‘blank’ will not work either, and there is no need to use this in an ebook to specify open a webpage in a new tab. (warning: attribute ‘target’ is not declared for element ‘a’)
- border=’0’ delete it, as id=’0’ will not work either (warning: attribute ‘border’ is not declared for element ‘img’)
From epub to Mobi:
The opinions that I have found so far and my own experience suggests that for kindle ereaders, you will get better results if you convert to the old style mobi format rather than the newer AZW3. However, there is a problem in displaying the thumbnail image of a mobi file converted from Calibre due to some kind of conflict with the Kindle software. The people at Calibre believe it is due to a problem in the Amazon software and advise about it and a work around at this link. I will outline three methods, including the work around, below:
- For those of you publishing via Amazon (you should also be able to do this at some of the ebook aggregators such as Draft2Digital), just upload the epub that you created in Calibre and a cover image to your Amazon dashboard, and then download and check the mobi file that is produced there. If you are not ready to publish it or use it to replace an existing ebook, upload as a new ebook, just fill in the title, author name, and upload the files. Then once you have downloaded your copy you can save it as a draft to your Amazon KDP dashboard.
- For those of you converting for personal use who do not have access to the Amazon KDP converter, you can convert the epub to mobi as normal if you are okay not seeing a thumbnail cover image.
- Open Calibre and select the file to convert.
- Convert document > convert individually
- Metadata Tab: Input format (top left of conversion screen) > epub. Output format (top right) > Mobi
- Page Setup: Output Profile > Kindle. Input Profile > Sony Reader
- Table of contents: Select options based on previous advice
- Mobi Output: Tick do not add Table of Contents to this book (if you already have a TOC inserted in the document). Mobi file type = old.
- OK: Wait until the file has been built, then check it by opening in Calibre’s reader or a kindle. You will note that in Kindle for desktop and some other kindles that the thumbnail image is missing, but otherwise the file should work fine.
- If you want to see the thumbnail cover when the mobi is on Kindle for PC and some kindles, then follow step 2 above, but when you get to the Mobi Output step, you should also tick: Enable sharing of book content via Facebook etc. Note that this is a compromise which will disable last read syncing on some devices.
That’s all there is to it. Now if only those smart guys and gals over at Calibre would develop a program to tap into the stories in my head and convert them into ebook format as quickly and as accurately as this current version did with my docx file, then I swear I’d have to propose to one of them immediately.
What’s your favourite ebook converter, and why?